org.xiruss.snapcm.api
Class NullRepositoryObject

java.lang.Object
  extended by org.xiruss.snapcm.api.NullRepositoryObject
All Implemented Interfaces:
RepositoryObject
Direct Known Subclasses:
NullBranch, NullDependencyLink, NullResolutionPolicy, NullResource, NullSnapshot, NullUser, NullVersion

public class NullRepositoryObject
extends java.lang.Object
implements RepositoryObject


Constructor Summary
NullRepositoryObject()
           
 
Method Summary
 void accept(RepositoryVisitor visitor)
           
 int compareTo(java.lang.Object arg0)
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 java.util.Map getProperties()
           
 java.lang.Object getProperty(java.lang.String propertyName)
           
 java.util.Set getPropertyNames()
           
 Repository getRepository()
           
 int getType()
           
 boolean hasProperty(java.lang.String propertyName)
           
 void initialize(Repository rep, java.lang.String objId, java.lang.String name)
          Initialize the object with the specified object ID and name.
 boolean isNull()
           
 void setId(java.lang.String id)
          Sets the ID on a newly-created repository object.
 java.lang.String setName(java.lang.String newName)
          Sets the name of object.
 void setProperty(java.lang.String propertyName, java.lang.Object propertyValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject
toString
 

Constructor Detail

NullRepositoryObject

public NullRepositoryObject()
Method Detail

isNull

public boolean isNull()
Specified by:
isNull in interface RepositoryObject

initialize

public void initialize(Repository rep,
                       java.lang.String objId,
                       java.lang.String name)
                throws ObjectMutationException
Description copied from interface: RepositoryObject
Initialize the object with the specified object ID and name. This method is for the benefit of repositories that need to construct new objects using no-argument constructors.

Specified by:
initialize in interface RepositoryObject
Throws:
ObjectMutationException - If object already has an assigned ID, indicating that is has already been constructed.

setId

public void setId(java.lang.String id)
           throws ObjectMutationException
Description copied from interface: RepositoryObject
Sets the ID on a newly-created repository object. This is write-once property.

Specified by:
setId in interface RepositoryObject
Parameters:
id - Object ID (assigned by the owning repository)
Throws:
ObjectMutationException - If object already has an assigned ID, indicating that is has already been constructed.

getName

public java.lang.String getName()
Specified by:
getName in interface RepositoryObject

setName

public java.lang.String setName(java.lang.String newName)
Description copied from interface: RepositoryObject
Sets the name of object. Returns the old object name.

Specified by:
setName in interface RepositoryObject
Parameters:
newName - New name to set on the object.
Returns:
Old object name

getId

public java.lang.String getId()
Specified by:
getId in interface RepositoryObject

getRepository

public Repository getRepository()
Specified by:
getRepository in interface RepositoryObject
Returns:

hasProperty

public boolean hasProperty(java.lang.String propertyName)
Specified by:
hasProperty in interface RepositoryObject
Returns:

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Specified by:
getProperty in interface RepositoryObject
Parameters:
propertyName - The name of the property to retrieve.
Returns:
The property value object.

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object propertyValue)
Specified by:
setProperty in interface RepositoryObject

compareTo

public int compareTo(java.lang.Object arg0)
Specified by:
compareTo in interface RepositoryObject

getType

public int getType()
Specified by:
getType in interface RepositoryObject
Returns:

getPropertyNames

public java.util.Set getPropertyNames()
Specified by:
getPropertyNames in interface RepositoryObject

accept

public void accept(RepositoryVisitor visitor)
            throws java.lang.Throwable
Specified by:
accept in interface RepositoryObject
Throws:
java.lang.Throwable

getProperties

public java.util.Map getProperties()
Specified by:
getProperties in interface RepositoryObject