| | |
| | | OperationRejectedException, AuthorizationException, |
| | | CommunicationException { |
| | | // First make sure all mandatory properties are defined. |
| | | List<PropertyException> exceptions = new LinkedList<PropertyException>(); |
| | | List<PropertyException> exceptions = new LinkedList<>(); |
| | | |
| | | for (PropertyDefinition<?> pd : definition.getAllPropertyDefinitions()) { |
| | | Property<?> p = getProperty(pd); |
| | |
| | | } |
| | | |
| | | // Now enforce any constraints. |
| | | List<LocalizableMessage> messages = new LinkedList<LocalizableMessage>(); |
| | | List<LocalizableMessage> messages = new LinkedList<>(); |
| | | boolean isAcceptable = true; |
| | | ManagementContext context = getDriver().getManagementContext(); |
| | | |
| | |
| | | /** {@inheritDoc} */ |
| | | public final <PD> SortedSet<PD> getPropertyDefaultValues( |
| | | PropertyDefinition<PD> pd) throws IllegalArgumentException { |
| | | return new TreeSet<PD>(getProperty(pd).getDefaultValues()); |
| | | return new TreeSet<>(getProperty(pd).getDefaultValues()); |
| | | } |
| | | |
| | | |
| | |
| | | public final <PD> PD getPropertyValue(PropertyDefinition<PD> pd) |
| | | throws IllegalArgumentException { |
| | | Set<PD> values = getProperty(pd).getEffectiveValues(); |
| | | if (values.isEmpty()) { |
| | | return null; |
| | | } else { |
| | | if (!values.isEmpty()) { |
| | | return values.iterator().next(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | |
| | | /** {@inheritDoc} */ |
| | | public final <PD> SortedSet<PD> getPropertyValues(PropertyDefinition<PD> pd) |
| | | throws IllegalArgumentException { |
| | | return new TreeSet<PD>(getProperty(pd).getEffectiveValues()); |
| | | return new TreeSet<>(getProperty(pd).getEffectiveValues()); |
| | | } |
| | | |
| | | |