org.xiruss.xirussrepository.client
Class RepositoryObjectProxy

java.lang.Object
  extended by org.xiruss.xirussrepository.client.RepositoryObjectProxy
All Implemented Interfaces:
RepositoryObject
Direct Known Subclasses:
BranchProxy, DependencyLinkProxy, ResolutionPolicyProxy, ResourceProxy, SessionProxy, SnapshotProxy, UserProxy, VersionProxy

public class RepositoryObjectProxy
extends java.lang.Object
implements RepositoryObject


Field Summary
protected  XirussHttpApiClientHelper cHelper
           
protected  org.apache.log4j.Logger logger
           
protected  int objectTypeCode
           
protected  PathString pathToMe
           
 
Constructor Summary
RepositoryObjectProxy()
           
RepositoryObjectProxy(XirussHttpApiClientHelper helper, org.w3c.dom.Element dataSource)
           
 
Method Summary
 void accept(RepositoryVisitor visitor)
           
 int compareTo(java.lang.Object arg0)
           
protected  java.net.HttpURLConnection doPost(java.lang.String path)
           
protected  java.lang.String doStringReturnPost(java.lang.String path)
           
 boolean equals(java.lang.Object candObj)
           
protected  boolean getBooleanValue(PathString path)
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 java.lang.String getOriginalClassName()
          Gets the name of the server-side class of which this proxy is a reflection.
 PathString getPathToMe()
           
 java.util.Map getProperties()
           
 java.lang.Object getProperty(java.lang.String propertyName)
           
 java.util.Set getPropertyNames()
           
 Repository getRepository()
           
protected  java.lang.String getStringReturnValue(PathString path)
          Returns the request string value or null if the value cannot be found.
protected  java.util.Set getStringSetReturnValue(java.lang.String path)
           
 int getType()
           
 boolean hasProperty(java.lang.String propertyName)
           
 void initialize(Repository rep, java.lang.String objId, java.lang.String branchName)
          Initialize the object with the specified object ID and name.
 void initialize(XirussHttpApiClientHelper helper, org.w3c.dom.Element dataSource)
           
 boolean isNull()
           
protected  void loadRepositoryObjectData(XirussHttpApiClientHelper helper, org.w3c.dom.Element dataSource)
           
 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)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

objectTypeCode

protected int objectTypeCode

cHelper

protected XirussHttpApiClientHelper cHelper

logger

protected org.apache.log4j.Logger logger

pathToMe

protected PathString pathToMe
Constructor Detail

RepositoryObjectProxy

public RepositoryObjectProxy()

RepositoryObjectProxy

public RepositoryObjectProxy(XirussHttpApiClientHelper helper,
                             org.w3c.dom.Element dataSource)
                      throws XirussRepositoryException
Throws:
XirussRepositoryException
Method Detail

initialize

public void initialize(XirussHttpApiClientHelper helper,
                       org.w3c.dom.Element dataSource)
                throws XirussRepositoryException
Throws:
XirussRepositoryException

loadRepositoryObjectData

protected void loadRepositoryObjectData(XirussHttpApiClientHelper helper,
                                        org.w3c.dom.Element dataSource)
                                 throws XirussRepositoryException
Throws:
XirussRepositoryException

getOriginalClassName

public java.lang.String getOriginalClassName()
Gets the name of the server-side class of which this proxy is a reflection.

Returns:

setId

public void setId(java.lang.String id)
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)

getName

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

getStringReturnValue

protected java.lang.String getStringReturnValue(PathString path)
Returns the request string value or null if the value cannot be found.

Parameters:
path -
Returns:

getStringSetReturnValue

protected java.util.Set getStringSetReturnValue(java.lang.String path)

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

doStringReturnPost

protected java.lang.String doStringReturnPost(java.lang.String path)

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

doPost

protected java.net.HttpURLConnection doPost(java.lang.String path)

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:

isNull

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

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

initialize

public void initialize(Repository rep,
                       java.lang.String objId,
                       java.lang.String branchName)
                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.

equals

public boolean equals(java.lang.Object candObj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Specified by:
toString in interface RepositoryObject
Overrides:
toString in class java.lang.Object

getPathToMe

public PathString getPathToMe()

getBooleanValue

protected boolean getBooleanValue(PathString path)