|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.MetaView
A MetaView holds information about how information flows through a system. Currently, the MetaView is a common data model that can be used to map attributes and events from resource to resource.
Nested Class Summary | |
static class |
MetaView.ApplicationType
|
static class |
MetaView.ApplicationTypeComparator
|
static class |
MetaView.MetaViewApplications
|
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
APP_ACTIVE_SYNC
|
static java.lang.String |
APP_ADMIN_GUI
|
static java.lang.String |
APP_BULK_ACTIONS
|
static java.lang.String |
APP_END_USER_GUI
|
static java.lang.String |
APP_LOAD_FROM_FILE
|
static java.lang.String |
APP_LOAD_FROM_RESOURCE
|
static java.lang.String |
APP_RECONCILIATION
|
static java.lang.String |
APP_SPML
|
static java.lang.String |
ATT_ENABLED_APPLICATIONS
|
static java.lang.String |
ATT_LAST_SEEN_RESOURCE_LAST_MOD
|
static java.lang.String |
ATT_SERVICED_TYPE
|
static MetaView.MetaViewApplications |
AVAILABLE_APPLICATIONS
|
static java.lang.String |
code_id
|
static java.lang.String |
DEFAULT_META_VIEW
The ID of the default Meta View for user objects. |
static java.lang.String |
ELEMENT
|
Fields inherited from class com.waveset.object.PersistentObject |
_trace, trace |
Constructor Summary | |
MetaView()
Default constructor. |
|
MetaView(org.w3c.dom.Element e)
Constructor from an XML element. |
Method Summary | |
void |
addMetaEvent(MetaEvent event)
Add a MetaEvent to the MetaView. |
void |
addMetaViewAttribute(MetaViewAttribute attribute)
Add a MetaViewAttribute to the MetaView. |
protected void |
addSubclassAttributes(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
protected void |
addSubclassElements(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
void |
clearMetaEvents()
Clear all MetaEvents from the MetaView. |
void |
clearMetaViewAttributes()
Clear all MetaViewAttributes from the MetaView. |
boolean |
equals(java.lang.Object o)
Compares two objects for equality of identity. |
java.util.Set |
getAttributesWithSource(ObjectRef resourceRef,
java.lang.String attrName)
Return a Set of the MetaViewAttributes that have a source with the given Resource ObjectRef and attribute. |
java.util.Set |
getAttributesWithTarget(ObjectRef resourceRef,
java.lang.String attrName)
Return a Set of the MetaViewAttributes that have a target with the given Resource ObjectRef and attribute. |
java.lang.String |
getElementName()
Return the XML element name of this object. |
java.util.List |
getEnabledApplications()
|
long |
getLastSeenResourceLastMod()
Get the lastMod of the most recently saved resource that has had its changes assimilated into the meta view. |
MetaEvent |
getMetaEvent(MetaEvent.Type type,
Resource resource)
Get a MetaEvent with the given Type that is detected on the given resource. |
java.util.List |
getMetaEvents()
Return the List of MetaEvents, or an empty list if none have been set. |
java.util.List |
getMetaEvents(MetaEvent.Type type)
Get a non-null List of MetaEvents on this MetaView of the given type. |
MetaViewAttribute |
getMetaViewAttribute(java.lang.String attributeName)
Get a MetaViewAttribute by name. |
java.util.List |
getMetaViewAttributes()
Return the List of MetaViewAttributes, or an empty list if none have been set. |
java.util.ArrayList |
getReferences()
Returns the list of all references in this object. |
java.util.List |
getResponses(MetaEvent.Type type,
Resource resource)
Get a possibly-null list of MetaEventResponses configured when the given event type is detected on the given resource. |
Type |
getServicedType()
|
Type |
getType()
Return the type of this PersistentObject. |
int |
hashCode()
Implement the hashCode for efficient map insertion |
boolean |
isApplicationEnabled(java.lang.String app)
Determine whether the given application (one of the APP_ contants) is enabled for this MetaView. |
boolean |
isGlobalTargetAttribute(java.lang.String attrName)
Return whether the given attribute is a global target. |
boolean |
isSourceAttribute(Resource resource,
java.lang.String attrName)
Return whether the attribute on the given resource is a source for this MetaView. |
boolean |
isTargetAttribute(Resource resource,
java.lang.String attrName)
Return whether the attribute on the given resource is a target for this MetaView - either explicitly or as a global target. |
protected void |
parseSubclassAttributes(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer). |
protected void |
parseSubclassElements(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer). |
void |
removeMetaEvent(MetaEvent event)
Remove a MetaEvent from the MetaView. |
void |
removeMetaViewAttribute(java.lang.String attributeName)
Remove a MetaViewAttribute from the MetaView. |
void |
setEnabledApplications(java.util.List enabledApplications)
Set the enabled applications. |
void |
setLastSeenResourceLastMod(long lastSeenResourceLastMod)
Set the lastMod of the most recently saved resource that has had its changes assimilated into the meta view. |
void |
setMetaEvents(java.util.List events)
Set the List of MetaEvents for the MetaView. |
void |
setMetaViewAttributes(java.util.List attributes)
Clears out the existing MetaViewAttributes and adds the list of MetaViewAttributes. |
void |
setServicedType(Type servicedType)
Set the service Type. |
void |
visit(Visitor v)
Visitor interface. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String DEFAULT_META_VIEW
public static final java.lang.String APP_ADMIN_GUI
public static final java.lang.String APP_END_USER_GUI
public static final java.lang.String APP_ACTIVE_SYNC
public static final java.lang.String APP_SPML
public static final java.lang.String APP_BULK_ACTIONS
public static final java.lang.String APP_RECONCILIATION
public static final java.lang.String APP_LOAD_FROM_RESOURCE
public static final java.lang.String APP_LOAD_FROM_FILE
public static final MetaView.MetaViewApplications AVAILABLE_APPLICATIONS
public static final java.lang.String ELEMENT
public static final java.lang.String ATT_SERVICED_TYPE
public static final java.lang.String ATT_ENABLED_APPLICATIONS
public static final java.lang.String ATT_LAST_SEEN_RESOURCE_LAST_MOD
Constructor Detail |
public MetaView()
public MetaView(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public Type getType()
getType
in class PersistentObject
public void visit(Visitor v) throws WavesetException
visit
in class PersistentObject
WavesetException
public java.util.ArrayList getReferences()
PersistentObject
getReferences
in class PersistentObject
public java.util.List getMetaViewAttributes()
public void setMetaViewAttributes(java.util.List attributes) throws WavesetException
attributes
- List of MetaViewAttributes to set.
WavesetException
- If the list contains multiple attributes
with the same name.public MetaViewAttribute getMetaViewAttribute(java.lang.String attributeName)
attributeName
- The attribute to get.
public void addMetaViewAttribute(MetaViewAttribute attribute) throws WavesetException
attribute
- The attribute to add.
WavesetException
- If the MetaView already contains an attribute
with the same name.public void removeMetaViewAttribute(java.lang.String attributeName)
public void clearMetaViewAttributes()
public java.util.List getMetaEvents()
public java.util.List getMetaEvents(MetaEvent.Type type)
type
- The type of the MetaEvents to get.
public MetaEvent getMetaEvent(MetaEvent.Type type, Resource resource)
type
- The type of the MetaEvent to get.resource
- The resource on which the event is detected
public void addMetaEvent(MetaEvent event) throws WavesetException
event
- The MetaEvent to add.
WavesetException
- If an event of the given type with one of the
sources already exists in the MetaView.public void removeMetaEvent(MetaEvent event)
event
- The MetaEvent to remove.public void setMetaEvents(java.util.List events)
events
- The List of MetaEvents to set.public void clearMetaEvents()
public Type getServicedType()
public void setServicedType(Type servicedType)
servicedType
- The servicedType to set.
java.lang.IllegalArgumentException
- If servicedType is null.public java.util.List getEnabledApplications()
public void setEnabledApplications(java.util.List enabledApplications)
enabledApplications
- The enabledApplications to set.public boolean isApplicationEnabled(java.lang.String app)
app
- The name of the application to check for enablement.
public long getLastSeenResourceLastMod()
public void setLastSeenResourceLastMod(long lastSeenResourceLastMod)
lastSeenResourceLastMod
- The lastMod of the most recently saved
resource that has had its changes
assimilated into the meta viewpublic java.util.Set getAttributesWithSource(ObjectRef resourceRef, java.lang.String attrName)
resourceRef
- The ObjectRef of the source resource.attrName
- The name of the source attribute.
public java.util.Set getAttributesWithTarget(ObjectRef resourceRef, java.lang.String attrName)
resourceRef
- The ObjectRef of the target resource.attrName
- The name of the target attribute.
public boolean isSourceAttribute(Resource resource, java.lang.String attrName)
resource
- The Resource on which the source lives.attrName
- The name of the source attribute.
public boolean isTargetAttribute(Resource resource, java.lang.String attrName)
resource
- The Resource on which the target lives.attrName
- The name of the target attribute.
public boolean isGlobalTargetAttribute(java.lang.String attrName)
attrName
- The name of the target attribute.
public java.util.List getResponses(MetaEvent.Type type, Resource resource)
type
- The type of event for which to retrieve the responses.resource
- The resource on which the event is detected and
responded to.
public boolean equals(java.lang.Object o)
PersistentObject
This method overrides the java.lang.Object equals method. It determines equality based on whether the two identities of the current object and the object argument are equal, where equal is defined as:
Note that this will makes it impossible to use the equals() method to do content comparison of two object copies. I'm not sure I really like this, its an unusual way to have equals() behave, but it is convenient for searching collections for references.
equals
in class PersistentObject
o
- - a PersistentObject or an ObjectRefpublic int hashCode()
PersistentObject
hashCode
in class PersistentObject
public java.lang.String getElementName()
PersistentObject
getElementName
in interface XmlObject
getElementName
in class PersistentObject
protected void addSubclassAttributes(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.
addSubclassAttributes
in class PersistentObject
protected void addSubclassElements(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.
addSubclassElements
in class PersistentObject
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassAttributes
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassElements
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |