org.jboss.deployment
Class SuffixOrderHelper

java.lang.Object
  extended by org.jboss.deployment.SuffixOrderHelper

public final class SuffixOrderHelper
extends Object

SuffixOrderHelper. This class wraps the SuffixOrder and EnhandedSuffixes attributes of MainDeployer.

Version:
$Revision: 1.1.2.5 $
Author:
Dimitris Andreadis

Nested Class Summary
static class SuffixOrderHelper.EnhancedSuffix
          Inner class that encapsulates an enhanceSuffix consisting of suffix + order
 
Field Summary
static String[] DEFAULT_ENHANCED_SUFFIXES
          Default EnhancedSuffixes Those values are indicative - we just know they'll work with the compiled order of subdeployers like the aop or ejb3, but any order can be set using the EnhancedSuffixes attribute and/or the individual subdeployer's relative order.
static int DEFAULT_RELATIVE_ORDER
          A default relative order just before 900:.last
static org.jboss.logging.Logger log
          The Logger
 
Constructor Summary
SuffixOrderHelper(DeploymentSorter sorter)
           
 
Method Summary
 void addEnhancedSuffixes(String[] enhancedSuffixes)
          Add the specified enhanced suffixes in the correct position(s) and regenerate the SuffixOrder, if needed.
 void addSuffixes(String[] suffixes, int relativeOrder)
          Insert the specified suffixes in the correct position and regenerate the SuffixOrder array, if needed.
 String[] getEnhancedSuffixes()
          Getter for the EnhancedSuffixes attribute
 String[] getSuffixOrder()
          Getter only for the SuffixOrder as known by the MainDeployer and the Scanners The value is updated during init() with suffixes that remain constant.
 void initialize()
          Initialise the SuffixOrder from EnhancedSuffixes.
 void removeEnhancedSuffixes(String[] enhancedSuffixes)
          Remove the enhanced suffixes if they are not marked as static and regenerate the SuffixOrder, if needed.
 void removeSuffixes(String[] suffixes, int relativeOrder)
          Remove the specified suffixes if they are not marked as static and regenerate the SuffixOrder, if needed.
 void setEnhancedSuffixes(String[] enhancedSuffixes)
          Setter for the EnhancedSuffixes attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENHANCED_SUFFIXES

public static final String[] DEFAULT_ENHANCED_SUFFIXES
Default EnhancedSuffixes Those values are indicative - we just know they'll work with the compiled order of subdeployers like the aop or ejb3, but any order can be set using the EnhancedSuffixes attribute and/or the individual subdeployer's relative order. The commented out entries indicate those are dynamically added by their respective subdeployers when they register.


DEFAULT_RELATIVE_ORDER

public static final int DEFAULT_RELATIVE_ORDER
A default relative order just before 900:.last

See Also:
Constant Field Values

log

public static final org.jboss.logging.Logger log
The Logger

Constructor Detail

SuffixOrderHelper

public SuffixOrderHelper(DeploymentSorter sorter)
Method Detail

getSuffixOrder

public String[] getSuffixOrder()
Getter only for the SuffixOrder as known by the MainDeployer and the Scanners The value is updated during init() with suffixes that remain constant. After that suffixes are added/removed using the corresponding methods.

Returns:
the SuffixOrder string array

getEnhancedSuffixes

public String[] getEnhancedSuffixes()
Getter for the EnhancedSuffixes attribute

Returns:
the EnhancedSuffixes string array

setEnhancedSuffixes

public void setEnhancedSuffixes(String[] enhancedSuffixes)
Setter for the EnhancedSuffixes attribute

Parameters:
enhancedSuffixes - the EnhancedSuffixes string array

initialize

public void initialize()
Initialise the SuffixOrder from EnhancedSuffixes. If no enchangedSuffixes is specified, DEFAULT_ENHANCED_SUFFIXES will be used. Individual entries may contain an additional order element of the form [order:]suffix, e.g. 100:.sar The suffixes specified during init, will remain constant, i.e. they can't be overriden or removed.


addEnhancedSuffixes

public void addEnhancedSuffixes(String[] enhancedSuffixes)
Add the specified enhanced suffixes in the correct position(s) and regenerate the SuffixOrder, if needed. A suffix that exists already and is marked as static will be skipped. Otherwise, duplicate entries are allowed.


addSuffixes

public void addSuffixes(String[] suffixes,
                        int relativeOrder)
Insert the specified suffixes in the correct position and regenerate the SuffixOrder array, if needed. A suffix that exists already and is marked as static will be skipped. Otherwise, duplicate entries are allowed.


removeEnhancedSuffixes

public void removeEnhancedSuffixes(String[] enhancedSuffixes)
Remove the enhanced suffixes if they are not marked as static and regenerate the SuffixOrder, if needed.


removeSuffixes

public void removeSuffixes(String[] suffixes,
                           int relativeOrder)
Remove the specified suffixes if they are not marked as static and regenerate the SuffixOrder, if needed.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.