org.jboss.dna.repository.sequencers
Class SequencerNodeContext

java.lang.Object
  extended by org.jboss.dna.repository.sequencers.SequencerNodeContext
All Implemented Interfaces:
ClassLoaderFactory, ExecutionContext, SequencerContext

@Immutable
public class SequencerNodeContext
extends Object
implements SequencerContext

Contains context information that is passed to stream sequencers, including information about the input node containing the data being sequenced.

Author:
John Verhaeg

Method Summary
 AccessControlContext getAccessControlContext()
          
 ClassLoader getClassLoader(String... classpath)
          Get a class loader for the supplied classpath.
 Path getInputPath()
          Return the path of the input node containing the content being sequenced.
 Set<Property> getInputProperties()
          Return the set of properties from the input node containing the content being sequenced.
 Property getInputProperty(Name name)
          Return the property with the supplied name from the input node containing the content being sequenced.
 Logger getLogger(Class<?> clazz)
          Return a logger associated with this context.
 Logger getLogger(String name)
          Return a logger associated with this context.
 LoginContext getLoginContext()
          
 String getMimeType()
          Return the MIME-type of the content being sequenced.
 NamespaceRegistry getNamespaceRegistry()
          Get the namespace registry for this context.
 Problems getProblems()
          Get an interface that can be used to record various problems, warnings, and errors that are not extreme enough to warrant throwing exceptions.
 PropertyFactory getPropertyFactory()
          Get the factory for creating Property objects.
 Subject getSubject()
          Get the JAAS subject for which this context was created.
 ValueFactories getValueFactories()
          Get the factories that should be used to create values for properties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAccessControlContext

public AccessControlContext getAccessControlContext()

Specified by:
getAccessControlContext in interface ExecutionContext
Returns:
the access control context; may be null
See Also:
ExecutionContext.getAccessControlContext()

getClassLoader

public ClassLoader getClassLoader(String... classpath)
Get a class loader for the supplied classpath.

Specified by:
getClassLoader in interface ClassLoaderFactory
Parameters:
classpath - the classpath to use
Returns:
the class loader; may not be null
See Also:
ClassLoaderFactory.getClassLoader(java.lang.String[])

getValueFactories

public ValueFactories getValueFactories()
Get the factories that should be used to create values for properties.

Specified by:
getValueFactories in interface ExecutionContext
Returns:
the property value factory; never null

getInputPath

public Path getInputPath()
Return the path of the input node containing the content being sequenced.

Specified by:
getInputPath in interface SequencerContext
Returns:
input node's path.
See Also:
SequencerContext.getInputPath()

getInputProperties

public Set<Property> getInputProperties()
Return the set of properties from the input node containing the content being sequenced.

Specified by:
getInputProperties in interface SequencerContext
Returns:
the input node's properties; never null.
See Also:
SequencerContext.getInputProperties()

getInputProperty

public Property getInputProperty(Name name)
Return the property with the supplied name from the input node containing the content being sequenced.

Specified by:
getInputProperty in interface SequencerContext
Returns:
the input node property, or null if none exists.
See Also:
SequencerContext.getInputProperty(org.jboss.dna.graph.properties.Name)

getProblems

public Problems getProblems()
Get an interface that can be used to record various problems, warnings, and errors that are not extreme enough to warrant throwing exceptions.

Specified by:
getProblems in interface SequencerContext
Returns:
the interface for recording problems; never null
See Also:
SequencerContext.getProblems()

getMimeType

public String getMimeType()
Return the MIME-type of the content being sequenced.

Specified by:
getMimeType in interface SequencerContext
Returns:
the MIME-type
See Also:
SequencerContext.getMimeType()

getLogger

public Logger getLogger(Class<?> clazz)
Return a logger associated with this context. This logger records only those activities within the context and provide a way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log via this mechanism should not also obtain a system logger.

Specified by:
getLogger in interface ExecutionContext
Parameters:
clazz - the class that is doing the logging
Returns:
the logger, named after clazz; never null
See Also:
ExecutionContext.getLogger(java.lang.Class)

getLogger

public Logger getLogger(String name)
Return a logger associated with this context. This logger records only those activities within the context and provide a way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log via this mechanism should not also obtain a system logger.

Specified by:
getLogger in interface ExecutionContext
Parameters:
name - the name for the logger
Returns:
the logger, named after clazz; never null
See Also:
ExecutionContext.getLogger(java.lang.String)

getLoginContext

public LoginContext getLoginContext()

Specified by:
getLoginContext in interface ExecutionContext
Returns:
the login context; may be null
See Also:
ExecutionContext.getLoginContext()

getNamespaceRegistry

public NamespaceRegistry getNamespaceRegistry()
Get the namespace registry for this context.

Specified by:
getNamespaceRegistry in interface ExecutionContext
Returns:
the namespace registry; never null

getPropertyFactory

public PropertyFactory getPropertyFactory()
Get the factory for creating Property objects.

Specified by:
getPropertyFactory in interface ExecutionContext
Returns:
the property factory; never null
See Also:
ExecutionContext.getPropertyFactory()

getSubject

public Subject getSubject()
Get the JAAS subject for which this context was created.

Specified by:
getSubject in interface ExecutionContext
Returns:
the subject; never null
See Also:
ExecutionContext.getSubject()


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