|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGObject
com.tivoli.twg.engine.TWGPersistentObject
com.tivoli.twg.engine.TWGFilter
Base filter class for Director Server.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_ALL_ID
Default 'all' filter ID string |
static java.lang.String |
DEFAULT_NONE_ID
Default 'none' filter ID string |
static int |
FILTER_TYPE_FUNCTIONAL
Filter type = functional |
static int |
FILTER_TYPE_MOCLASS
Filter type = managed object class |
static int |
FILTER_TYPE_STATIC
Filter type = static |
static int |
FILTER_TYPE_TASK
Filter type = task |
Fields inherited from class com.tivoli.twg.engine.TWGPersistentObject |
---|
CLASS_NAME, SIZEOF_BYTE, SIZEOF_CHAR, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_SHORT |
Constructor Summary | |
---|---|
TWGFilter()
Default constructor : for restore |
|
TWGFilter(TWGFilterParms parms)
Constructor for dynamic, static, and task filters. |
|
TWGFilter(TWGFilterParms parms,
java.lang.String extensionClassName)
Constructor for dynamic, static, and task filters. |
Method Summary | |
---|---|
static void |
attachAllAllowedFilters(TWGActiveConsole con)
Attach console to all allowed filters |
void |
AttachObjectToConsole(TWGActiveConsole act_con)
Associate the object with the given TWGActiveConsole instance. |
void |
changeParms(TWGFilterParms parms)
Change the parameters for a dynamic database filter, a static filter, or a task filter |
void |
clearUserCustomized()
Clear user customized flag to false; |
TWGFilter |
copyFrom(TWGFilter sourceFilter)
Copies instance data from the source filter into this filter instance. |
void |
Delete()
Delete method : use to remove object from list |
void |
Destroy()
Object destroy - clean up persistent data for object |
static void |
detachAllDisallowedFilters(TWGActiveConsole con)
Detach all disallowed filters from console |
void |
DetachObjectFromAllConsoles()
Disassociate the object from all TWGActiveConsoles. |
void |
DetachObjectFromConsole(TWGActiveConsole act_con)
Disassociate the object from the given TWGActiveConsole instance. |
static TWGFilter |
findByGUID(com.tivoli.twg.engine.GlobalUniqueID guid)
Find filter instance by a Group Unique ID. |
static TWGFilter |
findByIDString(java.lang.String id)
Find filter instance by ID string |
static TWGFilter[] |
findByName(java.lang.String name,
java.util.Locale locale,
TWGFilter filterToSkip)
Find all filter instances by a single title. |
static TWGFilter |
findFilterByName(java.lang.String n)
Find filter by name |
java.lang.String[] |
getAttributeIDList()
Attribute ID enumeration : this method is expected to return a List of strings containing the String names of the attributes supported for a given object. |
int |
getAttributeType(java.lang.String id)
Get type of attribute value for given attribute |
DataValue |
getAttributeValue(java.lang.String id,
java.util.Locale loc)
Get value of attribute with given ID |
java.lang.String |
GetConShadowClass()
Get name of console shadow class. |
TWGFilterConstraints |
getConstraints()
Get the constraints for this filter. |
java.util.Date |
getDateCreated()
Get date when filter was created. |
java.util.Date |
getDateLastUpdated()
Get date when filter was last updated. |
StringValueSet |
getDBTableTokens()
Get database table tokes for filter (if any) |
static TWGFilter |
getDefault()
Get default filter instance : this function is only valid after initBuiltInFilters() is called. |
java.lang.String |
getExtensionClassName()
Get the name of the extension class that defined this filter. |
com.tivoli.twg.engine.GlobalUniqueID |
getGUID()
Get group unique ID |
java.lang.String |
getIDString()
Get ID string |
int |
getImageSet()
Get image set. |
static java.lang.String |
getLocalSystemName()
Return the unique ID of the system we are executing on at the moment. |
static long |
getLocalUniqueID()
Return the unique ID ofthe server we are executing on at the moment. |
TWGManagedObjectSet |
getManagedObjectSet()
Get reference to managed object set maintained by filter (if active) |
java.lang.String |
getMOClassName()
Get name of managed object class for MOCLASS filter |
java.lang.String |
getName()
Get name of filter (use default locale) |
java.lang.String |
getName(java.util.Locale loc)
Get name of filter (using given locale) |
java.lang.Object |
getNameNLSString()
Get the nlsString value to be used for a translated name. |
static TWGFilter |
getNone()
Get 'none' filter instance : this function is only valid after initBuiltInFilters() is called. |
protected byte[] |
getSaveDataBuffer()
Method for saving persistent object data into a byte buffer. |
protected byte[] |
getSaveDataBuffer(boolean forPersist)
Method for saving persistent object data into a byte buffer. |
byte[] |
GetShadowRecord(java.util.Locale locale)
Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class. |
long |
GetShadowVersion()
Get object state version. |
StringValueSet |
getTaskIDs()
Get the task IDs for this filter. |
int |
getType()
Get type of filter |
boolean |
getUserCustomized()
Returns user customized flag. |
static void |
handleFilterSubscribe(Command cmd)
Handler for external filter subscribe command |
static void |
handleFilterUnsubscribe(Command cmd)
Handler for external filter unsubscribe command |
static boolean |
idStringExists(java.lang.String id)
Determines if an id string exists in the current filter pool. |
static void |
initBuiltInFilters()
Initialize built-in filter instances, if needed. |
static void |
initDefaultImages()
Initialize default images for dynamic and static filters |
static void |
initImportExporter()
Initialize filter set import and export processor. |
boolean |
isActive()
Return true if filter is active |
static boolean |
isAnyTaskFilterActive()
Test if any task based filter is active |
boolean |
isConsoleDeletable()
Test if managed object is console deletable |
boolean |
isConsoleHidden()
Test if filter is hidden to console |
boolean |
isDefault()
Test if filter is global default ('all') filter |
boolean |
isFunctional()
Test if filter is functional filter |
boolean |
isManagedObjectSetValid()
Test if filter's MOS is currently valid |
boolean |
isMOClass()
Test if filter is managed object class filter |
boolean |
isNone()
Test if filter is global none filter |
boolean |
isReadOnly()
Test if filter is read-only |
boolean |
isStatic()
Test if filter is static filter |
boolean |
isTaskFilter()
Test if filter is task filter |
static void |
makeDefaultMOFFilter(TWGManagedObjectFactory mof)
Build default filter for given MOF, if not yet created |
static java.lang.String |
makeIDStringUnique(java.lang.String id)
Makes the idString passed in as a parameter unique to the filter pool by appending a suffix counter to the end of the string. |
boolean |
makeTitleUnique(java.util.Locale locale)
Analyse the filter title to see if it is a duplicate of an existing filter. |
void |
notifySubscribersOfChange(IntValueSet add_set,
IntValueSet chg_set,
IntValueSet del_set)
Notify all of the subscribers of a set of adds, changes, and deletes |
void |
processNewChangedManagedObjects(IntValueSet obj_ids,
IntValueSet ids_to_include)
Primary processing method for TWGFilter : this method is called, and provided with set of TWGManagedObject IDs which have been added or changed. |
void |
processNewChangedManagedObjects(IntValueSet obj_ids,
IntValueSet ids_to_include,
StringValueSet db_tables)
Primary processing method for TWGFilter : this method is called, and provided with set of TWGManagedObject IDs which have been added or changed. |
static void |
processNewChangedManagedObjectsForAllFilters(IntValueSet new_set,
IntValueSet chg_set,
IntValueSet activated_flt)
Do processing of given add and update sets for all active filters |
static void |
processNewChangedManagedObjectsForAllFilters(IntValueSet new_set,
IntValueSet chg_set,
IntValueSet activated_flt,
StringValueSet db_tables)
Do processing of given add and update sets for all active filters |
protected void |
restoreData(TWGPersistentObjectDictionary dict,
boolean do_resolve)
Restore method for filter object |
protected void |
restoreDataFromBuffer(byte[] buf,
boolean makePublic,
boolean reportErrors,
boolean makeIDStringUnique)
Restore from data buffer method for filter object. |
protected void |
saveData(TWGPersistentObjectDictionary dict)
Method for saving persistent object data. |
boolean |
setAttributeValue(java.lang.String id,
DataValue val)
Set value of attribute with given ID |
void |
setConsoleDeletable(boolean flg)
Set managed object 'console deletable' flag (default is deletable) |
void |
setConsoleHidden(boolean flg)
Set filter 'console hidden' flag (default is not hidden) |
void |
setExtensionClassName(java.lang.String extensionClassName)
Set the name of the extension class that defined this filter. |
void |
setGUID(com.tivoli.twg.engine.GlobalUniqueID newID)
Set Global unique ID |
boolean |
setIDString(java.lang.String new_id)
Set ID string |
void |
setImageSet(int oid)
Set image set. |
void |
setMOClassName(java.lang.String new_mo)
Set managed object class for MOCLASS filters |
void |
setName(java.lang.String n)
Set name of filter |
void |
setName(java.lang.String nameid,
java.lang.String namerb)
Set name of filter using resouce bundle name and ID |
void |
SetObjectID(long oid)
Set object ID. |
void |
setReadOnly(boolean flg)
Set read-only flag |
void |
setSubName(java.lang.String n)
Set sub-name of filter : used for parm '{0}' in name string |
void |
setType(int new_t)
Set type of filter |
void |
setUserCustomized()
Set user customized flag to true; |
void |
subscribeConsoleToFilter(TWGActiveConsole con)
Subscribe console to filter |
void |
subscribeToFilter(TWGFilterSubscriber sub)
Subscribe to filter |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
touchDateLastUpdated()
Set "dateLastUpdated" to current time. |
void |
unsubscribeAllFilterSubscribers()
Remove all subscribers from filter |
void |
unsubscribeConsoleFromFilter(TWGActiveConsole con)
Unsubscribe console from filter |
void |
unsubscribeFromFilter(TWGFilterSubscriber sub)
Unsubscribe from filter |
void |
UpdateShadowVersion()
Update object state version. |
protected static void |
verifyAll()
This method should be by the Director Server engine during server initialization. |
Methods inherited from class com.tivoli.twg.engine.TWGPersistentObject |
---|
enableAsyncWrites, fromPersistID, initialize, isNewPersistentStore, isSaveRequired, PersistID, restore, restoreAll, save, save, setSaveRequired, terminate, toPersistID |
Methods inherited from class com.tivoli.twg.engine.TWGObject |
---|
AllObjects, AllObjects, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FILTER_TYPE_FUNCTIONAL
public static final int FILTER_TYPE_STATIC
public static final int FILTER_TYPE_MOCLASS
public static final int FILTER_TYPE_TASK
public static final java.lang.String DEFAULT_ALL_ID
public static final java.lang.String DEFAULT_NONE_ID
Constructor Detail |
public TWGFilter()
public TWGFilter(TWGFilterParms parms) throws TWGFilterException
parms
- - the parameters for the filter
TWGFilterException
- for any error creating the filterTWGFilterParms
public TWGFilter(TWGFilterParms parms, java.lang.String extensionClassName) throws TWGFilterException
parms
- - the parameters for the filterextensionClassName
- - the name of the extension class
instantiating this filter
TWGFilterException
- for any error creating the filterTWGFilterParms
Method Detail |
public void changeParms(TWGFilterParms parms) throws TWGFilterException
TWGFilterException
- for any error updating the filterTWGFilterParms
public final java.lang.String getExtensionClassName()
public final void setExtensionClassName(java.lang.String extensionClassName)
public void Delete()
Delete
in class TWGObject
public void Destroy() throws TWGObjectDestroyException
Destroy
in class TWGPersistentObject
TWGObjectDestroyException
- if error during destroyprotected void saveData(TWGPersistentObjectDictionary dict) throws TWGPersistentObjectSaveException
saveData
in class TWGPersistentObject
dict
- - dictionary used to accumulate data
TWGPersistentObjectSaveException
- thrown to
abort save procedure.protected byte[] getSaveDataBuffer() throws TWGPersistentObjectSaveException
TWGPersistentObjectSaveException
protected byte[] getSaveDataBuffer(boolean forPersist) throws TWGPersistentObjectSaveException
TWGPersistentObjectSaveException
protected void restoreData(TWGPersistentObjectDictionary dict, boolean do_resolve) throws TWGPersistentObjectRestoreException
restoreData
in class TWGPersistentObject
dict
- - dictionary containing data to be restoreddo_resolve
- - true if second pass of restore (do resolve)
TWGPersistentObjectRestoreException
- if restore abortedprotected void restoreDataFromBuffer(byte[] buf, boolean makePublic, boolean reportErrors, boolean makeIDStringUnique) throws TWGPersistentObjectRestoreException
buf
- - buffer containing saved filter to be restored. This buffer
must have been created using the "getDataSaveBuffer" method.makePublic
- - boolean indicating if instanciated filter will be made
public to the server community. true=make the filter public. Not making the
filter public is used when you want to instanciate a filter to test for
errors before making the filter public. This "non public" function is used by
the filter import to test for filter correctness before the filter is actually
imported. Normally however, you will set the paraeter to "true" hence making the
filter public to the server.reportErrors
- - boolean indicating if you desire exceptions to be thrown
when erors are found. Exceptions are expected when filters are instanciated and
made public to the server such as during persistance data store processing at
server launch time. Hence, if an error is found (for example,name space collision)
all further processing is stopped, the exception is thrown and the
filter instance is not fully instanciated. During filter importing however, the filter
must be instanciated but not made public so analysis can be performed on the filter
prior to actually making the filter public. So that the filter can be instanciated and
tested, these exceptions must be disabled.makeIDStringUnique
- - boolean indicating if you desire that the filter's
IDString be made unique by appending a numeric suffix onto its end. true= make
the id strinf unique. False = do not make the id unique. If there is a duplicate,
an exception s thrown. Typically this parameter should be false. It is set
true during filter import processing.
TWGPersistentObjectRestoreException
- if restore aborted and
"reportErrors" is truepublic void UpdateShadowVersion()
UpdateShadowVersion
in interface TWGBaseShadowedObject
public long GetShadowVersion()
GetShadowVersion
in interface TWGBaseShadowedObject
public java.lang.String GetConShadowClass()
GetConShadowClass
in interface TWGBaseShadowedObject
public byte[] GetShadowRecord(java.util.Locale locale)
GetShadowRecord
in interface TWGBaseShadowedObject
locale
- - Locale of requested data
public java.lang.String getName()
public java.lang.String getName(java.util.Locale loc)
loc
- - locale of request
public void setName(java.lang.String n)
n
- - new namepublic void setSubName(java.lang.String n)
n
- - new sub-namepublic void setName(java.lang.String nameid, java.lang.String namerb)
nameid
- - identifier for namenamerb
- - name of resouce bundle containing namepublic java.util.Date getDateCreated()
public java.util.Date getDateLastUpdated()
public com.tivoli.twg.engine.GlobalUniqueID getGUID()
public int getType()
public void setType(int new_t)
new_t
- - new value for type fieldpublic boolean isReadOnly()
public boolean isDefault()
public boolean isNone()
public boolean isStatic()
public boolean isTaskFilter()
public boolean isMOClass()
public boolean isFunctional()
public static boolean isAnyTaskFilterActive()
public static TWGFilter getDefault()
public static TWGFilter getNone()
public java.lang.String getIDString()
public boolean setIDString(java.lang.String new_id)
new_id
- - new ID string (must be unique)
public void setGUID(com.tivoli.twg.engine.GlobalUniqueID newID)
newID
- - New GUID object. If null is specified, a new GUID is generated
and assigned.public void setUserCustomized()
public void clearUserCustomized()
public boolean getUserCustomized()
public void setMOClassName(java.lang.String new_mo) throws java.lang.ClassNotFoundException
new_mo
- - new managed object class name
java.lang.ClassNotFoundException
- if class not loaded/supportedpublic java.lang.String getMOClassName()
public TWGFilterConstraints getConstraints()
public StringValueSet getTaskIDs()
public static TWGFilter findByIDString(java.lang.String id)
id
- - ID string to search for
public static TWGFilter[] findByName(java.lang.String name, java.util.Locale locale, TWGFilter filterToSkip)
name
- Expanded name to search for.locale
- Locale to use during match.filterToSkip
- Filter that is to be skipped in te search. Null is valid.
public static TWGFilter findByGUID(com.tivoli.twg.engine.GlobalUniqueID guid)
guid
- Group Unique ID to search for.
public static void initBuiltInFilters() throws TWGPersistentObjectSaveException
TWGPersistentObjectSaveException
- if error savingpublic static void makeDefaultMOFFilter(TWGManagedObjectFactory mof)
mof
- - Managed Object Factory to be checkedpublic boolean isActive()
public void subscribeToFilter(TWGFilterSubscriber sub)
sub
- - reference to subscriber (which will be notified of change)public void subscribeConsoleToFilter(TWGActiveConsole con)
con
- - active console to be subscribedpublic void unsubscribeFromFilter(TWGFilterSubscriber sub)
sub
- - reference to subscriber (which will be notified of change)public void unsubscribeConsoleFromFilter(TWGActiveConsole con)
con
- - active console to be unsubscribedpublic void unsubscribeAllFilterSubscribers()
public void notifySubscribersOfChange(IntValueSet add_set, IntValueSet chg_set, IntValueSet del_set)
add_set
- - set of persistent IDs of objects added to setchg_set
- - set of persistent IDs of objects changed within setdel_set
- - set of persistent IDs of objects deleted from setpublic TWGManagedObjectSet getManagedObjectSet()
public boolean isManagedObjectSetValid()
public void processNewChangedManagedObjects(IntValueSet obj_ids, IntValueSet ids_to_include)
obj_ids
- - managed object IDs to be testedids_to_include
- - set of IDs which the TWGFilter has determined
should be included to its TWGManagedObjectSet (output)public void processNewChangedManagedObjects(IntValueSet obj_ids, IntValueSet ids_to_include, StringValueSet db_tables)
obj_ids
- - managed object IDs to be testedids_to_include
- - set of IDs which the TWGFilter has determined
should be included to its TWGManagedObjectSet (output)db_tables
- - table tokens of updated database tables (null if
unknown - assume any table could have been touched)public static void processNewChangedManagedObjectsForAllFilters(IntValueSet new_set, IntValueSet chg_set, IntValueSet activated_flt)
new_set
- - set of object IDs for new managed objectschg_set
- - set of object IDs for changed managed objectspublic static void processNewChangedManagedObjectsForAllFilters(IntValueSet new_set, IntValueSet chg_set, IntValueSet activated_flt, StringValueSet db_tables)
new_set
- - set of object IDs for new managed objectschg_set
- - set of object IDs for changed managed objectsactivated_flt
- - IDs of activated filtersdb_tables
- - Table tokens of updated database tables (null if unknown)public java.lang.String toString()
Object.toString()
public static void handleFilterSubscribe(Command cmd)
cmd
- - IPC command containing requestpublic static void handleFilterUnsubscribe(Command cmd)
cmd
- - IPC command containing requestpublic boolean isConsoleDeletable()
public void setConsoleDeletable(boolean flg)
flg
- - new value, true if enablingpublic boolean isConsoleHidden()
public void setConsoleHidden(boolean flg)
flg
- - new value, true if enablingpublic void setImageSet(int oid)
public int getImageSet()
public void setReadOnly(boolean flg)
flg
- - new value, true if enablingpublic static void initDefaultImages() throws TWGPersistentObjectSaveException
TWGPersistentObjectSaveException
protected static void verifyAll()
public java.lang.Object getNameNLSString()
public java.lang.String[] getAttributeIDList()
getAttributeIDList
in interface TWGGetSetInterface
public DataValue getAttributeValue(java.lang.String id, java.util.Locale loc)
getAttributeValue
in interface TWGGetSetInterface
id
- - attribute ID requestedloc
- - locale to use for value, if applicable
public boolean setAttributeValue(java.lang.String id, DataValue val)
setAttributeValue
in interface TWGGetSetInterface
id
- - attribute ID to be setval
- - attribute value to be set
public int getAttributeType(java.lang.String id)
getAttributeType
in interface TWGGetSetInterface
id
- - attribute ID
public void AttachObjectToConsole(TWGActiveConsole act_con)
AttachObjectToConsole
in interface TWGConsoleSpecShadowedObject
act_con
- - Active console instance to be associated withpublic void DetachObjectFromConsole(TWGActiveConsole act_con)
DetachObjectFromConsole
in interface TWGConsoleSpecShadowedObject
act_con
- - Active console instance to be disassociated frompublic void DetachObjectFromAllConsoles()
DetachObjectFromAllConsoles
in interface TWGConsoleSpecShadowedObject
public static void attachAllAllowedFilters(TWGActiveConsole con)
con
- - console instancepublic static void detachAllDisallowedFilters(TWGActiveConsole con)
con
- - console instancepublic void SetObjectID(long oid) throws DuplicateObjectIDException
SetObjectID
in class TWGObject
oid
- - new object ID, or INVALID_OBJECT_ID if none
DuplicateObjectIDException
- if ID is duplicatepublic static TWGFilter findFilterByName(java.lang.String n)
n
- - name to search for
public static long getLocalUniqueID()
public static java.lang.String getLocalSystemName()
public TWGFilter copyFrom(TWGFilter sourceFilter)
sourceFilter
- Filter to copy from.
public boolean makeTitleUnique(java.util.Locale locale)
public static void initImportExporter()
public void touchDateLastUpdated()
public StringValueSet getDBTableTokens()
public static boolean idStringExists(java.lang.String id)
id
- - ID string to search for.
public static java.lang.String makeIDStringUnique(java.lang.String id)
id
- - ID string to make unique. Null is considered unique and
is not changed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |