ModeShape Distribution 3.0.0.Beta4

org.modeshape.jboss.subsystem
Class MappedSimpleAttributeDefinition

java.lang.Object
  extended by org.jboss.as.controller.AttributeDefinition
      extended by org.jboss.as.controller.SimpleAttributeDefinition
          extended by org.modeshape.jboss.subsystem.MappedSimpleAttributeDefinition
All Implemented Interfaces:
MappedAttributeDefinition

@Immutable
public class MappedSimpleAttributeDefinition
extends org.jboss.as.controller.SimpleAttributeDefinition
implements MappedAttributeDefinition


Constructor Summary
protected MappedSimpleAttributeDefinition(org.jboss.as.controller.SimpleAttributeDefinition defn, List<String> pathToFieldInConfiguration)
           
 
Method Summary
 String getFieldName()
          Get the name of the mapped field in the RepositoryConfiguration.
 List<String> getPathToContainerOfField()
          Get the path to the field that contains the mapped field within the RepositoryConfiguration.
 List<String> getPathToField()
          Get the path to the field within the RepositoryConfiguration.
 Object getTypedValue(org.jboss.dmr.ModelNode node)
          Obtain from the supplied model node value the value that can be used in the RepositoryConfiguration field.
protected static Object getTypedValue(org.jboss.dmr.ModelNode node, org.jboss.as.controller.AttributeDefinition defn)
           
 
Methods inherited from class org.jboss.as.controller.SimpleAttributeDefinition
marshallAsAttribute, marshallAsAttribute, marshallAsElement, marshallAsElement, parse, parse, parseAndSetParameter, parseAndSetParameter
 
Methods inherited from class org.jboss.as.controller.AttributeDefinition
addOperationParameterDescription, addOperationParameterDescription, addResourceAttributeDescription, addResourceAttributeDescription, correctValue, getAlternatives, getAttributeTextDescription, getDefaultValue, getFlags, getMeasurementUnit, getName, getNoTextDescription, getRequires, getType, getValidator, getXmlName, hasAlternative, isAllowed, isAllowExpression, isAllowNull, isMarshallable, isMarshallable, isRequired, resolveModelAttribute, validateAndSet, validateOperation, validateResolvedOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappedSimpleAttributeDefinition

protected MappedSimpleAttributeDefinition(org.jboss.as.controller.SimpleAttributeDefinition defn,
                                          List<String> pathToFieldInConfiguration)
Parameters:
defn - the simple attribute definition
pathToFieldInConfiguration - the path to the field within the RepositoryConfiguration document
Method Detail

getPathToField

public List<String> getPathToField()
Description copied from interface: MappedAttributeDefinition
Get the path to the field within the RepositoryConfiguration.

Specified by:
getPathToField in interface MappedAttributeDefinition
Returns:
the path; never null and never empty

getPathToContainerOfField

public List<String> getPathToContainerOfField()
Description copied from interface: MappedAttributeDefinition
Get the path to the field that contains the mapped field within the RepositoryConfiguration.

Specified by:
getPathToContainerOfField in interface MappedAttributeDefinition
Returns:
the parent path; never null but possibly empty if the mapped field is at the top-level of the configuration document

getFieldName

public String getFieldName()
Description copied from interface: MappedAttributeDefinition
Get the name of the mapped field in the RepositoryConfiguration.

Specified by:
getFieldName in interface MappedAttributeDefinition
Returns:
the field name; never null

getTypedValue

public Object getTypedValue(org.jboss.dmr.ModelNode node)
                     throws org.jboss.as.controller.OperationFailedException
Description copied from interface: MappedAttributeDefinition
Obtain from the supplied model node value the value that can be used in the RepositoryConfiguration field.

Specified by:
getTypedValue in interface MappedAttributeDefinition
Parameters:
node - the model node value
Returns:
the field value
Throws:
org.jboss.as.controller.OperationFailedException - if there was an error obtaining the value from the model node

getTypedValue

protected static Object getTypedValue(org.jboss.dmr.ModelNode node,
                                      org.jboss.as.controller.AttributeDefinition defn)
                               throws org.jboss.as.controller.OperationFailedException
Throws:
org.jboss.as.controller.OperationFailedException

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.