/** * The install operation allows a consumer to install the content of a package on the provider. The selected packages will be installed sequencially. * @param names The names field contains the names of the packages. * @param adapter adapter Listener in charge of receiving the messages from the service provider. * @return The acknowledge value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.mal.structures.BooleanList install(org.ccsds.moims.mo.mal.structures.IdentifierList names, org.ccsds.moims.mo.softwaremanagement.packagemanagement.consumer.PackageManagementAdapter adapter) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.invoke(org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper.INSTALL_OP, adapter, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()); return (org.ccsds.moims.mo.mal.structures.BooleanList) body0; }
private void publishConfigurationStoredFailure(Long related) { // Publish event: Failure with the objId of the Configuration stored ObjectType objTypeEvent = ConfigurationHelper.CONFIGURATIONSTORED_OBJECT_TYPE; BooleanList bool = new BooleanList(); bool.add(false); // Failure ObjectId eventSource = null; // It was not stored... try { comServices.getEventService().publishEvent( providerURI, null, objTypeEvent, related, eventSource, bool ); } catch (IOException ex) { Logger.getLogger(ConfigurationEventAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
BooleanList valueToBeEnabled = new BooleanList(); enableInstance = enableInstances.get(index); valueToBeEnabled.add(enableInstance.getValue()); Long out = manager.setGenerationEnabled(objIdToBeEnabled.get(index), valueToBeEnabled.get(index), source, connection.getConnectionDetails()); output.add(out);
BooleanList valueToBeEnabled = new BooleanList(); objIdToBeEnabled.clear(); objIdToBeEnabled.addAll(manager.listAllCheckLinkIds()); valueToBeEnabled.clear(); boolean valueToSet = instance.getValue(); valueToBeEnabled.add(valueToSet); enableInstance = enableInstances.get(index); objIdToBeEnabled.add(enableInstance.getId()); valueToBeEnabled.add(enableInstance.getValue()); manager.setCheckEnabled(objIdToBeEnabled.get(index), valueToBeEnabled.get(index), connection.getConnectionDetails()); periodicReportingMaxManager.refresh(objIdToBeEnabled.get(index)); periodicCheckingManager.refresh(objIdToBeEnabled.get(index)); if (valueToBeEnabled.get(index)) {
public void addValueToBeEnabled(Boolean valueToBeEnabled) { this.valueToBeEnabled.add(valueToBeEnabled); }
int instType = actionInstance.getArgumentValues().get(index).getValue().getTypeShortForm(); boolean isRawValue = (actionInstance.getIsRawValue() == null) || (actionInstance.getIsRawValue().get(index) == null) || (actionInstance.getIsRawValue().get(index)); if ((isRawValue && (defRawType != instType)) || (!isRawValue && (defConvType != instType))) {
BooleanList valueToBeEnabled = new BooleanList(); InstanceBooleanPair enableInstance = enableInstances.get(index); objIdToBeEnabled.add(enableInstance.getId()); valueToBeEnabled.add(enableInstance.getValue()); valueToBeEnabled.get(index), source, connection.getConnectionDetails()); output.add(out);
/** * The listUnitsAvailable operation allows a consumer to request the list of the units available and their respective status. * @param names The names field holds the name of the units. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.platform.powercontrol.body.ListUnitsAvailableResponse listUnitsAvailable(org.ccsds.moims.mo.mal.structures.IdentifierList names) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper.LISTUNITSAVAILABLE_OP, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()); return new org.ccsds.moims.mo.platform.powercontrol.body.ListUnitsAvailableResponse((org.ccsds.moims.mo.mal.structures.LongList) body0, (org.ccsds.moims.mo.mal.structures.BooleanList) body1); }
BooleanList valueToBeEnabled = new BooleanList(); for (Long statLink : statLinksForFunction) { objIdToBeEnabled.add(statLink); valueToBeEnabled.add(value); valueToBeEnabled.add(enableInstance.getValue()); final Long changedId = objIdToBeEnabled.get(index); manager.setReportingEnabled(changedId, valueToBeEnabled.get(index), connection.getConnectionDetails());
private void publishConfigurationStoredSuccess(Long objId, Long related) { // Publish event: Success with the objId of the Configuration stored ObjectType objTypeEvent = ConfigurationHelper.CONFIGURATIONSTORED_OBJECT_TYPE; BooleanList bool = new BooleanList(); bool.add(true); // Success ObjectId eventSource = new ObjectId(); eventSource.setType(ConfigurationHelper.CONFIGURATIONOBJECTS_OBJECT_TYPE); eventSource.setKey(new ObjectKey(providerDomain, objId)); try { comServices.getEventService().publishEvent( providerURI, objId, objTypeEvent, related, eventSource, bool ); } catch (IOException ex) { Logger.getLogger(ConfigurationEventAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
/** * The listApp operation allows a consumer to request the object instance identifiers of the Apps objects and running status for an app name or for a certain app category. * @param appNames The appNames field contains a list of application names. * @param category The category field contains the category identifier to filter on. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.softwaremanagement.appslauncher.body.ListAppResponse listApp(org.ccsds.moims.mo.mal.structures.IdentifierList appNames, org.ccsds.moims.mo.mal.structures.Identifier category) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.softwaremanagement.appslauncher.AppsLauncherHelper.LISTAPP_OP, appNames, category); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()); return new org.ccsds.moims.mo.softwaremanagement.appslauncher.body.ListAppResponse((org.ccsds.moims.mo.mal.structures.LongList) body0, (org.ccsds.moims.mo.mal.structures.BooleanList) body1); }
BooleanList valueToBeEnabled = new BooleanList(); enableInstance = enableInstances.get(index); valueToBeEnabled.add(enableInstance.getValue()); boolean changed = manager.setFilterEnabled(objIdToBeEnabled.get(index), valueToBeEnabled.get(index), source, connection.getConnectionDetails());
availablePackages = backend.getListOfPackages(); final IdentifierList packages = new IdentifierList(); final BooleanList installed = new BooleanList(); boolean isInstalled = backend.isPackageInstalled(pack); packages.add(new Identifier(pack)); installed.add(isInstalled); boolean isInstalled = backend.isPackageInstalled(availablePackages.get(index)); packages.add(new Identifier(availablePackages.get(index))); installed.add(isInstalled); outList.setBodyElement1(new BooleanList());
/** * The findPackage operation allows a consumer to find the available packages on the provider. * @param names The names field contains the names of the packages. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.FindPackageResponse findPackage(org.ccsds.moims.mo.mal.structures.IdentifierList names) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper.FINDPACKAGE_OP, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()); return new org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.FindPackageResponse((org.ccsds.moims.mo.mal.structures.IdentifierList) body0, (org.ccsds.moims.mo.mal.structures.BooleanList) body1); }
BooleanList valueToBeEnabled = new BooleanList(); enableInstance = enableInstances.get(index); valueToBeEnabled.add(enableInstance.getValue()); valueToBeEnabled.add(enableInstance.getValue()); valueToBeEnabled.get(index), source, connection.getConnectionDetails()); output.add(out);
final BooleanList integrities = new BooleanList(); final StringList publicKeys = new StringList(); boolean integrity = backend.checkPackageIntegrity(packageName.getValue()); String publicKey = backend.getPublicKey(packageName.getValue()); integrities.add(integrity); publicKeys.add(publicKey);
/** * The checkPackageIntegrity operation allows a consumer to check the integrity of a certain package on the provider. * @param names The names field contains the names of the packages. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.CheckPackageIntegrityResponse checkPackageIntegrity(org.ccsds.moims.mo.mal.structures.IdentifierList names) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper.CHECKPACKAGEINTEGRITY_OP, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.StringList()); return new org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.CheckPackageIntegrityResponse((org.ccsds.moims.mo.mal.structures.BooleanList) body0, (org.ccsds.moims.mo.mal.structures.StringList) body1); }
BooleanList runningApps = new BooleanList(); runningApps.add(manager.isAppRunning(id));
/** * Called by the MAL when a REQUEST 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 requestResponseReceived(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.softwaremanagement.packagemanagement.PackageManagementHelper._FINDPACKAGE_OP_NUMBER: findPackageResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()), qosProperties); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._CHECKPACKAGEINTEGRITY_OP_NUMBER: checkPackageIntegrityResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()), (org.ccsds.moims.mo.mal.structures.StringList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.StringList()), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
return new BooleanList();