/** * Lists all urns accessible through this broker. * * @return an array with all the urns accessible through this parameterizable. * @see eu.artemis.demanes.parameterization.Parameterizable#setParameter(eu.artemis * .demanes.datatypes.ANES_URN, java.lang.Object) */ @Override public Set<ANES_URN> listParameters() { UUID uid = UUID.randomUUID(); logger.trace( new LogEntry( this.getClass().getName(), LogConstants.LOG_LEVEL_TRACE, "Param", "Listing parameters (" + uid + ")")); final Set<ANES_URN> urnList = new HashSet<ANES_URN>(); for (Parameterizable it : this.parSet) try { urnList.addAll(it.listParameters()); } catch (ParameterizationException e) { logger.error( new LogEntry( this.getClass().getName(), LogConstants.LOG_LEVEL_ERROR, "Param", "Error Listing parameters", e)); // Do nothing } logger.trace( new LogEntry( this.getClass().getName(), LogConstants.LOG_LEVEL_TRACE, "Param", "Finished listing (" + uid + ")")); return urnList; }
/** * Finds a parameterizable that owns a parameter with the indicated URN. * * @return the parameterizable or null if no owner is found. */ private Parameterizable findURNOwner(ANES_URN urn) { for (Parameterizable parameterizable : parSet) try { if (parameterizable.listParameters().contains(urn)) return parameterizable; } catch (ParameterizationException e) { // Do nothing, search next one } return null; }