|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.grid.jgdi.util.shell.editor.GEObjectEditor
public class GEObjectEditor
GEObject editor is a class for editing any GEObject based on text. This text
will be parsed. If it's format is valid atrributes that were provided will be
updated based on the values next to the attribute.
Less coding when creating a new GeObject:
ClusterQueue geObj = new ClusterQueue(true);
GEObjectEditor.updateObjectWithText(jgdi, geObj, "name test\n acl user1 user2\n xacl user3");
or
GEObjectEditor.updateObjectWithText(geObj, "name test\n acl user1 user2\n xacl user3");
jgdi.addClusterQueue(geObj);
Only difference between these methods is that whenJGDI reference is passed attributes
are checked if they are known to Grid Engine and their structure is more advaced,
they are retrived.
Such as can have ...
While when not passing JGDI reference, new Objects are created with default values.
This can lead to unexpected behaviour when you try to update already existing object
or even create a new one.
RECOMMENDED IS TO USE updateObjectWithText(JGDI jgdi, GEObject obj, String text)
method.
Modifying existing GEObjects:
ClusterQueue geObj = jgdi.getClusterQueue("test");
GEObjectEditor.updateObjectWithText(jgdi, geObj, "xacl user4");
jgdi.updateClusterQueue(geObj);
Constructor Summary | |
---|---|
GEObjectEditor()
|
Method Summary | ||
---|---|---|
static java.lang.String |
getAllPropertiesAsText(GEObject obj)
Retrives all properties known to JGDI for specified GEObject as text. |
|
static java.lang.String |
getConfigurablePropertiesAsText(GEObject obj)
Retrives configurable properties for specified GEObject as text. |
|
static java.lang.String |
getPropertiesAsText(GEObject obj,
int propScope)
|
|
static java.lang.String |
getPropertyAsText(GEObject obj,
int propScope,
java.lang.String propName)
|
|
static java.lang.String |
getReadOnlyPropertiesAsText(GEObject obj)
Retrives read-only properties for specified GEObject as text. |
|
static void |
main(java.lang.String[] args)
|
|
static
|
updateObjectWithText(JGDI jgdi,
T obj,
java.lang.String text)
Updates GEObject based on the text. |
|
static
|
updateObjectWithText(T obj,
java.lang.String text)
Updates GEObject based on the text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GEObjectEditor()
Method Detail |
---|
public static <T extends GEObject> T updateObjectWithText(T obj, java.lang.String text)
updateObjectWithText(JGDI jgdi, GEObject obj, String text)
that retrieves these objects from Grid Engine instead.
public static <T extends GEObject> T updateObjectWithText(JGDI jgdi, T obj, java.lang.String text)
public static java.lang.String getAllPropertiesAsText(GEObject obj)
public static java.lang.String getConfigurablePropertiesAsText(GEObject obj)
public static java.lang.String getReadOnlyPropertiesAsText(GEObject obj)
public static java.lang.String getPropertiesAsText(GEObject obj, int propScope)
public static java.lang.String getPropertyAsText(GEObject obj, int propScope, java.lang.String propName) throws JGDIException
JGDIException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |