/** * Creates an instance of the source type using the default constructor. It is a generic factory method. * @return A new instance of the source type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList(); }
/** * Creates an instance of this type using the default constructor. It is a generic factory method. * @return A new instance of this type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new ArchiveDetailsList(); }
protected boolean update(final Long objId, final AppDetails definition, final MALInteraction interaction) { // requirement: 3.3.2.5 Boolean success = this.updateDef(objId, definition); if (super.getArchiveService() != null) { // It should also update on the COM Archive try { AppDetailsList defs = new AppDetailsList(); defs.add(definition); final IdentifierList domain = ConfigurationProviderSingleton.getDomain(); ArchiveDetails archiveDetails = HelperArchive.getArchiveDetailsFromArchive(super.getArchiveService(), AppsLauncherHelper.APP_OBJECT_TYPE, domain, objId); ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); super.getArchiveService().update( AppsLauncherHelper.APP_OBJECT_TYPE, domain, archiveDetailsList, defs, interaction); } catch (MALException ex) { Logger.getLogger(AppsLauncherManager.class.getName()).log(Level.SEVERE, null, ex); return false; } catch (MALInteractionException ex) { Logger.getLogger(AppsLauncherManager.class.getName()).log(Level.SEVERE, null, ex); return false; } } return success; }
ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails);
/** * Please consider using the same method but with the provider URI directly * as argument instead of the connectionDetails object * * @param related Related field * @param source Source field * @param connectionDetails The details of the connection * @return The ArchiveDetailsList object */ @Deprecated public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final SingleConnectionDetails connectionDetails) { final ArchiveDetails archiveDetails = new ArchiveDetails(); archiveDetails.setInstId(new Long(0)); archiveDetails.setDetails(new ObjectDetails(related, source)); archiveDetails.setNetwork(ConfigurationProviderSingleton.getNetwork()); archiveDetails.setTimestamp(HelperTime.getTimestamp()); archiveDetails.setProvider(connectionDetails.getProviderURI()); final ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); return archiveDetailsList; }
archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(new ArchiveDetails(0L, new ObjectDetails(related, source), ConfigurationProviderSingleton.getNetwork(), timestamp, connectionDetails.getProviderURI()));
/** * Generates a ArchiveDetailsList structure with one ArchiveDetails object. * The object instance identifier will be set as 0. The operation will use * the submitted related, source, network and provider fields to fill-in the * object. The fields network and provider are not set. * * @param related Related field * @param source Source field * @param network Network field * @param provider Provider field * @return The ArchiveDetailsList object */ public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final Identifier network, final URI provider) { final ArchiveDetails archiveDetails = new ArchiveDetails(); archiveDetails.setInstId(new Long(0)); archiveDetails.setDetails(new ObjectDetails(related, source)); archiveDetails.setNetwork(network); archiveDetails.setTimestamp(HelperTime.getTimestamp()); archiveDetails.setProvider(provider); final ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); return archiveDetailsList; }
if (super.getArchiveService() != null) { ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList();
/** * Generates a ArchiveDetailsList structure with one ArchiveDetails object. * The object instance identifier will be set as 0. The operation will use * the submitted related, source and connectionDetails fields to fill-in the * object. It will use the provider's network to fill in the network's * field. * * @param related Related field * @param source Source field * @param uri URI field * @return The ArchiveDetailsList object */ public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final URI uri) { final ArchiveDetails archiveDetails = new ArchiveDetails(); archiveDetails.setInstId(new Long(0)); archiveDetails.setDetails(new ObjectDetails(related, source)); archiveDetails.setNetwork(ConfigurationProviderSingleton.getNetwork()); archiveDetails.setTimestamp(HelperTime.getTimestamp()); archiveDetails.setProvider(uri); final ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); return archiveDetailsList; }
/** * Generates a ArchiveDetailsList structure with one ArchiveDetails object. * The object instance identifier will be set as 0. The operation will use * the submitted related, source and interaction fields to fill-in the * object. * * @param related Related field * @param source Source field * @param interaction Interaction * @return The ArchiveDetailsList object */ public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final MALInteraction interaction) { final ArchiveDetails archiveDetails = new ArchiveDetails(); archiveDetails.setInstId(new Long(0)); archiveDetails.setDetails(new ObjectDetails(related, source)); archiveDetails.setNetwork(interaction.getMessageHeader().getNetworkZone()); archiveDetails.setTimestamp(HelperTime.getTimestamp()); archiveDetails.setProvider(interaction.getMessageHeader().getURIFrom()); final ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); return archiveDetailsList; }
ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(objectDetailsList.size());
/** * Called by the MAL when a PROGRESS update is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void progressUpdateReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._QUERY_OP_NUMBER: queryUpdateReceived(msgHeader, (org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(2, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(3, null), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
/** * Called by the MAL when an INVOKE response is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void invokeResponseReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._RETRIEVE_OP_NUMBER: retrieveResponseReceived(msgHeader, (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(0, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(1, null), qosProperties); break; case org.ccsds.moims.mo.com.archive.ArchiveHelper._COUNT_OP_NUMBER: countResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
/** * Called by the MAL when a PROGRESS response is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void progressResponseReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._QUERY_OP_NUMBER: queryResponseReceived(msgHeader, (org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(2, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(3, null), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
final ArchiveDetailsList groupDetailsList = HelperArchive.getArchiveDetailsListFromArchive(archiveService, GroupHelper.GROUPDEFINITION_OBJECT_TYPE, domain, groupDefIds); ArchiveDetailsList groupDefsReferencingGroupIdentity = new ArchiveDetailsList();
/** * Called by the provider MAL layer on reception of a message to handle the interaction. * @param interaction interaction the interaction object. * @param body body the message body. * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error. */ public void handleSubmit(org.ccsds.moims.mo.mal.provider.MALSubmit interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { switch (interaction.getOperation().getNumber().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._UPDATE_OP_NUMBER: delegate.update((org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(2, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(3, null), interaction); interaction.sendAcknowledgement(); break; default: interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation"))); } }
/** * Called by the provider MAL layer on reception of a message to handle the interaction. * @param interaction interaction the interaction object. * @param body body the message body. * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error. */ public void handleSubmit(org.ccsds.moims.mo.mal.provider.MALSubmit interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { switch (interaction.getOperation().getNumber().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._UPDATE_OP_NUMBER: update((org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(2, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(3, null), interaction); interaction.sendAcknowledgement(); break; default: interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation"))); } }
/** * Called by the provider MAL layer on reception of a message to handle the interaction. * @param interaction interaction the interaction object. * @param body body the message body. * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error. */ public void handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { switch (interaction.getOperation().getNumber().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._STORE_OP_NUMBER: interaction.sendResponse(delegate.store((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), (org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(1, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(3, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(4, null), interaction)); break; case org.ccsds.moims.mo.com.archive.ArchiveHelper._DELETE_OP_NUMBER: interaction.sendResponse(delegate.delete((org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.LongList()), interaction)); break; default: interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation"))); } }
/** * Called by the provider MAL layer on reception of a message to handle the interaction. * @param interaction interaction the interaction object. * @param body body the message body. * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error. */ public void handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { switch (interaction.getOperation().getNumber().getValue()) { case org.ccsds.moims.mo.com.archive.ArchiveHelper._STORE_OP_NUMBER: interaction.sendResponse(store((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), (org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(1, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList) body.getBodyElement(3, new org.ccsds.moims.mo.com.archive.structures.ArchiveDetailsList()), (org.ccsds.moims.mo.mal.structures.ElementList) body.getBodyElement(4, null), interaction)); break; case org.ccsds.moims.mo.com.archive.ArchiveHelper._DELETE_OP_NUMBER: interaction.sendResponse(delete((org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.LongList()), interaction)); break; default: interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation"))); } }
ArchiveDetailsList outArchiveDetailsList = new ArchiveDetailsList(); ElementList outMatchedObjects = null;