org.mycore.frontend.wcms
Class MCRWCMSUtilities

java.lang.Object
  extended by org.mycore.frontend.wcms.MCRWCMSUtilities

public class MCRWCMSUtilities
extends Object


Field Summary
(package private) static String PERM_RIGHTS_MANAGEMENT_READ_ACCESS
           
(package private) static String PERM_RIGHTS_MANAGEMENT_WCMS_ACCESS
           
(package private) static String WRITE_PERMISSION_WEBPAGE
           
(package private) static XPath xpath
           
 
Constructor Summary
MCRWCMSUtilities()
           
 
Method Summary
static String getPermRightsManagementReadAccess()
           
static String getPermRightsManagementWCMSAccess()
           
static Document getWritableNavi()
          Returns a filtered navigation.xml, according to current logged in users WCMS-Write permissions.
static Document getWritableNavi(String userID)
          Returns a filtered navigation.xml, according to the given user WCMS-Write permissions.
static String getWritePermissionWebpage()
           
static boolean manageReadAccess()
           
static boolean manageWCMSAccess()
           
static boolean writeAccess(String webpageID)
          Verifies a given webpage-ID (//item/@href) from navigation.xml on write permission, based on ACL-System.
protected static boolean writeAccessGeneral()
          Returns a boolean, signalling if the user has at least write access for 1 item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE_PERMISSION_WEBPAGE

static final String WRITE_PERMISSION_WEBPAGE
See Also:
Constant Field Values

PERM_RIGHTS_MANAGEMENT_READ_ACCESS

static final String PERM_RIGHTS_MANAGEMENT_READ_ACCESS
See Also:
Constant Field Values

PERM_RIGHTS_MANAGEMENT_WCMS_ACCESS

static final String PERM_RIGHTS_MANAGEMENT_WCMS_ACCESS
See Also:
Constant Field Values

xpath

static final XPath xpath
Constructor Detail

MCRWCMSUtilities

public MCRWCMSUtilities()
Method Detail

writeAccess

public static boolean writeAccess(String webpageID)
Verifies a given webpage-ID (//item/@href) from navigation.xml on write permission, based on ACL-System. To be used by XSL with Xalan-Java-Extension-Call

Parameters:
webpageID -
Returns:
True if access granted, false if access is forbidden
Throws:
JDOMException
IOException

getWritableNavi

public static Document getWritableNavi()
                                throws JDOMException,
                                       IOException
Returns a filtered navigation.xml, according to current logged in users WCMS-Write permissions. Only menu items that are permitted to write on are given back.

Returns:
org.w3c.dom.Document with writable menu items.
Throws:
JDOMException
IOException

getWritableNavi

public static Document getWritableNavi(String userID)
                                throws JDOMException,
                                       IOException
Returns a filtered navigation.xml, according to the given user WCMS-Write permissions. Only menu items that are permitted to write on are given back.

Parameters:
userID, - a MCRUserID
Returns:
org.w3c.dom.Document with writable menu items.
Throws:
JDOMException
IOException

writeAccessGeneral

protected static boolean writeAccessGeneral()
Returns a boolean, signalling if the user has at least write access for 1 item.

Returns:
true, if access is granted for at least 1 item OR false, if the user has no access for any item
Throws:
JDOMException

getWritePermissionWebpage

public static String getWritePermissionWebpage()

getPermRightsManagementReadAccess

public static String getPermRightsManagementReadAccess()

getPermRightsManagementWCMSAccess

public static String getPermRightsManagementWCMSAccess()

manageReadAccess

public static boolean manageReadAccess()

manageWCMSAccess

public static boolean manageWCMSAccess()