com.novell.zos.grid
Interface Fact

All Superinterfaces:
Cloneable, Serializable

public interface Fact
extends Serializable, Cloneable

The Fact object.

This contains accessors for setting and getting fact values and for describing a Fact.


Field Summary
static String ASCENDING_PREFIX
           
static String DESCENDING_PREFIX
           
static String GROUP_PREFIX
           
static String JOB_ARGS_PREFIX
           
static String JOB_INSTANCE_PREFIX
           
static String JOB_PREFIX
           
static String JOBLET_PREFIX
           
static String MATRIX_PREFIX
           
static String REPOSITORY_PREFIX
           
static String RESOURCE_PREFIX
           
static int TYPE_BOOLEAN
           
static int TYPE_BOOLEAN_ARRAY
           
static int TYPE_DATE
           
static int TYPE_DATE_ARRAY
           
static int TYPE_DICTIONARY
           
static int TYPE_INTEGER
           
static int TYPE_INTEGER_ARRAY
           
static int TYPE_LIST
           
static int TYPE_REAL
           
static int TYPE_REAL_ARRAY
           
static int TYPE_STRING
           
static int TYPE_STRING_ARRAY
           
static String[] TYPE_STRINGS
           
static int TYPE_TIME
           
static int TYPE_TIME_ARRAY
           
static int TYPE_UNKNOWN
           
static String USER_PREFIX
           
static String VMHOST_PREFIX
           
 
Method Summary
 void clearCache()
          Clear any existing cache value for this fact on current thread.
 boolean[] getBooleanArrayValue()
          Retrieve a boolean array fact value as a java boolean type.
 boolean getBooleanValue()
          Retrieve a boolean fact value as a java boolean type.
 Date[] getDateArrayValue()
          Retrieve a time array fact value as a java Date[] type.
 Date getDateValue()
          Retrieve a date fact value as a java Date type.
 String getDescription()
          Return a textual description of the purpose or content of this fact
 Map getDictionaryValue()
          Retrieve a dictionary fact value as a java Map type.
 String getFromText()
          Return short textual description of where this fact is from
 long[] getIntegerArrayValue()
          Retrieve an integer array fact value as a lone[] type.
 long getIntegerValue()
          Retrieve an integer fact value as a java long type.
 long getLastModified()
          Return last modified timestamp for this fact.
 List getListValue()
          Retrieve a list fact value as a java List type.
 String getName()
          Returns the full name of the fact.
 double[] getRealArrayValue()
          Retrieve a real array fact value as a java double[] type.
 double getRealValue()
          Retrieve a real fact value as a java double type.
 ID getSourceID()
          Returns the source ID for this fact.
 String[] getStringArrayValue()
          Retrieve a string array fact value as a java String[] type.
 String getStringValue()
          Retrieve a string fact value as a java String type.
 int[] getTimeArrayValue()
          Retrieve a time array fact value as a java long[] type.
 int getTimeValue()
          Retrieve a time fact value as a java long type.
 int getType()
          Returns the fact type.
 Object getValue()
          Returns the Object value for the fact.
 Object[] getValueArray()
          Returns the Object[] value for the fact.
 String getValueString()
          This is intended to provide a String representation of the value (or values) for simple display purposes.
 String getValueString(boolean verbose)
          This is intended to provide a String representation of the value (or values) for simple display purposes.
 String getValueXml()
          This is intended to provide an XML representation of the value (or values) for simple display purposes.
 boolean isArray()
           
 boolean isComputed()
           
 boolean isDeleteable()
           
 boolean isDynamic()
          Snapshot can create r/o vesions of dynamic facts thus we keep state
 boolean isLink()
           
 boolean isReadOnly()
           
 void setValue(boolean value)
          (Re)sets the BOOLEAN fact value to the supplied value.
 void setValue(boolean[] values)
          (Re)sets the BOOLEAN[] fact value to the supplied value.
 void setValue(Date value)
          (Re)sets the DATE fact value to the supplied value.
 void setValue(Date[] values)
          (Re)sets the DATE[] fact value to the supplied value.
 void setValue(double value)
          (Re)sets the REAL fact value to the supplied value.
 void setValue(double[] values)
          (Re)sets the REAL[] fact value to the supplied value.
 void setValue(float value)
          (Re)sets the REAL fact value to the supplied value.
 void setValue(float[] values)
          (Re)sets the REAL[] fact value to the supplied value.
 void setValue(int value)
          (Re)sets the INTEGER fact value to the supplied value.
 void setValue(int[] values)
          (Re)sets the INTEGER[] fact value to the supplied value.
 void setValue(List value)
          (Re)sets the LIST fact value to the supplied value.
 void setValue(long value)
          (Re)sets the INTEGER or TIME fact value to the supplied value.
 void setValue(long[] values)
          (Re)sets the INTEGER[] or TIME[] fact value to the supplied value.
 void setValue(Map value)
          (Re)sets the DICTIONARY fact value to the supplied value.
 void setValue(Object value)
          (Re)sets the fact value to the supplied value.
 String toString()
          Form complete formatted XML (policy syntax) document.
 String toXmlDocument(int indent)
          Form complete formatted XML (policy syntax) document with requested indent.
 

Field Detail

JOB_INSTANCE_PREFIX

static final String JOB_INSTANCE_PREFIX

JOB_ARGS_PREFIX

static final String JOB_ARGS_PREFIX

JOB_PREFIX

static final String JOB_PREFIX

JOBLET_PREFIX

static final String JOBLET_PREFIX

RESOURCE_PREFIX

static final String RESOURCE_PREFIX

USER_PREFIX

static final String USER_PREFIX

GROUP_PREFIX

static final String GROUP_PREFIX

MATRIX_PREFIX

static final String MATRIX_PREFIX

VMHOST_PREFIX

static final String VMHOST_PREFIX

REPOSITORY_PREFIX

static final String REPOSITORY_PREFIX

ASCENDING_PREFIX

static final String ASCENDING_PREFIX
See Also:
Constant Field Values

DESCENDING_PREFIX

static final String DESCENDING_PREFIX
See Also:
Constant Field Values

TYPE_UNKNOWN

static final int TYPE_UNKNOWN
See Also:
Constant Field Values

TYPE_STRING

static final int TYPE_STRING
See Also:
Constant Field Values

TYPE_INTEGER

static final int TYPE_INTEGER
See Also:
Constant Field Values

TYPE_REAL

static final int TYPE_REAL
See Also:
Constant Field Values

TYPE_BOOLEAN

static final int TYPE_BOOLEAN
See Also:
Constant Field Values

TYPE_TIME

static final int TYPE_TIME
See Also:
Constant Field Values

TYPE_DATE

static final int TYPE_DATE
See Also:
Constant Field Values

TYPE_LIST

static final int TYPE_LIST
See Also:
Constant Field Values

TYPE_DICTIONARY

static final int TYPE_DICTIONARY
See Also:
Constant Field Values

TYPE_STRING_ARRAY

static final int TYPE_STRING_ARRAY
See Also:
Constant Field Values

TYPE_INTEGER_ARRAY

static final int TYPE_INTEGER_ARRAY
See Also:
Constant Field Values

TYPE_REAL_ARRAY

static final int TYPE_REAL_ARRAY
See Also:
Constant Field Values

TYPE_BOOLEAN_ARRAY

static final int TYPE_BOOLEAN_ARRAY
See Also:
Constant Field Values

TYPE_TIME_ARRAY

static final int TYPE_TIME_ARRAY
See Also:
Constant Field Values

TYPE_DATE_ARRAY

static final int TYPE_DATE_ARRAY
See Also:
Constant Field Values

TYPE_STRINGS

static final String[] TYPE_STRINGS
Method Detail

getName

String getName()
Returns the full name of the fact.

Returns:
the name of the fact.

getType

int getType()
Returns the fact type.

Returns:
the fact type.

getValue

Object getValue()
                throws FactException
Returns the Object value for the fact. This may be a scalar or array type. Use isArray() or getType() to determine true fact type.

Returns:
the value of the fact.
Throws:
FactNotReadyException - if looking up a computed fact and the value is not available within the specified timeout.
FactException - if an error occurs getting the fact value. Typically this would be an error in a computed fact.

getValueArray

Object[] getValueArray()
                       throws FactException
Returns the Object[] value for the fact. This will throw a FactException if the value is not an array. It is provided only for covenience and generates a FactException rather than a ClassCastException.

Returns:
the value[] of the fact.
Throws:
FactNotReadyException - if looking up a computed fact and the value is not available within the specified timeout.
FactException - if an error occurs getting the fact value. Typically this would be an error in a computed fact.

getStringValue

String getStringValue()
                      throws FactException
Retrieve a string fact value as a java String type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getIntegerValue

long getIntegerValue()
                     throws FactException
Retrieve an integer fact value as a java long type.

Returns:
the Integer fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getRealValue

double getRealValue()
                    throws FactException
Retrieve a real fact value as a java double type.

Returns:
the Real fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getBooleanValue

boolean getBooleanValue()
                        throws FactException
Retrieve a boolean fact value as a java boolean type.

Returns:
the Boolean fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getTimeValue

int getTimeValue()
                 throws FactException
Retrieve a time fact value as a java long type.

Returns:
the Time fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getDateValue

Date getDateValue()
                  throws FactException
Retrieve a date fact value as a java Date type.

Returns:
the Time fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getDictionaryValue

Map getDictionaryValue()
                       throws FactException
Retrieve a dictionary fact value as a java Map type.

Returns:
the Dictionary fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getListValue

List getListValue()
                  throws FactException
Retrieve a list fact value as a java List type.

Returns:
the List fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getStringArrayValue

String[] getStringArrayValue()
                             throws FactException
Retrieve a string array fact value as a java String[] type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getIntegerArrayValue

long[] getIntegerArrayValue()
                            throws FactException
Retrieve an integer array fact value as a lone[] type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getRealArrayValue

double[] getRealArrayValue()
                           throws FactException
Retrieve a real array fact value as a java double[] type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getBooleanArrayValue

boolean[] getBooleanArrayValue()
                               throws FactException
Retrieve a boolean array fact value as a java boolean type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getTimeArrayValue

int[] getTimeArrayValue()
                        throws FactException
Retrieve a time array fact value as a java long[] type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

getDateArrayValue

Date[] getDateArrayValue()
                         throws FactException
Retrieve a time array fact value as a java Date[] type.

Returns:
the String fact value.
Throws:
FactNotReadyException - is the Fact is a computed fact and the value is not available within the specified timeout.
FactException - is the Fact is not a String type.

setValue

void setValue(Object value)
              throws FactException
(Re)sets the fact value to the supplied value. The fact type will not change and automatic coersion will be applied to the supplied value.

Parameters:
value - the Object fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(int value)
              throws FactException
(Re)sets the INTEGER fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(long value)
              throws FactException
(Re)sets the INTEGER or TIME fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(float value)
              throws FactException
(Re)sets the REAL fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(double value)
              throws FactException
(Re)sets the REAL fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(boolean value)
              throws FactException
(Re)sets the BOOLEAN fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(Date value)
              throws FactException
(Re)sets the DATE fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(Map value)
              throws FactException
(Re)sets the DICTIONARY fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(List value)
              throws FactException
(Re)sets the LIST fact value to the supplied value.

Parameters:
value - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(int[] values)
              throws FactException
(Re)sets the INTEGER[] fact value to the supplied value.

Parameters:
values - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(long[] values)
              throws FactException
(Re)sets the INTEGER[] or TIME[] fact value to the supplied value.

Parameters:
values - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(float[] values)
              throws FactException
(Re)sets the REAL[] fact value to the supplied value.

Parameters:
values - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(double[] values)
              throws FactException
(Re)sets the REAL[] fact value to the supplied value.

Parameters:
values - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(boolean[] values)
              throws FactException
(Re)sets the BOOLEAN[] fact value to the supplied value.

Parameters:
values - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

setValue

void setValue(Date[] values)
              throws FactException
(Re)sets the DATE[] fact value to the supplied value.

Parameters:
values - the new fact value.
Throws:
FactException - is the fact value cannot be set because the fact is a read-only fact or because there is a type mismatch.

getSourceID

ID getSourceID()
Returns the source ID for this fact. I.e. the "from" text.


getFromText

String getFromText()
Return short textual description of where this fact is from


getDescription

String getDescription()
Return a textual description of the purpose or content of this fact


isDynamic

boolean isDynamic()
Snapshot can create r/o vesions of dynamic facts thus we keep state


isLink

boolean isLink()

isComputed

boolean isComputed()

isArray

boolean isArray()

isReadOnly

boolean isReadOnly()

isDeleteable

boolean isDeleteable()

getLastModified

long getLastModified()
Return last modified timestamp for this fact.

Returns:
last modified timestamp in milliseconds

getValueXml

String getValueXml()
This is intended to provide an XML representation of the value (or values) for simple display purposes.


getValueString

String getValueString()
This is intended to provide a String representation of the value (or values) for simple display purposes.


getValueString

String getValueString(boolean verbose)
This is intended to provide a String representation of the value (or values) for simple display purposes.

Parameters:
verbose - if true, the longer more verbose display is used for Float, Time and Date values.
Returns:
String representation of fact

toString

String toString()
Form complete formatted XML (policy syntax) document.

Overrides:
toString in class Object
Returns:
xml document

toXmlDocument

String toXmlDocument(int indent)
Form complete formatted XML (policy syntax) document with requested indent.

Parameters:
indent - the indent to use for generated XML document.
Returns:
xml document

clearCache

void clearCache()
Clear any existing cache value for this fact on current thread.



Copyright 2008 Novell, Inc. All Rights Reserved.