|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryItemMetadata
public class RepositoryItemMetadata
Description of an individual item (i.e. file) in a clustered repository.
Field Summary | |
---|---|
static String |
NOW
Marker value to pass to setTimestampAsString(String) that will
generate a timestamp equal to System.currentTimeMillis(). |
Constructor Summary | |
---|---|
RepositoryItemMetadata()
Constructor for XML parser. |
|
RepositoryItemMetadata(List<String> pathElements,
long timestamp,
String originatingNode,
boolean directory,
boolean removed)
|
|
RepositoryItemMetadata(RepositoryItemMetadata toCopy)
Copy constructor. |
Method Summary | |
---|---|
int |
compareTo(RepositoryItemMetadata o)
|
boolean |
equals(Object obj)
|
List<String> |
getId()
|
String |
getOriginatingNode()
The name of the cluster node that propagated this version of the item to the cluster. |
static List<String> |
getPathElements(String path)
|
String |
getRelativePath()
|
List<String> |
getRelativePathElements()
|
String |
getRootName()
|
long |
getTimestamp()
|
String |
getTimestampAsString()
|
int |
hashCode()
|
boolean |
isChildOf(RepositoryItemMetadata other)
Gets whether this item is a child of another item. |
boolean |
isDirectory()
|
boolean |
isRemoved()
|
void |
setDirectory(boolean directory)
|
void |
setOriginatingNode(String originatingNode)
|
void |
setRelativePath(String path)
|
void |
setRelativePathElements(List<String> pathElements)
|
void |
setRemoved(boolean removed)
|
void |
setRootName(String rootName)
|
void |
setTimestamp(long timestamp)
|
void |
setTimestampAsString(String timestamp)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static String NOW
setTimestampAsString(String)
that will
generate a timestamp equal to System.currentTimeMillis(). Useful for
testing.
Constructor Detail |
---|
public RepositoryItemMetadata()
public RepositoryItemMetadata(List<String> pathElements, long timestamp, String originatingNode, boolean directory, boolean removed)
public RepositoryItemMetadata(RepositoryItemMetadata toCopy)
toCopy
- the item to copy
NullPointerException
- if toCopy
is null
Method Detail |
---|
public static List<String> getPathElements(String path)
public List<String> getId()
getId
in interface Identifiable<List<String>>
public String getRootName()
public void setRootName(String rootName)
public String getRelativePath()
public void setRelativePath(String path)
public boolean isDirectory()
public void setDirectory(boolean directory)
public long getTimestamp()
public void setTimestamp(long timestamp)
public String getTimestampAsString()
public void setTimestampAsString(String timestamp)
public List<String> getRelativePathElements()
public void setRelativePathElements(List<String> pathElements)
public String getOriginatingNode()
public void setOriginatingNode(String originatingNode)
public boolean isRemoved()
public void setRemoved(boolean removed)
public boolean isChildOf(RepositoryItemMetadata other)
other
- the other item. Can be null
in which case
this method will return false
true
if other is not null
, is a
directory
and this items path starts
with other
's path.public int compareTo(RepositoryItemMetadata o)
compareTo
in interface Comparable<RepositoryItemMetadata>
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |