@Override public String toString() { return serviceID.toString() + " & "+sbbID.toString(); } }
/** * Computes the real aci data field name * * @param fieldName * @return */ private String getRealFieldName(String fieldName) { String realFieldName = sbbComponent.getDescriptor() .getActivityContextAttributeAliases().get(fieldName); if (realFieldName == null) { // not there then it has no alias, lets set one based on sbb id realFieldName = sbbComponent.getSbbID().toString() + "." + fieldName; final Map<String, String> aliases = sbbComponent.getDescriptor() .getActivityContextAttributeAliases(); synchronized (aliases) { aliases.put(fieldName, realFieldName); } } return realFieldName; }
try { SbbEntity sbbe = sbbEntityFactory.getSbbEntity(sbbes.next(), false); if (sbbe != null && sbbe.getSbbId().toString().equals(sbbId)) { Object res = sbbEntityToArray(sbbe); if (res != null)
private Object[] sbbEntityToArray(SbbEntity entity) { Object[] info = new Object[8]; try { if (entity == null) return null; info[SBB_ENTITY_ID] = entity.getSbbEntityId().toString(); info[PARENT_SBB_ENTITY_ID] = String.valueOf(entity.getSbbEntityId().getParentSBBEntityID()); info[ROOT_SBB_ENTITY_ID] = String.valueOf(entity.getSbbEntityId().getRootSBBEntityID()); info[SBB_ID] = entity.getSbbId().toString(); info[SBB_ENTITY_PRIORITY] = Byte.toString(entity.getPriority()); info[SBB_ENTITY_SERV_CONV_NAME] = entity.getSbbEntityId().getServiceConvergenceName(); info[SBB_ENTITY_SERVICE_ID] = String.valueOf(entity.getSbbEntityId().getServiceID()); Set acsSet = entity.getActivityContexts(); if (acsSet != null && acsSet.size() > 0) { Object[] acsArray = acsSet.toArray(); String[] acs = new String[acsArray.length]; info[ACS] = acs; } } catch (Exception e) { e.printStackTrace(); return null; } return info; }
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent.getUsageParametersInterface() == null) { if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService());
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent.getUsageParametersInterface() == null) { if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService());
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService());
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent.getUsageParametersInterface() == null) { if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService());
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService()); if (usageParameterClass == null) { if (failIfSbbHasNoUsageParamSet) { throw new InvalidArgumentException(sbbId.toString() + " does not define a usage parameters interface"); } else {
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService()); .getUsageParametersConcreteClass(); if (usageParameterClass == null) { throw new InvalidArgumentException(sbbId.toString() + " does not define a usage parameters interface");
public String[] getParameterSets(String strServiceID, String strSbbID) throws ManagementConsoleException { ServiceID serviceID = (ServiceID) managementConsole.getComponentIDMap().get(strServiceID); ServiceUsageMBeanUtils serviceUsageMBeanUtils = getServiceUsageMBeanUtils(serviceID); SbbID sbbID = (SbbID) managementConsole.getComponentIDMap().get(strSbbID); // Get the SbbUsageMBean for the default parameter set // If it does not exist, no sbb usage parameter interface is defined try { serviceUsageMBeanUtils.getSbbUsageMBeanUtils(sbbID); } catch (Exception e) { throw new ManagementConsoleException("No SBB usage parameter interface defined for SBB " + sbbID.toString()); } String defaultParameterSet = ""; String[] namedParameterSet = {}; try { namedParameterSet = serviceUsageMBeanUtils.getUsageParameterSets(sbbID); } catch (Exception e) { } String[] allParameterSet = new String[namedParameterSet.length + 1]; allParameterSet[0] = defaultParameterSet; for (int i = 0; i < namedParameterSet.length; i++) { allParameterSet[i + 1] = namedParameterSet[i]; } return allParameterSet; }