nl.gx.webmanager.authorization.impl
Class PermissionCategoryImpl

java.lang.Object
  extended by nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
      extended by nl.gx.webmanager.authorization.impl.PermissionCategoryImpl
All Implemented Interfaces:
HtmlObjectWrapper, PermissionCategory

public class PermissionCategoryImpl
extends HtmlObjectWrapperImpl
implements PermissionCategory

Implementation of the PermissionCategory interface. This implementation wraps the rbac_category siteworks objecttype. A permission category is a way to categorize permissions but in no way effects authorization logic.

Author:
Arjan Seijkens/Ivo Ladage

Field Summary
 
Fields inherited from class nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
id
 
Constructor Summary
PermissionCategoryImpl()
          Default constructor for a PermissionCategory implementation instance.
PermissionCategoryImpl(java.lang.String id)
          Constructor for a PermissionCategory implementation taking the id of the siteworks object it wraps as a parameter.
PermissionCategoryImpl(java.lang.String id, int webid)
          Constructor for a permission category when it is used within a webinitiatif, this way it returns only licensed permissions for that webinitiatif.
 
Method Summary
 void addPermission(Permission permission)
          Adds a permission to the volatile permissions
 boolean equals(PermissionCategory permissionCategory)
          Returns if the permission category provided equals this permission category.
 java.lang.String getLabelId()
          Return the id of the label assosiated with this permission category.
 java.lang.String getName()
          Return the language dependent description of the permission category.
 Permission[] getPermissions()
          Returns an array of all permission class instances in the category.
 boolean getShowAsComponent()
          Return if the permission category should also be visible in the components tab of the Web Initiative configuration panel
 java.lang.String getValue()
          Returns a unique identifying value of the category.
 void setLabelId(java.lang.String labelid)
          Sets the labelid of this category.
 void setShowAsComponent(boolean showAsComponent)
          Set if the permission category should also be visible in the components tab of the Web Initiative configuration panel.
 void setValue(java.lang.String value)
          Sets the value of the permission category.
 
Methods inherited from class nl.gx.webmanager.authorization.impl.HtmlObjectWrapperImpl
assignRelatedObject, delete, equals, getAssignment, getAssignmentObjects, getAssignments, getId, getUuid, removeRelatedObjects, setAssignment, setAssignments, setComponent, setId, setNode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.gx.webmanager.authorization.HtmlObjectWrapper
getId, getUuid
 

Constructor Detail

PermissionCategoryImpl

public PermissionCategoryImpl()
Default constructor for a PermissionCategory implementation instance.


PermissionCategoryImpl

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

Parameters:
id - Id of a rbac_category siteworks object

PermissionCategoryImpl

public PermissionCategoryImpl(java.lang.String id,
                              int webid)
Constructor for a permission category when it is used within a webinitiatif, this way it returns only licensed permissions for that webinitiatif.

Parameters:
id - Id of a rbac_category siteworks object
webid - Id of a wm_webinitiatif siteworks object
Method Detail

getPermissions

public Permission[] getPermissions()
Description copied from interface: PermissionCategory
Returns an array of all permission class instances in the category.

Specified by:
getPermissions in interface PermissionCategory
Returns:
an array of all permission class instances in the category

addPermission

public void addPermission(Permission permission)
Adds a permission to the volatile permissions

Specified by:
addPermission in interface PermissionCategory
Parameters:
permission - Permission to add

getValue

public java.lang.String getValue()
Description copied from interface: PermissionCategory
Returns a unique identifying value of the category.

Specified by:
getValue in interface PermissionCategory
Returns:
a unique identifying value of the category

setValue

public void setValue(java.lang.String value)
Sets the value of the permission category. The value acts as an identifier for the category

Parameters:
value - Value identifier of the permission category

getLabelId

public java.lang.String getLabelId()
Description copied from interface: PermissionCategory
Return the id of the label assosiated with this permission category.

Specified by:
getLabelId in interface PermissionCategory
Returns:
The label id of the category.

setLabelId

public void setLabelId(java.lang.String labelid)
Sets the labelid of this category. The id is mapped onto a label into the language resource file.

Parameters:
labelid - id of the label to set

equals

public boolean equals(PermissionCategory permissionCategory)
Returns if the permission category provided equals this permission category.

Parameters:
permissionCategory - Permission category to be compared
Returns:
true if the permission category provided is the same as this category

getName

public java.lang.String getName()
Description copied from interface: PermissionCategory
Return the language dependent description of the permission category.

Specified by:
getName in interface PermissionCategory
Returns:
the language dependent description of the permission category

setShowAsComponent

public void setShowAsComponent(boolean showAsComponent)
Set if the permission category should also be visible in the components tab of the Web Initiative configuration panel.

Parameters:
showAsComponent - if true the category will be shown as component in the Web Initiative configuration panel

getShowAsComponent

public boolean getShowAsComponent()
Description copied from interface: PermissionCategory
Return if the permission category should also be visible in the components tab of the Web Initiative configuration panel

Specified by:
getShowAsComponent in interface PermissionCategory
Returns:
true if the permission category should also be visible in the components tab of the Web Initiative configuration panel, false otherwise


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