public class DefaultModletProcessor extends Object implements ModletProcessor
ModletProcessor
implementation.ModelContext.processModlets(org.jomc.modlet.Modlets)
Modifier and Type | Field and Description |
---|---|
static String |
ENABLED_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property
enabled . |
static String |
TRANSFORMER_LOCATION_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property
transformerLocation . |
Constructor and Description |
---|
DefaultModletProcessor()
Creates a new
DefaultModletProcessor instance. |
Modifier and Type | Method and Description |
---|---|
List<Transformer> |
findTransformers(ModelContext context,
String location)
Searches a given context for transformers.
|
static int |
getDefaultOrdinal()
Gets the default ordinal number of the processor.
|
static String |
getDefaultTransformerLocation()
Gets the default location searched for transformer resources.
|
int |
getOrdinal()
Gets the ordinal number of the processor.
|
String |
getTransformerLocation()
Gets the location searched for transformer resources.
|
static boolean |
isDefaultEnabled()
Gets a flag indicating the processor is enabled by default.
|
boolean |
isEnabled()
Gets a flag indicating the processor is enabled.
|
Modlets |
processModlets(ModelContext context,
Modlets modlets)
Processes a given list of
Modlet s with a context. |
static void |
setDefaultEnabled(Boolean value)
Sets the flag indicating the processor is enabled by default.
|
static void |
setDefaultOrdinal(Integer value)
Sets the default ordinal number of the processor.
|
static void |
setDefaultTransformerLocation(String value)
Sets the default location searched for transformer resources.
|
void |
setEnabled(Boolean value)
Sets the flag indicating the processor is enabled.
|
void |
setOrdinal(Integer value)
Sets the ordinal number of the processor.
|
void |
setTransformerLocation(String value)
Sets the location searched for transformer resources.
|
public static final String ENABLED_ATTRIBUTE_NAME
enabled
.public static final String TRANSFORMER_LOCATION_ATTRIBUTE_NAME
transformerLocation
.public DefaultModletProcessor()
DefaultModletProcessor
instance.public static boolean isDefaultEnabled()
The default enabled flag is controlled by system property
org.jomc.modlet.DefaultModletProcessor.defaultEnabled
holding a value indicating the processor is
enabled by default. If that property is not set, the true
default is returned.
true
, if the processor is enabled by default; false
, if the processor is disabled by
default.isEnabled()
,
setDefaultEnabled(java.lang.Boolean)
public static void setDefaultEnabled(Boolean value)
value
- The new value of the flag indicating the processor is enabled by default or null
.isDefaultEnabled()
public final boolean isEnabled()
true
, if the processor is enabled; false
, if the processor is disabled.isDefaultEnabled()
,
setEnabled(java.lang.Boolean)
public final void setEnabled(Boolean value)
value
- The new value of the flag indicating the processor is enabled or null
.isEnabled()
public static int getDefaultOrdinal()
The default ordinal number is controlled by system property
org.jomc.modlet.DefaultModletProvider.defaultOrdinal
holding the default ordinal number of the processor.
If that property is not set, the 0
default is returned.
setDefaultOrdinal(java.lang.Integer)
public static void setDefaultOrdinal(Integer value)
value
- The new default ordinal number of the processor or null
.getDefaultOrdinal()
public final int getOrdinal()
getOrdinal
in interface ModletProcessor
getDefaultOrdinal()
,
setOrdinal(java.lang.Integer)
public final void setOrdinal(Integer value)
value
- The new ordinal number of the processor or null
.getOrdinal()
public static String getDefaultTransformerLocation()
The default transformer location is controlled by system property
org.jomc.modlet.DefaultModletProcessor.defaultTransformerLocation
holding the location to search
for transformer resources by default. If that property is not set, the META-INF/jomc-modlet.xsl
default
is returned.
setDefaultTransformerLocation(java.lang.String)
public static void setDefaultTransformerLocation(String value)
value
- The new default location to search for transformer resources or null
.getDefaultTransformerLocation()
public final String getTransformerLocation()
getDefaultTransformerLocation()
,
setTransformerLocation(java.lang.String)
public final void setTransformerLocation(String value)
value
- The new location to search for transformer resources or null
.getTransformerLocation()
public List<Transformer> findTransformers(ModelContext context, String location) throws ModelException
context
- The context to search for transformers.location
- The location to search at.location
in context
or null
, if no transformers are
found.NullPointerException
- if context
or location
is null
.ModelException
- if getting the transformers fails.public Modlets processModlets(ModelContext context, Modlets modlets) throws ModelException
Modlet
s with a context.processModlets
in interface ModletProcessor
context
- The context to process Modlets
with.modlets
- The Modlets
currently being processed.Modlets
or null
.ModelException
- if processing Modlets
fails.isEnabled()
,
getTransformerLocation()
,
findTransformers(org.jomc.modlet.ModelContext, java.lang.String)
,
ENABLED_ATTRIBUTE_NAME
,
TRANSFORMER_LOCATION_ATTRIBUTE_NAME
Copyright © 2005–2014 The JOMC Project. All rights reserved.