nl.gx.webmanager.authorization.impl
Class HtmlObjectWrapperImpl

java.lang.Object
  extended by nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
All Implemented Interfaces:
HtmlObjectWrapper
Direct Known Subclasses:
PermissionCategoryImpl, PermissionGroupImpl, PermissionImpl, RoleImpl, ToolbarElement, UserImpl

public class HtmlObjectWrapperImpl
extends java.lang.Object
implements HtmlObjectWrapper

Class extended by all classes in the authorization service that wrap a siteworks objecttype.

Author:
arjans

Field Summary
protected  int id
           
 
Constructor Summary
HtmlObjectWrapperImpl()
          Default constructor for a HtmlObjectWrapperImpl instance.
HtmlObjectWrapperImpl(int id)
          Constructor for a HtmlObjectWrapperImpl taking the id of the siteworks object it wraps as a parameter.
HtmlObjectWrapperImpl(java.lang.String id)
          Constructor for a HtmlObjectWrapperImpl taking the id of the siteworks object it wraps as a parameter.
 
Method Summary
protected  void assignRelatedObject(java.lang.String relatedDeclarationName, java.lang.String relatedObjectType, nl.gx.siteworks.core.HtmlObject objectToCheck)
          When assigning an object that is referenced from the object it is assigned to also assign refering object.
 void delete()
          Delete the wrapped siteworks object.
 boolean equals(java.lang.Object obj)
           
protected  java.lang.String getAssignment(java.lang.String declarationName)
          Returns a String value assigned to the given declaration of the object wrapped by the current class instance.
protected  java.util.List<nl.gx.siteworks.core.HtmlObject> getAssignmentObjects(java.lang.String declaratioName)
          Returns a list of siteworks objects assigned to a given declaration of the wrapped object.
protected  nl.gx.siteworks.core.HtmlObject[] getAssignments(java.lang.String declarationName)
          Returns an array of siteworks objects assigned to the given declaration of the object wrapped by the current class instance.
 java.lang.String getId()
          Returns the unique id of the wrapped Siteworks object.
 java.lang.String getUuid()
          Return String representation of the wrapped Siteworks object's UUID.
protected  void removeRelatedObjects(java.lang.String relatedDeclarationName, java.lang.String relatedObjectType, java.util.List<java.lang.String> objectUUIDs, java.util.List<nl.gx.siteworks.core.HtmlObject> objectsToCheck)
          Removes all related objects when an object is removed that also refers to the object it is removed from.
protected  void setAssignment(java.lang.String objectTypeName, java.lang.String declarationName, java.lang.String value)
          Sets a String value for a declaration of an object of a given objecttype.
protected  void setAssignments(java.lang.String objectTypeName, java.lang.String declarationName, java.lang.String[] values)
          Sets an array of siteworks objects for a declaration of an object of a given objecttype.
 void setComponent(Component component)
          Setter for the Component injected by the Spring MVC Controller framework in the getInstanceForName method on the ComponentBase class.
 void setId(java.lang.String id)
          Sets a string representation of the wrapped siteworks object's id.
 void setNode(javax.jcr.Node node)
          Public setter for use by the WebManager Spring protocol.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected int id
Constructor Detail

HtmlObjectWrapperImpl

public HtmlObjectWrapperImpl()
Default constructor for a HtmlObjectWrapperImpl instance.


HtmlObjectWrapperImpl

public HtmlObjectWrapperImpl(java.lang.String id)
Constructor for a HtmlObjectWrapperImpl taking the id of the siteworks object it wraps as a parameter.

Parameters:
id - Id of a siteworks object

HtmlObjectWrapperImpl

public HtmlObjectWrapperImpl(int id)
Constructor for a HtmlObjectWrapperImpl taking the id of the siteworks object it wraps as a parameter.

Parameters:
id - Id of a siteworks object
Method Detail

equals

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

setComponent

public void setComponent(Component component)
Setter for the Component injected by the Spring MVC Controller framework in the getInstanceForName method on the ComponentBase class.

Parameters:
component - Injected component

setAssignments

protected void setAssignments(java.lang.String objectTypeName,
                              java.lang.String declarationName,
                              java.lang.String[] values)
Sets an array of siteworks objects for a declaration of an object of a given objecttype.

Parameters:
objectTypeName - Name of the objecttype of the object
declarationName - Name of the declaration to assign the values to
values - An array of Strings representing UUID's

getAssignments

protected nl.gx.siteworks.core.HtmlObject[] getAssignments(java.lang.String declarationName)
Returns an array of siteworks objects assigned to the given declaration of the object wrapped by the current class instance.

Parameters:
declarationName - Name of the declaration to return that objects of
Returns:
an array of siteworks objects assigned to the given declaration of the object wrapped by the current class instance

getId

public java.lang.String getId()
Description copied from interface: HtmlObjectWrapper
Returns the unique id of the wrapped Siteworks object.

Specified by:
getId in interface HtmlObjectWrapper
Returns:
the unique id of the wrapped Siteworks object

setId

public void setId(java.lang.String id)
Sets a string representation of the wrapped siteworks object's id.

Parameters:
id - A string representation of the wrapped siteworks object's id

setAssignment

protected void setAssignment(java.lang.String objectTypeName,
                             java.lang.String declarationName,
                             java.lang.String value)
Sets a String value for a declaration of an object of a given objecttype.

Parameters:
objectTypeName - Name of the objecttype of the object
declarationName - Name of the declaration to assign the values to
value - A String value

getAssignment

protected java.lang.String getAssignment(java.lang.String declarationName)
Returns a String value assigned to the given declaration of the object wrapped by the current class instance.

Parameters:
declarationName - Name of the declaration to return that value of
Returns:
a String value assigned to the given declaration of the object wrapped by the current class instance

setNode

public void setNode(javax.jcr.Node node)
Public setter for use by the WebManager Spring protocol. Because it is only used in that protocol it is not added to the interface.

Parameters:
node - Node that is inserted

removeRelatedObjects

protected void removeRelatedObjects(java.lang.String relatedDeclarationName,
                                    java.lang.String relatedObjectType,
                                    java.util.List<java.lang.String> objectUUIDs,
                                    java.util.List<nl.gx.siteworks.core.HtmlObject> objectsToCheck)
Removes all related objects when an object is removed that also refers to the object it is removed from.

Parameters:
relatedDeclarationName - Name of the declaration that is related to the removed object relation
relatedObjectType - Name of the objecttype containing the removed object relation
objectUUIDs - List of UUID's representing objects
objectsToCheck - Objects that should be check if the refer to the object which's relation is removed

getAssignmentObjects

protected java.util.List<nl.gx.siteworks.core.HtmlObject> getAssignmentObjects(java.lang.String declaratioName)
Returns a list of siteworks objects assigned to a given declaration of the wrapped object.

Parameters:
declaratioName - Name of the declaration
Returns:
a list of siteworks objects assigned to a given declaration of the wrapped object

assignRelatedObject

protected void assignRelatedObject(java.lang.String relatedDeclarationName,
                                   java.lang.String relatedObjectType,
                                   nl.gx.siteworks.core.HtmlObject objectToCheck)
When assigning an object that is referenced from the object it is assigned to also assign refering object.

Parameters:
relatedDeclarationName - Name of the declaration that is related to the removed object relation
relatedObjectType - Name of the objecttype containing the removed object relation
objectToCheck - Object that should be checked if it refer's to the object which's relation is added

delete

public void delete()
Delete the wrapped siteworks object.


getUuid

public java.lang.String getUuid()
Description copied from interface: HtmlObjectWrapper
Return String representation of the wrapped Siteworks object's UUID.

Specified by:
getUuid in interface HtmlObjectWrapper
Returns:
String representation of the wrapped Siteworks object's UUID


Copyright © 2007-2011 GX Software BV. All Rights Reserved.