public void changeTextExtractorField( MappedAttributeDefinition defn,
                                          ModelNode newValue,
                                          String extractorName ) throws RepositoryException, OperationFailedException {
        ModeShapeEngine engine = getEngine();
        String repositoryName = repositoryName();

        // Get a snapshot of the current configuration ...
        RepositoryConfiguration config = engine.getRepositoryConfiguration(repositoryName);

        // Now start to make changes ...
        Editor editor = config.edit();

        // Find the array of sequencer documents ...
        List<String> pathToContainer = defn.getPathToContainerOfField();
        EditableDocument textExtracting = editor.getOrCreateDocument(pathToContainer.get(1));
        EditableDocument extractors = textExtracting.getOrCreateDocument(pathToContainer.get(2));

        // The container should be an array ...
        for (String configuredExtractorName : extractors.keySet()) {
            // Look for the entry with a name that matches our extractor name ...
            if (extractorName.equals(configuredExtractorName)) {
                // All these entries should be nested documents ...
                EditableDocument extractor = (EditableDocument)extractors.get(configuredExtractorName);
                // Change the field ...
                String fieldName = defn.getFieldName();
                // Get the raw value from the model node ...
                Object rawValue = defn.getTypedValue(newValue);
                // And update the field ...
                extractor.set(fieldName, rawValue);
                break;
            }
        }

        Changes changes = editor.getChanges();
        engine.update(repositoryName, changes);
    }
public void changeTextExtractorField ( MappedAttributeDefinition defn , ModelNode newValue , String extractorName ) throws RepositoryException , OperationFailedException { ModeShapeEngine engine = getEngine ( ) ; String repositoryName = repositoryName ( ) ; RepositoryConfiguration config = engine . getRepositoryConfiguration ( repositoryName ) ; Editor editor = config . edit ( ) ; List < String > pathToContainer = defn . getPathToContainerOfField ( ) ; EditableDocument textExtracting = editor . getOrCreateDocument ( pathToContainer . get ( 1 ) ) ; EditableDocument extractors = textExtracting . getOrCreateDocument ( pathToContainer . get ( 2 ) ) ; for ( String configuredExtractorName : extractors . keySet ( ) ) { if ( extractorName . equals ( configuredExtractorName ) ) { EditableDocument extractor = ( EditableDocument ) extractors . get ( configuredExtractorName ) ; String fieldName = defn . getFieldName ( ) ; Object rawValue = defn . getTypedValue ( newValue ) ; extractor . set ( fieldName , rawValue ) ; break ; } } Changes changes = editor . getChanges ( ) ; engine . update ( repositoryName , changes ) ; }
Immediately change and apply the specified extractor field in the current repository configuration to the new value.

@param defn the attribute definition for the value; may not be null
@param newValue the new string value
@param extractorName the name of the sequencer
@throws RepositoryException if there is a problem obtaining the repository configuration or applying the change
@throws OperationFailedException if there is a problem obtaining the raw value from the supplied model node