org.jboss.deployers.plugins.structure
Class ContextInfoImpl

java.lang.Object
  extended by org.jboss.deployers.spi.attachments.helpers.PredeterminedManagedObjectAttachmentsImpl
      extended by org.jboss.deployers.plugins.structure.ContextInfoImpl
All Implemented Interfaces:
Externalizable, Serializable, PredeterminedManagedObjectAttachments, ContextInfo

public class ContextInfoImpl
extends PredeterminedManagedObjectAttachmentsImpl
implements ContextInfo, Externalizable

ContextInfoImpl.

Version:
$Revision: 1.1 $
Author:
Adrian Brock, Ales Justin, Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jboss.deployers.spi.structure.ContextInfo
DEFAULT_METADATA_PATH
 
Constructor Summary
ContextInfoImpl()
          Create a new ContextInfoImpl.
ContextInfoImpl(String path)
          Create a new ContextInfoImpl.
ContextInfoImpl(String path, List<ClassPathEntry> classPath)
          Create a new ContextInfoImpl.
ContextInfoImpl(String path, List<String> metaDataPath, List<ClassPathEntry> classPath)
          Create a new ContextInfoImpl.
ContextInfoImpl(String path, String metaDataPath, List<ClassPathEntry> classPath)
          Create a new ContextInfoImpl.
 
Method Summary
 void addClassPathEntry(ClassPathEntry entry)
          Add a class path entry
 void addMetaDataPath(String path)
          Add the metaDataPath.
 boolean equals(Object obj)
           
 List<ClassPathEntry> getClassPath()
          Get the classpath locations within the context
 String getComparatorClassName()
          The comparator class name, the class must implement
 List<String> getMetaDataPath()
          Get the logical path of the metdata location.
 ModificationType getModificationType()
          Get the modification type.
 String getPath()
          Get the logical path of the context
 int getRelativeOrder()
          Get the relative order of this context
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 void setClassPath(List<ClassPathEntry> classPath)
          Set the classPath.
 void setComparatorClassName(String className)
          The comparator class name, the class must implement
 void setMetaDataPath(List<String> metaDataPath)
          Set the meta data paths.
 void setModificationType(ModificationType modificationType)
          Set the modification type.
 void setPath(String path)
          Set the path.
 void setRelativeOrder(int relativeOrder)
          Set the relative order of this context
 String toString()
           
protected  void toString(StringBuilder builder)
          For subclasses to override toString()
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.jboss.deployers.spi.attachments.helpers.PredeterminedManagedObjectAttachmentsImpl
getPredeterminedManagedObjects, setPredeterminedManagedObjects
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.deployers.spi.attachments.PredeterminedManagedObjectAttachments
getPredeterminedManagedObjects, setPredeterminedManagedObjects
 

Constructor Detail

ContextInfoImpl

public ContextInfoImpl()
Create a new ContextInfoImpl.


ContextInfoImpl

public ContextInfoImpl(String path)
Create a new ContextInfoImpl.

Parameters:
path - the path
Throws:
IllegalArgumentException - for a null path

ContextInfoImpl

public ContextInfoImpl(String path,
                       List<ClassPathEntry> classPath)
Create a new ContextInfoImpl.

Parameters:
path - the path
classPath - the classpath
Throws:
IllegalArgumentException - for a null path

ContextInfoImpl

public ContextInfoImpl(String path,
                       String metaDataPath,
                       List<ClassPathEntry> classPath)
Create a new ContextInfoImpl.

Parameters:
path - the path
metaDataPath - a single metadata path
classPath - the class path
Throws:
IllegalArgumentException - for a null path or metadata path

ContextInfoImpl

public ContextInfoImpl(String path,
                       List<String> metaDataPath,
                       List<ClassPathEntry> classPath)
Create a new ContextInfoImpl.

Parameters:
path - the path
metaDataPath - the metadata paths
classPath - the class path
Throws:
IllegalArgumentException - for a null path or metadata path
Method Detail

getPath

public String getPath()
Description copied from interface: ContextInfo
Get the logical path of the context

Specified by:
getPath in interface ContextInfo
Returns:
the logical path

setPath

public void setPath(String path)
Set the path.

Parameters:
path - the path.
Throws:
IllegalArgumentException - for a null path

getMetaDataPath

public List<String> getMetaDataPath()
Description copied from interface: ContextInfo
Get the logical path of the metdata location.

Specified by:
getMetaDataPath in interface ContextInfo
Returns:
the path of the metdata location.

setMetaDataPath

public void setMetaDataPath(List<String> metaDataPath)
Set the meta data paths.

Parameters:
metaDataPath - the meta data paths

addMetaDataPath

public void addMetaDataPath(String path)
Description copied from interface: ContextInfo
Add the metaDataPath.

Specified by:
addMetaDataPath in interface ContextInfo
Parameters:
path - the metaDataPath.

getClassPath

public List<ClassPathEntry> getClassPath()
Description copied from interface: ContextInfo
Get the classpath locations within the context

Specified by:
getClassPath in interface ContextInfo
Returns:
the possibly null context classpath

setClassPath

public void setClassPath(List<ClassPathEntry> classPath)
Set the classPath.

Parameters:
classPath - the classPath.

addClassPathEntry

public void addClassPathEntry(ClassPathEntry entry)
Description copied from interface: ContextInfo
Add a class path entry

Specified by:
addClassPathEntry in interface ContextInfo
Parameters:
entry - the entry to add

getComparatorClassName

public String getComparatorClassName()
Description copied from interface: ContextInfo
The comparator class name, the class must implement
 java.util.Comparator
 
If the class has a public static field called "INSTANCE" then that will be used rather than creating a new object.

If none is given then the deployments are ordered by their relative order and then path/simple name.

Specified by:
getComparatorClassName in interface ContextInfo
Returns:
the comparator class name

setComparatorClassName

public void setComparatorClassName(String className)
Description copied from interface: ContextInfo
The comparator class name, the class must implement

Specified by:
setComparatorClassName in interface ContextInfo
Parameters:
className - the comparator class name

getRelativeOrder

public int getRelativeOrder()
Description copied from interface: ContextInfo
Get the relative order of this context

Specified by:
getRelativeOrder in interface ContextInfo
Returns:
the relative order

setRelativeOrder

public void setRelativeOrder(int relativeOrder)
Description copied from interface: ContextInfo
Set the relative order of this context

Specified by:
setRelativeOrder in interface ContextInfo
Parameters:
relativeOrder - the relative order

getModificationType

public ModificationType getModificationType()
Description copied from interface: ContextInfo
Get the modification type.

Specified by:
getModificationType in interface ContextInfo
Returns:
the modification type

setModificationType

public void setModificationType(ModificationType modificationType)
Description copied from interface: ContextInfo
Set the modification type.

Specified by:
setModificationType in interface ContextInfo
Parameters:
modificationType - the modification type

toString

public String toString()
Overrides:
toString in class Object

toString

protected void toString(StringBuilder builder)
For subclasses to override toString()

Parameters:
builder - the builder

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class PredeterminedManagedObjectAttachmentsImpl
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class PredeterminedManagedObjectAttachmentsImpl
Parameters:
out - the output
Throws:
IOException - for any error


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.