ModeShape Distribution 3.0.0.Beta4

org.modeshape.jboss.subsystem
Class AbstractRepositoryConfigWriteAttributeHandler

java.lang.Object
  extended by org.jboss.as.controller.AbstractWriteAttributeHandler<Void>
      extended by org.modeshape.jboss.subsystem.AbstractRepositoryConfigWriteAttributeHandler
All Implemented Interfaces:
org.jboss.as.controller.OperationStepHandler
Direct Known Subclasses:
BinaryStorageWriteAttributeHandler, IndexStorageWriteAttributeHandler, RepositoryWriteAttributeHandler, SequencerWriteAttributeHandler, TextExtractorWriteAttributeHandler

public abstract class AbstractRepositoryConfigWriteAttributeHandler
extends org.jboss.as.controller.AbstractWriteAttributeHandler<Void>

An OperationStepHandler implementation that automatically handles all write-attribute operations against RESTART_NONE AttributeDefinitions so that the changes are immediately reflected in the repository configuration.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
org.jboss.as.controller.AbstractWriteAttributeHandler.HandbackHolder<T>
 
Constructor Summary
protected AbstractRepositoryConfigWriteAttributeHandler(org.jboss.as.controller.AttributeDefinition[] attributes)
           
 
Method Summary
protected static org.jboss.as.controller.AttributeDefinition[] allBut(org.jboss.as.controller.AttributeDefinition[] definitions, String... excluded)
           
protected  boolean applyUpdateToRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, org.jboss.as.controller.AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder)
           
protected  boolean changeConfiguration(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode existingValue)
           
protected  boolean changeField(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, RepositoryService repositoryService, MappedAttributeDefinition defn, org.jboss.dmr.ModelNode newValue)
           
 void registerAttributes(org.jboss.as.controller.registry.ManagementResourceRegistration registry)
           
protected  String repositoryName(org.jboss.dmr.ModelNode operation)
           
protected  void revertUpdateToRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, Void handback)
           
protected static org.jboss.as.controller.AttributeDefinition[] unique(org.jboss.as.controller.AttributeDefinition[]... modelAttributeArrays)
          Take the supplied arrays of AttributeDefinition arrays and merge them into a single array of uniquely-named AttributeDefinition instances.
 
Methods inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
execute, getAttributeDefinition, requiresRuntime, validateResolvedValue, validateUnresolvedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRepositoryConfigWriteAttributeHandler

protected AbstractRepositoryConfigWriteAttributeHandler(org.jboss.as.controller.AttributeDefinition[] attributes)
Method Detail

applyUpdateToRuntime

protected boolean applyUpdateToRuntime(org.jboss.as.controller.OperationContext context,
                                       org.jboss.dmr.ModelNode operation,
                                       String attributeName,
                                       org.jboss.dmr.ModelNode resolvedValue,
                                       org.jboss.dmr.ModelNode currentValue,
                                       org.jboss.as.controller.AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder)
                                throws org.jboss.as.controller.OperationFailedException
Specified by:
applyUpdateToRuntime in class org.jboss.as.controller.AbstractWriteAttributeHandler<Void>
Throws:
org.jboss.as.controller.OperationFailedException

revertUpdateToRuntime

protected void revertUpdateToRuntime(org.jboss.as.controller.OperationContext context,
                                     org.jboss.dmr.ModelNode operation,
                                     String attributeName,
                                     org.jboss.dmr.ModelNode valueToRestore,
                                     org.jboss.dmr.ModelNode valueToRevert,
                                     Void handback)
                              throws org.jboss.as.controller.OperationFailedException
Specified by:
revertUpdateToRuntime in class org.jboss.as.controller.AbstractWriteAttributeHandler<Void>
Throws:
org.jboss.as.controller.OperationFailedException

repositoryName

protected final String repositoryName(org.jboss.dmr.ModelNode operation)

changeConfiguration

protected boolean changeConfiguration(org.jboss.as.controller.OperationContext context,
                                      org.jboss.dmr.ModelNode operation,
                                      String attributeName,
                                      org.jboss.dmr.ModelNode newValue,
                                      org.jboss.dmr.ModelNode existingValue)
                               throws RepositoryException,
                                      org.jboss.as.controller.OperationFailedException
Throws:
RepositoryException
org.jboss.as.controller.OperationFailedException

registerAttributes

public void registerAttributes(org.jboss.as.controller.registry.ManagementResourceRegistration registry)

changeField

protected boolean changeField(org.jboss.as.controller.OperationContext context,
                              org.jboss.dmr.ModelNode operation,
                              RepositoryService repositoryService,
                              MappedAttributeDefinition defn,
                              org.jboss.dmr.ModelNode newValue)
                       throws RepositoryException,
                              org.jboss.as.controller.OperationFailedException
Throws:
RepositoryException
org.jboss.as.controller.OperationFailedException

unique

protected static org.jboss.as.controller.AttributeDefinition[] unique(org.jboss.as.controller.AttributeDefinition[]... modelAttributeArrays)
Take the supplied arrays of AttributeDefinition arrays and merge them into a single array of uniquely-named AttributeDefinition instances.

Parameters:
modelAttributeArrays - the arrays of definition arrays
Returns:
the uniquely-named definitions

allBut

protected static org.jboss.as.controller.AttributeDefinition[] allBut(org.jboss.as.controller.AttributeDefinition[] definitions,
                                                                      String... excluded)

ModeShape Distribution 3.0.0.Beta4

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