com.arsdigita.cms.ui.role
Class RoleFactory

java.lang.Object
  extended bycom.arsdigita.cms.ui.role.RoleFactory

public class RoleFactory
extends Object

This class contains helper methods for creating roles in a content section.

Version:
$Id: //cms/dev/src/com/arsdigita/cms/ui/role/RoleFactory.java#7 $
Author:
Michael Pih

Field Summary
static String CMS_PRIVILEGES
           
static String CMS_ROLE_PRIVILEGES
           
static String PRETTY_NAME
           
static String PRIVILEGE
           
static String SORT_ORDER
           
static String versionId
           
 
Constructor Summary
RoleFactory()
           
 
Method Summary
static String getPrivilegeLabel(String privilege)
          Get the pretty name of a CMS privilege.
static com.arsdigita.persistence.DataQuery getRolePrivileges(BigDecimal sectionId, BigDecimal granteeId)
          Fetch the CMS privileges associated with a role and content section.
static String[] getRolePrivileges(ContentSection section, com.arsdigita.kernel.Role role)
          Fetch the CMS privileges associated with a role and content section.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

CMS_ROLE_PRIVILEGES

public static final String CMS_ROLE_PRIVILEGES
See Also:
Constant Field Values

PRIVILEGE

public static final String PRIVILEGE
See Also:
Constant Field Values

SORT_ORDER

public static final String SORT_ORDER
See Also:
Constant Field Values

CMS_PRIVILEGES

public static final String CMS_PRIVILEGES
See Also:
Constant Field Values

PRETTY_NAME

public static final String PRETTY_NAME
See Also:
Constant Field Values
Constructor Detail

RoleFactory

public RoleFactory()
Method Detail

getRolePrivileges

public static String[] getRolePrivileges(ContentSection section,
                                         com.arsdigita.kernel.Role role)
Fetch the CMS privileges associated with a role and content section.

Parameters:
section - The content section
role - The role
Returns:
An array of privileges

getRolePrivileges

public static com.arsdigita.persistence.DataQuery getRolePrivileges(BigDecimal sectionId,
                                                                    BigDecimal granteeId)
Fetch the CMS privileges associated with a role and content section.

Parameters:
sectionId - The id of the content section
granteeId - The id of the group of the role
Returns:
DataQuery containing privileges associated with the role and content section.

getPrivilegeLabel

public static String getPrivilegeLabel(String privilege)
Get the pretty name of a CMS privilege. MP: Globalize the privilege label.

Parameters:
privilege - The privilege key
Returns:
The pretty name of a privilege


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC