Examples of MessagePart


Examples of nexj.core.meta.integration.MessagePart

      ObjectMessagePartMapping mapping = (ObjectMessagePartMapping)composite.getMapping();
      Object value = null;

      if (mapping != null)
      {
         MessagePart part = mapping.getSystemPart(nAttr);

         if (part != null)
         {
            value =  tobj.findValue(part.getName());
         }

         switch (nAttr)
         {
            case ObjectMessagePartMapping.ATTR_CLASS:
View Full Code Here

Examples of nexj.core.meta.integration.MessagePart

   protected void updateInstance(CompositeMessagePart composite, TransferObject tobj, Instance instance,
      boolean bNew, ConflictResolutionStrategy conflictResolution)
   {
      for (int i = 0, n = composite.getPartCount(); i != n; ++i)
      {
         MessagePart part = composite.getPart(i);

         if (tobj.hasValue(part.getName()))
         {
            ObjectMessagePartMapping partMapping = (ObjectMessagePartMapping)part.getMapping();

            if (isUpdateRequired(partMapping, instance, bNew))
            {
               Object value = instantiate(tobj.getValue(part.getName()), part);
               Attribute attribute = partMapping.getAttribute();

               if (attribute == null || instance == null)
               {
                  if (partMapping.getSystemAttribute() == ObjectMessagePartMapping.ATTR_OID)
View Full Code Here

Examples of nexj.core.meta.integration.MessagePart

      boolean bSameKey = true;
      boolean bSameValues = true;

      for (int nPartIndex = 0, nPartCount = composite.getPartCount(); nPartIndex != nPartCount; ++nPartIndex)
      {
         MessagePart part = composite.getPart(nPartIndex);
         ObjectMessagePartMapping mapping = (ObjectMessagePartMapping)part.getMapping();
         String sName = part.getName();

         if (newTobj.hasValue(sName) || oldTobj.hasValue(sName))
         {
            boolean bDifferent = newTobj.hasValue(sName) != oldTobj.hasValue(sName);

            if (!bDifferent)
            {
               if (part instanceof CompositeMessagePart && !part.isCollection())
               {
                  CompositeMessagePart derivedMessagePart = getPolymorphic((CompositeMessagePart)part, newTobj,
                     context);

                  bDifferent = !isSameKey((TransferObject)oldTobj.getValue(sName),
View Full Code Here

Examples of nexj.core.meta.integration.MessagePart

         }
        
         return;
      }
     
      MessagePart previousPart = rowPart;
     
      //Format fields in ordinal order
      for (int nPartIndex=0; nPartIndex < partsInOrder.length; nPartIndex++)
      {
         PrimitiveMessagePart part = partsInOrder[nPartIndex];
        
         if (part == null)
         {
            nDelimiterAccumulator += 1;
            continue;
         }
        
         CSVMessagePartMapping partMapping = (CSVMessagePartMapping)part.getMapping();
        
         //Get the transfer object for this part's datum.
         String[] dataKeyPath = partMapping.getDataKeyPath();
         Object datum = rowTransferObj;

         for (int nKeyPathIndex=0; nKeyPathIndex < dataKeyPath.length; nKeyPathIndex++)
         {
            datum = ((TransferObject)datum).findValue(dataKeyPath[nKeyPathIndex], Undefined.VALUE);
           
            if (datum == Undefined.VALUE)
            {
               break;
            }
         }
        
         //Always write the absolute minimum number of delimiters: if there is no data
         //for the last fields on the line, then no delimiter is written.
         if (datum != Undefined.VALUE)
         {
            for (int nDelim = 0; nDelim < nDelimiterAccumulator; nDelim++)
            {
               m_writer.write(((CSVMessagePartMapping)previousPart.getMapping()).getDelimiter().charValue());
            }
           
            nDelimiterAccumulator = 1;
            formatField(datum, partMapping, part);
         }
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

        final String path = (basePath.endsWith(".")) ? basePath.substring(0, basePath.length()-1) : basePath;
        RestActionReporter gr = ResourceUtil.runCommand("get", new ParameterMap() {{
            add ("DEFAULT", path);
        }}, subject);

        MessagePart top = gr.getTopMessagePart();
        for (MessagePart child : top.getChildren()) {
            String message = child.getMessage();
            if (message.contains("=")) {
                String[] parts = message.split("=");
                values.put(parts[0], (parts.length > 1) ? parts[1] : "");
            }
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

        final String path = (basePath.endsWith(".")) ? basePath.substring(0, basePath.length()-1) : basePath;
        RestActionReporter gr = ResourceUtil.runCommand("get", new ParameterMap() {{
            add ("DEFAULT", path);
        }}, habitat, "");

        MessagePart top = gr.getTopMessagePart();
        for (MessagePart child : top.getChildren()) {
            String message = child.getMessage();
            if (message.contains("=")) {
                String[] parts = message.split("=");
                values.put(parts[0], (parts.length > 1) ? parts[1] : "");
            }
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

                        + "s";


        // no linefeed at the end!!!
        boolean first = true;
        MessagePart topMsg = report.getTopMessagePart();
        Properties properties = report.getExtraProperties();
        if (properties == null) {
            properties = new Properties();
            report.setExtraProperties(properties);
        }
        properties.put("jobs", jobInfoList);
        for (JobInfo info : jobInfoList) {
            if (first)    {
                topMsg.setMessage(String.format(formattedLine, NAME, JOBID, TIME, STATE,USER ));
                first = false;
            }

            MessagePart msg = topMsg.addChild();
            msg.setMessage(String.format(formattedLine, info.jobName, info.jobId,  new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.commandExecutionDate), info.exitCode,info.user));
            msg.addProperty(NAME, info.jobName);
            msg.addProperty(JOBID, info.jobId);
            msg.addProperty(TIME, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.commandExecutionDate));
            msg.addProperty(STATE, info.exitCode);
            msg.addProperty(USER, info.user);
        }

        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    }
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

                               + "s";


               // no linefeed at the end!!!
               boolean first = true;
               MessagePart topMsg = report.getTopMessagePart();
               Properties properties = report.getExtraProperties();
               if (properties == null) {
                   properties = new Properties();
                   report.setExtraProperties(properties);
               }
               Collection<Map<String, Object>> details = new ArrayList<Map<String, Object>>();
               properties.put("jobs", details);
               for (JobInfo info : jobInfoList) {
                   if (first)    {
                       topMsg.setMessage(String.format(formattedLine, TITLE_NAME, TITLE_JOBID, TITLE_TIME, TITLE_STATE,TITLE_EXITCODE,TITLE_USER ));
                       first = false;
                   }

                   MessagePart msg = topMsg.addChild();
                   msg.setMessage(String.format(formattedLine, info.jobName, info.jobId,  new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.commandExecutionDate), info.state,info.exitCode,info.user));
                   Map<String, Object> detail = new HashMap<String, Object>();
                   details.add(detail);
                   detail.put(NAME, info.jobName);
                   detail.put(ID, info.jobId);
                   detail.put(DATE, new Date(info.commandExecutionDate));
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

            config = newConfig;
        }
        final ActionReport report = context.getActionReport();
        List<VirtualServer> list = config.getHttpService().getVirtualServer();
        for (final VirtualServer virtualServer : list) {
            final MessagePart part = report.getTopMessagePart().addChild();
            part.setMessage(virtualServer.getId());
        }
        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    }
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

        final String path = (basePath.endsWith(".")) ? basePath.substring(0, basePath.length()-1) : basePath;
        RestActionReporter gr = ResourceUtil.runCommand("get", new ParameterMap() {{
            add ("DEFAULT", path);
        }}, habitat, "");

        MessagePart top = gr.getTopMessagePart();
        for (MessagePart child : top.getChildren()) {
            String message = child.getMessage();
            if (message.contains("=")) {
                String[] parts = message.split("=");
                values.put(parts[0], (parts.length > 1) ? parts[1] : "");
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.