private static TransformersSubRegistration getTransformersSubRegistration(TransformationDescription description, TransformersSubRegistration subRegistration) { for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { subRegistration.registerOperationTransformer(entry.getKey(), entry.getValue()); } for (final TransformationDescription child : description.getChildren()) { register(child, subRegistration); } subRegistration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); return subRegistration; }
private static TransformersSubRegistration getTransformersSubRegistration(TransformationDescription description, TransformersSubRegistration subRegistration) { for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { subRegistration.registerOperationTransformer(entry.getKey(), entry.getValue()); } for (final TransformationDescription child : description.getChildren()) { register(child, subRegistration); } subRegistration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); return subRegistration; }
/** * Register a transformation description as a sub-resource at a given {@linkplain SubsystemRegistration}. * * @param description the subsystem transformation description * @param registration the subsystem registrations * @param range the model version range the transformation applies to * @return the create sub registration */ public static TransformersSubRegistration register(TransformationDescription description, SubsystemRegistration registration, ModelVersionRange range) { final TransformersSubRegistration subRegistration = registration.registerModelTransformers(range, description.getResourceTransformer(), description.getOperationTransformer()); for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { subRegistration.registerOperationTransformer(entry.getKey(), entry.getValue()); } for (final TransformationDescription child : description.getChildren()) { register(child, subRegistration); } subRegistration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); return subRegistration; }
/** * Register a transformation description as a sub-resource at a given {@linkplain SubsystemRegistration}. * * @param description the subsystem transformation description * @param registration the subsystem registrations * @param range the model version range the transformation applies to * @return the create sub registration */ public static TransformersSubRegistration register(TransformationDescription description, SubsystemRegistration registration, ModelVersionRange range) { final TransformersSubRegistration subRegistration = registration.registerModelTransformers(range, description.getResourceTransformer(), description.getOperationTransformer()); for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { subRegistration.registerOperationTransformer(entry.getKey(), entry.getValue()); } for (final TransformationDescription child : description.getChildren()) { register(child, subRegistration); } subRegistration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); return subRegistration; }
/** * Register a transformation description as a sub-resource at a given {@linkplain TransformersSubRegistration}. * * @param description the transformation description. * @param parent the parent registration * @return the created sub registration */ public static TransformersSubRegistration register(final TransformationDescription description, TransformersSubRegistration parent) { final TransformersSubRegistration registration = parent.registerSubResource( description.getPath(), description.getPathAddressTransformer(), description.getResourceTransformer(), description.getOperationTransformer(), description.isInherited()); for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { registration.registerOperationTransformer(entry.getKey(), entry.getValue()); } registration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); for (final TransformationDescription child : description.getChildren()) { register(child, registration); } return registration; }
/** * Register a transformation description as a sub-resource at a given {@linkplain TransformersSubRegistration}. * * @param description the transformation description. * @param parent the parent registration * @return the created sub registration */ public static TransformersSubRegistration register(final TransformationDescription description, TransformersSubRegistration parent) { final TransformersSubRegistration registration = parent.registerSubResource( description.getPath(), description.getPathAddressTransformer(), description.getResourceTransformer(), description.getOperationTransformer(), description.isInherited()); for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { registration.registerOperationTransformer(entry.getKey(), entry.getValue()); } registration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); for (final TransformationDescription child : description.getChildren()) { register(child, registration); } return registration; }
/** * Register a transformation description as a sub-resource at a given {@linkplain TransformersSubRegistration}. * * @param description the transformation description. * @param parent the parent registration * @return the created sub registration */ public static TransformersSubRegistration register(final TransformationDescription description, TransformersSubRegistration parent) { final TransformersSubRegistration registration; if (description.getPath() == null) { //root registration registration = parent; } else { registration = parent.registerSubResource( description.getPath(), description.getPathAddressTransformer(), description.getResourceTransformer(), description.getOperationTransformer(), description.isInherited(), description.isPlaceHolder()); } for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { registration.registerOperationTransformer(entry.getKey(), entry.getValue()); } registration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); for (final TransformationDescription child : description.getChildren()) { register(child, registration); } return registration; }
/** * Register a transformation description as a sub-resource at a given {@linkplain TransformersSubRegistration}. * * @param description the transformation description. * @param parent the parent registration * @return the created sub registration */ public static TransformersSubRegistration register(final TransformationDescription description, TransformersSubRegistration parent) { final TransformersSubRegistration registration; if (description.getPath() == null) { //root registration registration = parent; } else { registration = parent.registerSubResource( description.getPath(), description.getPathAddressTransformer(), description.getResourceTransformer(), description.getOperationTransformer(), description.isInherited(), description.isPlaceHolder()); } for (final Map.Entry<String, OperationTransformer> entry : description.getOperationTransformers().entrySet()) { registration.registerOperationTransformer(entry.getKey(), entry.getValue()); } registration.discardOperations(description.getDiscardedOperations().toArray(new String[description.getDiscardedOperations().size()])); for (final TransformationDescription child : description.getChildren()) { register(child, registration); } return registration; }
expressions.discardOperations(ADD, REMOVE, WRITE_ATTRIBUTE_OPERATION, READ_ATTRIBUTE_OPERATION); resolved.discardOperations(WRITE_ATTRIBUTE_OPERATION); resolved.registerOperationTransformer(ADD, new AbstractOperationTransformer() { @Override