Package nexj.core.util

Examples of nexj.core.util.HashTab


      m_bEmpty = false;
      m_bIgnoreRoot = false;
      m_fixupArray = new Object[48];
      m_indexArray = new int[48];
      m_stack = new Object[48];
      m_idMap = new HashTab();
      m_nsMap = new HashTab();
      m_arrayUnmshMap = new HashTab();
      m_arrayUnmshMap.put(CHARACTER_UNMSH, CHAR_ARRAY_UNMSH);
      m_arrayUnmshMap.put(STRING_UNMSH, STRING_ARRAY_UNMSH);
      m_arrayUnmshMap.put(TRANSFER_OBJECT_UNMSH, TRANSFER_OBJECT_ARRAY_UNMSH);
      m_arrayUnmshMap.put(TRANSFER_OBJECT_ARRAY_UNMSH, TRANSFER_OBJECT_ARRAY_ARRAY_UNMSH);
      m_valueBuf = new StringBuffer(32);
View Full Code Here


    * @param assignment The assignment element, which starts the queue processing.
    * @return The last loaded step after the queue element.
    */
   protected Step loadQueue(Element queueElement, final Assignment assignment)
   {
      final Lookup eventMap = new HashTab();
      final Fork fork = new Fork();
      final Decision decision = new Decision();

      fork.setActivity(assignment.getActivity());
      decision.setActivity(assignment.getActivity());

      XMLUtil.forEachChildElement(queueElement, null,
         m_helper.new ElementHandler("queueEvent")
      {
         private boolean m_bTimer;

         protected String getName(Element eventElement)
         {
            return XMLUtil.getStringAttr(eventElement, "name");
         }

         public void handleElement(Element eventElement, String sEventName)
         {
            Node child = eventElement.getFirstChild();
            String sElement = eventElement.getNodeName();
            Concurrent activity = new Concurrent();
            Branch branch = null;

            activity.setFork(fork);

            if (sElement.equals("TimerEvent"))
            {
               if (m_bTimer)
               {
                  throw new MetadataException("err.meta.workflow.multipleQueueTimers",
                     new Object[]{assignment.getName()});
               }

               Timeout timeout = new Timeout();

               timeout.setActivity(activity);
               timeout.setValue(m_helper.parse(XMLUtil.getReqStringAttr(eventElement, "value"),
                  false, activity.getFlow().getPosMap(), null, m_metadata.getGlobalEnvironment()));
               activity.addStep(timeout);

               Wait wait = new Wait(timeout);

               timeout.setNext(wait);
               activity.addStep(wait);

               m_bTimer = true;
            }
            else if (sElement.equals("ClassEvent"))
            {
               AutoCompletion completion = new AutoCompletion(assignment);

               loadWorkflowHandler(eventElement, completion, activity.getFlow());
               activity.addStep(completion);
            }
            else if (sElement.equals("ManualEvent"))
            {
               Object condition = m_helper.parse(XMLUtil.getStringAttr(eventElement, "condition"),
                  false, assignment.getActivity().getFlow().getPosMap(),
                  Boolean.TRUE, m_metadata.getGlobalEnvironment());
               boolean bTarget = loadTarget(eventElement, assignment, condition, sEventName, false);
               Element first = XMLUtil.findFirstElement(child);

               if (first != null && first.getNodeName().equals("UIAction"))
               {
                  loadTarget(first, assignment, condition, sEventName, bTarget);
                  child = first.getNextSibling();
               }

               if (assignment.getManualCompletion() == null)
               {
                  ManualCompletion completion = new ManualCompletion(assignment);

                  activity.addStep(completion);
               }
               else
               {
                  activity = null;
               }
            }
            else if (sElement.equals("ProcessEvent"))
            {
               branch = new Branch();
               decision.addBranch(branch);

               assignment.setSemaphore(true);

               Semaphore semaphore = new Semaphore(assignment.getName() + ":Semaphore", assignment);

               semaphore.setActivity(activity);
               activity.addStep(semaphore);

               Block block = new Block();

               block.setActivity(branch);
               branch.addStep(block);
               loadActivity(child, block.getContainedActivity());
               block.setCleanupCode(semaphore.getExitCode());
            }
            else
            {
               throw new MetadataException("err.meta.workflow.invalidQueueElement",
                  new Object[]{sElement, assignment.getName()});
            }

            if (eventMap.put(sEventName, Boolean.TRUE) != null)
            {
               throw new MetadataException("err.meta.workflow.queueEventDup",
                  new Object[]{sEventName, assignment.getName()});
            }

View Full Code Here

    */
   public void resolvePrefixes()
   {
      if (m_prefixSchemaMap == null)
      {
         m_prefixSchemaMap = new HashTab(m_uriSchemaMap.size());
      }

      if (m_schemaPrefixMap == null)
      {
         m_schemaPrefixMap = new HashTab(m_uriSchemaMap.size());
      }

      for (Iterator itr = m_uriSchemaMap.valueIterator(); itr.hasNext(); )
      {
         Schema schema = (Schema)itr.next();
View Full Code Here

    */
   protected Object parseObject()
   {
      String sKey = null;
      Object value = null;
      Lookup objMap = new HashTab(4);

      ++m_nListDepth;

      if (getCurToken() != TOKEN_CBRACE)
      {
         for (;;)
         {
            value = parseValue();
            // key
            if (value instanceof String)
            {
               sKey = (String)m_tokenValue;
            }
            else
            {
               fail("err.parser.json.object.unexpectedKeyValue", new Object[] { value }, getCurTokenPos());
            }

            // value
            if (getCurToken() != TOKEN_COLON)
            {
               fail("err.parser.unexpectedToken", new Object[] { m_tokenValue }, getCurTokenPos());
            }
            else
            {
               forgetToken();
               value = parseValue();
               objMap.put(sKey, value);

               if (getCurToken() == TOKEN_CBRACE)
               {
                  forgetToken();
                  --m_nListDepth;
View Full Code Here

         m_loader.addIOFixup(new ContextFixup(getHelper())
         {
            public void fixup()
            {
               Lookup aliasFragmentMap = new HashTab();

               for (Iterator itr = m_loader.getMetadata().getDataSourceIterator(); itr.hasNext(); )
               {
                  DataSource ds = (DataSource)itr.next();

                  if (ds instanceof RelationalDatabase)
                  {
                     RelationalDatabase rel = (RelationalDatabase)ds;

                     for (Iterator fragItr = rel.getFragmentIterator(); fragItr.hasNext(); )
                     {
                        RelationalDatabaseFragment frag = (RelationalDatabaseFragment)fragItr.next();
                        RelationalDatabaseFragment oldFrag = (RelationalDatabaseFragment)aliasFragmentMap.put(frag.getAlias(), frag);

                        if (oldFrag == null)
                        {
                           frag.setFirst(true);
                        }
                        else
                        {
                           frag.setFirst(false);
                           aliasFragmentMap.put(frag.getAlias(), oldFrag);

                           if (!frag.isCompatible(oldFrag))
                           {
                              throw new MetadataValidationException("err.meta.persistence.fragmentPropertyMismatch",
                                 new Object[]{frag.getDataSource().getName() + frag.getSuffix(), oldFrag.getDataSource().getName() + oldFrag.getSuffix()});
View Full Code Here

   {
      Lookup columnMap = (Lookup)m_columnMap.get(sTable);

      if (columnMap == null)
      {
         columnMap = new HashTab();
         m_columnMap.put(sTable, columnMap);
      }

      ColumnUpgradeInfo info = (ColumnUpgradeInfo)columnMap.get(sName);
View Full Code Here

            {
               Boolean.TRUE
            });

            m_sQueueName = (String)dispatcher.getValue("QUEUE_NAME");
            m_semaphoreMap = new HashTab();
            m_blockingSet = new HashHolder();
            m_nodeByProcessingMessageIdMap = new HashTab();
            m_processingMessagesByNodeNameMap = new HashTab();
            m_messageLoadAttributes = (Pair)dispatcher.getValue("SELECT_ATTRIBUTES", "LOAD_ATTRIBUTES");

            if (startNode(result, dispatcher, bReset, context))
            {
               s_logger.debug("This node selected to be dispatcher, recovering incomplete transactions");
View Full Code Here

      Instance inst = null;

      try
      {
         context.setSecure(false);
         InstanceFactory instanceFactory = new InstanceFactory(new HashTab(), new ArrayList(), InstanceFactory.STATE, context);

         inst = instanceFactory.instantiate(tobj);

         instanceFactory.complete();
      }
View Full Code Here

    */
   protected Lookup getMultipartParameters(Lookup sizeMap, long lDefMaxSize) throws IOException, RequestException
   {
      try
      {
         Lookup paramMap = new HashTab();
         MIMEHeader header = new MIMEHeader(null, m_request.getHeader("Content-Type"));

         if (header.getFirstValue() == null || !header.getFirstValue().getName().equals(MULTIPART_FORM_DATA))
         {
            throw new MultipartDataException("Unexpected content type");
View Full Code Here

    * Any classes overriding this function will have to call this function as well
    * (i.e. their parent's function).
    */
   protected void reset()
   {
      m_optionalMetaclassMap = new HashTab/*<String, Metaclass>*/();
      m_optionalXMLMetatypeMap = new HashTab/*<QName, XMLMetatype>*/();
      m_requiredMetaclassSet = new HashHolder/*<Metaclass>*/();
      m_requiredXMLMetatypeMap = new HashTab/*<QName, XMLMetatype>*/();

      // define array types for all XSD types since that is how arrays might be marshalled
      for (int i = 0; i <= Primitive.MAX_COUNT; ++i)
      {
         Primitive type = Primitive.get(i);
View Full Code Here

TOP

Related Classes of nexj.core.util.HashTab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.