|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.extensionmodule.ExtensionModuleDescriptor
public class ExtensionModuleDescriptor
This interface describes an immutable lightweight serializable object for describing an extension module as it exists in the Platform at a given point in time.
If ordered (using Collections.sort or something else based on their
compareTo(java.lang.Object)
method), they should be ordered according to their
search position
. Equality should, therefore, also
be based on their search position - the search position should
be a unique integer across all extension modules at a given point
in time (if position is changed, the entire list should be
refreshed). Therefore, one should never mix ExtensionModuleDescriptor
instances that were retrieved from the server at different points
in time.
(Note: Classes which implement this interface should also explicitly implement the java.io.Serializable interface.)
Field Summary | |
---|---|
protected long |
checksum
|
protected java.lang.String |
createdBy
|
protected java.lang.String |
creationDate
|
protected java.lang.String |
desc
|
protected boolean |
enabled
|
protected java.lang.String |
lastUpdatedBy
|
protected java.lang.String |
lastUpdatedDate
|
protected java.lang.String |
name
|
protected int |
position
|
protected java.lang.String |
type
|
Constructor Summary | |
---|---|
ExtensionModuleDescriptor()
|
|
ExtensionModuleDescriptor(ExtensionModuleDescriptor clone)
|
|
ExtensionModuleDescriptor(java.lang.String name,
java.lang.String type,
int position,
boolean enabled,
java.lang.String desc,
java.lang.String createdBy,
java.lang.String creationDate,
java.lang.String lastUpdatedBy,
java.lang.String lastUpdatedDate,
long checksum)
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object obj)
Compares this object to another. |
boolean |
equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. |
long |
getChecksum()
The checksum of the contents of the extension module - this can be used to quickly compare if the contents stored are the same as, for example, the contents of a local file. |
java.lang.String |
getCreatedBy()
Principal name who created this extension module |
java.lang.String |
getCreationDate()
String date this extension module was created (in String form using DateUtil ). |
java.lang.String |
getDescription()
Optional description of this extension module - may be null. |
java.lang.String |
getLastUpdatedBy()
Principal name who last updated this extension module |
java.lang.String |
getLastUpdatedDate()
String date this extension module was last updated (in String form using DateUtil ). |
java.lang.String |
getName()
Name (e.g. |
int |
getPosition()
Position of this extension module in search order - zero based. |
java.lang.String |
getType()
Type of this extension module |
boolean |
isEnabled()
Whether this extension module is enabled for searching or not (it may exist yet be disabled; it will not be searched) |
void |
setChecksum(long sum)
|
void |
setCreatedBy(java.lang.String by)
|
void |
setCreationDate(java.lang.String date)
|
void |
setDescription(java.lang.String description)
|
void |
setEnabled(boolean isEnabled)
|
void |
setLastUpdatedBy(java.lang.String by)
|
void |
setLastUpdatedDate(java.lang.String date)
|
void |
setName(java.lang.String newName)
|
void |
setPosition(int pos)
|
void |
setType(java.lang.String newType)
|
java.lang.String |
toString()
Return the string form of this ExtensionModuleDescriptor. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.lang.String type
protected int position
protected boolean enabled
protected java.lang.String desc
protected java.lang.String createdBy
protected java.lang.String creationDate
protected java.lang.String lastUpdatedBy
protected java.lang.String lastUpdatedDate
protected long checksum
Constructor Detail |
---|
public ExtensionModuleDescriptor()
public ExtensionModuleDescriptor(java.lang.String name, java.lang.String type, int position, boolean enabled, java.lang.String desc, java.lang.String createdBy, java.lang.String creationDate, java.lang.String lastUpdatedBy, java.lang.String lastUpdatedDate, long checksum)
public ExtensionModuleDescriptor(ExtensionModuleDescriptor clone)
Method Detail |
---|
public java.lang.String getName()
public java.lang.String getType()
public int getPosition()
Position of this extension module in search order - zero based. This number itself is not important, what is imporant is the relative ordering of all extension modules, which this attribute indicates.
The position attribute does not have to be the same integer for a given extension module over time. In particular, when the list of modules is re-ordered, any extension module may be given a new position. Furthermore, as extension modules are added and deleted, the list of positions does not have to be a continuous sequence - there can be gaps, and there doesn't necessarily have to be a zero-th extension module (even though the search position is zero-based.)
public boolean isEnabled()
public java.lang.String getDescription()
public java.lang.String getCreatedBy()
public java.lang.String getCreationDate()
DateUtil
).
public java.lang.String getLastUpdatedBy()
public java.lang.String getLastUpdatedDate()
DateUtil
).
public long getChecksum()
public int compareTo(java.lang.Object obj)
Compares this object to another. If the specified object is an instance of the ExtensionModuleDescriptor class, then this method compares the contents; otherwise, it throws a ClassCastException (as instances are comparable only to instances of the same class).
Note: this method should be consistent with
, meaning that
equals()
(compare(x, y)==0) == (x.equals(y))
.
compareTo
in interface java.lang.Comparable
obj
- the object that this instance is to be compared to.
java.lang.AssertionError
- if the specified object reference is null
java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this instance.public boolean equals(java.lang.Object obj)
compareTo()
.
equals
in class java.lang.Object
obj
- the object that this instance is to be compared to.
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String newName)
public void setType(java.lang.String newType)
public void setPosition(int pos)
public void setEnabled(boolean isEnabled)
public void setDescription(java.lang.String description)
public void setCreatedBy(java.lang.String by)
public void setCreationDate(java.lang.String date)
public void setLastUpdatedBy(java.lang.String by)
public void setLastUpdatedDate(java.lang.String date)
public void setChecksum(long sum)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |