|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gxos.Defaults
Provides utility methods.
$Id: Defaults.java,v 1.32 2001/10/19 03:22:49 balsoy Exp $
Field Summary | |
static java.lang.String |
CONTEXT_LOADINITIALLY
TreeContext parameter to decide if the objects in a collection will be brought to the memory. |
static java.lang.String |
CONTEXT_LOADINITIALLY_NO
|
static java.lang.String |
CONTEXT_LOADINITIALLY_YES
|
static java.lang.String |
GXOS_CONFIG
GXOS configuration file variable. |
static java.lang.String |
GXOS_CONFIG_FILE
Default GXOS configuration file name, which is gxos.conf . |
static java.lang.String |
GXOS_EXT
Extension to names for Garnet objects. |
static java.lang.String |
GXOS_NAMESPACE
Top level GXOS namespace name. |
static java.lang.String |
GXOS_ROOT_PREFIX
Prefix for GXOS names, i.e. |
static java.lang.String |
GXOS_SUBJNDI_CONTEXTFACTORY
Default sub JNDI provider initial context factory. |
static java.lang.String |
GXOS_SUBJNDI_PROVIDER_URL
The provider URL for the sub JNDI. |
static java.lang.String |
GXOS_SUBJNDI_PROVIDER_VAR
Environment variable to look for the sub JNDI provider URL. |
static java.lang.String |
GXOS_SUBJNDI_VAR
Environment variable to look for the sub JNDI. |
static java.lang.String |
NEW_GXOS_OBJECTS
Header for new GXOS object section. |
static java.lang.String |
NEW_GXOS_OBJECTS_NUMBER
|
static java.lang.String |
NODEVERSION
Current version of the schema. |
static java.lang.String |
PERSONAL_INFO_IMPL
Personal Information implementer class. |
Constructor Summary | |
Defaults()
|
Method Summary | |
static boolean |
addChild(TreeObject parent,
TreeObject child)
Adds a child object to another object's child list. |
static boolean |
addLink(TreeObject parent,
java.lang.String child)
Adds a child object as a link to another object's child list. |
static java.util.Properties |
getConfiguration(java.lang.String fileName)
Returns a Properties object for the given configuration
file. |
static java.lang.String |
getFullNameString(Entity gx)
|
static java.lang.String |
getObjectName(java.lang.String name)
|
static Configuration |
getXMLConfiguration(java.lang.String fileName)
Returns a object for the given configuration
file. |
static TreeObject |
initEntity(TreeObject gx,
java.lang.String name,
NodeTypeType type,
NodeRootingType rooting)
Initializes GXOS object with current version number and time. |
static void |
marshal(TreeObject object,
java.io.Writer writer)
Outputs the XML content of a GXOS object into a writer. |
static TreeObject |
nodeUpdated(TreeObject gx)
Updates {@see NodeUpdateTime} property of this GXOS object. |
static boolean |
removeChild(TreeObject parent,
java.lang.String childName)
Removes a child object's name from it's parent's child list. |
static boolean |
removeChild(TreeObject parent,
TreeObject child)
Removes a child object from it's parent's child list, and sets the child's parent object to null. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String GXOS_NAMESPACE
public static final java.lang.String GXOS_CONFIG
public static final java.lang.String GXOS_CONFIG_FILE
gxos.conf
.public static final java.lang.String NODEVERSION
TreeObject
public static final java.lang.String GXOS_ROOT_PREFIX
public static final java.lang.String GXOS_SUBJNDI_CONTEXTFACTORY
public static final java.lang.String GXOS_SUBJNDI_VAR
public static final java.lang.String GXOS_SUBJNDI_PROVIDER_URL
public static final java.lang.String GXOS_SUBJNDI_PROVIDER_VAR
public static final java.lang.String GXOS_EXT
public static final java.lang.String CONTEXT_LOADINITIALLY
public static final java.lang.String CONTEXT_LOADINITIALLY_YES
public static final java.lang.String CONTEXT_LOADINITIALLY_NO
public static final java.lang.String PERSONAL_INFO_IMPL
public static final java.lang.String NEW_GXOS_OBJECTS
public static final java.lang.String NEW_GXOS_OBJECTS_NUMBER
Constructor Detail |
public Defaults()
Method Detail |
public static TreeObject initEntity(TreeObject gx, java.lang.String name, NodeTypeType type, NodeRootingType rooting)
gx
- Garnet object that needs to be initialized. This object is not created in this method.
It has to be created before the method is called.name
- NodeName of this Garnet object.type
- NodeType of this Garnet object. See NodeTypeType for options.rooting
- Type of this node. See NodeRootingType for options.NodeTypeType
,
NodeRootingType
,
TreeObject
public static TreeObject nodeUpdated(TreeObject gx)
{@see NodeUpdateTime}
property of this GXOS object.gx
- GXOS object whose NodeUpdateTime property will be set to the
current time.public static boolean addChild(TreeObject parent, TreeObject child)
parent
- Parent object of which a child to be added.child
- Child object to be added.TreeObject
public static boolean removeChild(TreeObject parent, java.lang.String childName)
parent
- Parent object whose child link will be removed.child
- Name of the child object to be removed.TreeObject
public static boolean removeChild(TreeObject parent, TreeObject child)
parent
- Parent object whose child link will be removed.child
- Child object to be removed.TreeObject
public static void marshal(TreeObject object, java.io.Writer writer) throws GxException
object
- GXOS object to be marshaled.writer
- writer object to which object's content will be output.GxException
- if a marshalling error is encountered.public static boolean addLink(TreeObject parent, java.lang.String child)
parent
- parent object of which a child link to be added.child
- name of the child object to be linked. This should be a
valid GXOS name i.e. child, //obj1/obj2/child or namespace:childLinkNode
public static java.util.Properties getConfiguration(java.lang.String fileName) throws GxException
Properties
object for the given configuration
file.fileName
- The file name can be either /home/username/gxos/myconfig.txt
,myconfigs/gxos/gxos.conf
,
./gxos.conf
,
or just gxos.conf
.
GXOS_CONFIG_FILE
, and searched for
in the CLASSPATH
.public static Configuration getXMLConfiguration(java.lang.String fileName) throws GxException
Configuration
object for the given configuration
file.
fileName
- The file name can be either /home/username/gxos/gxosconfig.xml
,myconfigs/gxos/gxosconfig.xml
,
./gxos.conf
,
or just gxosconfig.xml
.
GXOS_CONFIG_FILE
, and searched for
in the CLASSPATH
.Configuration
.public static java.lang.String getFullNameString(Entity gx)
public static java.lang.String getObjectName(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |