|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.lenya.cms.usecase.AbstractUsecase org.apache.lenya.cms.ac.usecases.AccessControlUsecase org.apache.lenya.cms.ac.usecases.AccessControl
public class AccessControl
Usecase to display the AccessControl tab in the site area for a document. This is a mix-in class that ideally would inherit both from AccessControlUsecase and DocumentUsecase. FIXME i just took the appropriate code from DocumentUsecase, maybe its possible to have a saner inheritance?
Field Summary | |
---|---|
protected static java.lang.String |
AC_AREA
|
protected static java.lang.String |
ADD
|
protected static java.lang.String |
ANCESTOR_SSL
|
protected static java.lang.String |
DELETE
|
protected static java.lang.String |
DOCUMENT
|
protected static java.lang.String |
DOWN
|
protected static java.lang.String |
GROUP
|
protected static java.lang.String |
IPRANGE
|
protected static java.lang.String |
PARENT_CREDENTIALS
|
protected static java.lang.String |
ROLE
|
protected static java.lang.String |
SSL
|
protected static java.lang.String |
SUB_CREDENTIALS
|
protected static java.lang.String |
SUB_GROUP
|
protected static java.lang.String |
SUB_IPRANGE
|
protected static java.lang.String |
SUB_USER
|
protected static java.lang.String |
UP
|
protected static java.lang.String |
USER
|
protected static java.lang.String |
WORLD
|
Fields inherited from class org.apache.lenya.cms.usecase.AbstractUsecase |
---|
ATTRIBUTE_NAME, ATTRIBUTE_POLICY, ATTRIBUTE_USECASE, ATTRIBUTE_VALUE, context, ELEMENT_EXIT, ELEMENT_PARAMETER, ELEMENT_TRANSACTION, ELEMENT_VIEW, ERROR_OBJECTS_CHECKED_OUT, EVENT_CHECK_EXECUTION_CONDITIONS, EVENT_CHECK_POSTCONDITIONS, EVENT_CHECK_PRECONDITIONS, EVENT_EXECUTE, manager, MODEL, PARAMETER_CHECKOUT_RESTRICTED_TO_SESSION, PARAMETER_FACTORY, PARAMETER_SESSION, PARAMETER_STATE_MACHINE, PARAMETERS_INITIALIZED, SOURCE_URL, TRANSITIONS, VALUE_OPTIMISTIC, VALUE_PESSIMISTIC |
Constructor Summary | |
---|---|
AccessControl()
|
Method Summary | |
---|---|
protected boolean |
containsCredential(org.apache.lenya.ac.ModifiablePolicy policy,
org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role)
|
protected void |
doCheckExecutionConditions()
|
protected void |
doCheckPreconditions()
|
void |
doExecute()
|
protected org.apache.lenya.ac.Accreditable |
getAccreditable(java.lang.String type,
java.lang.String id)
|
protected org.apache.lenya.ac.AccreditableManager |
getAccreditableManager()
|
CredentialWrapper[] |
getCredentials(boolean inherit)
Returns the credentials of the policy of the selected URL. |
CredentialWrapper[] |
getParentCredentials()
Returns the credential wrappers for the parent URI of the URL belonging to the request of this object model. |
protected org.apache.lenya.ac.ModifiablePolicy[] |
getPolicies(boolean inherit)
Returns the policies for a certain URL. |
protected org.apache.lenya.ac.ModifiablePolicy |
getPolicy()
|
protected org.apache.lenya.ac.InheritingPolicyManager |
getPolicyManager()
|
protected java.lang.String |
getPolicyURL()
|
CredentialWrapper[] |
getSubtreeCredentials()
Returns the credential wrappers for the request of this object model. |
protected void |
initParameters()
|
protected boolean |
isAncestorSSLProtected()
Returns if one of the ancestors of this URL is SSL protected. |
protected boolean |
isSSLProtected()
Returns if one of the ancestors of this URL is SSL protected. |
protected void |
manipulateCredential(org.apache.lenya.ac.Accreditable accreditable,
org.apache.lenya.ac.Role role,
java.lang.String operation,
java.lang.String method)
Changes a credential by adding or deleting an item for a role. |
protected void |
setSSLProtected(boolean ssl)
Sets if this URL is SSL protected. |
Methods inherited from class org.apache.lenya.cms.ac.usecases.AccessControlUsecase |
---|
getAccessController, getGroupManager, getIpRangeManager, getRoleManager, getUserManager, initializeAccessController |
Methods inherited from class org.apache.lenya.cms.usecase.AbstractUsecase |
---|
addErrorMessage, addErrorMessage, addErrorMessages, addInfoMessage, addInfoMessage, advance, advanceState, cancel, canCheckOut, checkEvent, checkExecutionConditions, checkoutRestrictedToSession, checkPostconditions, checkPreconditions, clearErrorMessages, clearInfoMessages, configure, contextualize, deleteParameter, doCheckPostconditions, doInitialize, dumpErrorMessages, execute, getBooleanCheckboxParameter, getContext, getDocumentFactory, getErrorMessages, getExitQueryString, getInfoMessages, getName, getNodesToLock, getParameter, getParameter, getParameterAsBoolean, getParameterAsInteger, getParameterAsString, getParameterAsString, getParameterNames, getParameters, getPart, getSession, getSourceURL, getStateMachine, getTargetURL, getView, hasErrors, hasInfoMessages, initialize, initializeParametersIfNotDone, isOptimistic, lockInvolvedObjects, lockInvolvedObjects, prepareView, service, setDefaultTargetURL, setExitParameter, setName, setParameter, setPart, setSession, setSourceURL, setTestSession, setView, startTransaction |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String AC_AREA
protected static final java.lang.String ADD
protected static final java.lang.String DELETE
protected static final java.lang.String UP
protected static final java.lang.String DOWN
protected static final java.lang.String USER
protected static final java.lang.String GROUP
protected static final java.lang.String IPRANGE
protected static final java.lang.String WORLD
protected static final java.lang.String ROLE
protected static final java.lang.String SUB_USER
protected static final java.lang.String SUB_GROUP
protected static final java.lang.String SUB_IPRANGE
protected static final java.lang.String SSL
protected static final java.lang.String ANCESTOR_SSL
protected static final java.lang.String DOCUMENT
protected static final java.lang.String SUB_CREDENTIALS
protected static final java.lang.String PARENT_CREDENTIALS
Constructor Detail |
---|
public AccessControl()
Method Detail |
---|
protected void initParameters()
initParameters
in class org.apache.lenya.cms.usecase.AbstractUsecase
AbstractUsecase.initParameters()
protected void doCheckPreconditions() throws java.lang.Exception
doCheckPreconditions
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
AbstractUsecase.doCheckPreconditions()
protected void doCheckExecutionConditions() throws java.lang.Exception
doCheckExecutionConditions
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
public void doExecute() throws java.lang.Exception
doExecute
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
AbstractUsecase.doExecute()
protected org.apache.lenya.ac.Accreditable getAccreditable(java.lang.String type, java.lang.String id)
protected boolean isAncestorSSLProtected() throws org.apache.cocoon.ProcessingException
org.apache.cocoon.ProcessingException
- when something went wrong.protected boolean isSSLProtected() throws org.apache.cocoon.ProcessingException
org.apache.cocoon.ProcessingException
- when something went wrong.protected void setSSLProtected(boolean ssl) throws org.apache.cocoon.ProcessingException
ssl
- A boolean value.
org.apache.cocoon.ProcessingException
- when something went wrong.protected org.apache.lenya.ac.InheritingPolicyManager getPolicyManager()
protected org.apache.lenya.ac.AccreditableManager getAccreditableManager()
protected void manipulateCredential(org.apache.lenya.ac.Accreditable accreditable, org.apache.lenya.ac.Role role, java.lang.String operation, java.lang.String method) throws org.apache.cocoon.ProcessingException
accreditable
- The accreditable to add or delete.role
- The role.operation
- The operation, either ADD
or DELETE
.method
-
org.apache.cocoon.ProcessingException
- when something went wrong.protected org.apache.lenya.ac.ModifiablePolicy getPolicy() throws org.apache.lenya.ac.AccessControlException
org.apache.lenya.ac.AccessControlException
protected boolean containsCredential(org.apache.lenya.ac.ModifiablePolicy policy, org.apache.lenya.ac.Accreditable accreditable, org.apache.lenya.ac.Role role) throws org.apache.lenya.ac.AccessControlException
org.apache.lenya.ac.AccessControlException
public CredentialWrapper[] getSubtreeCredentials() throws org.apache.cocoon.ProcessingException
org.apache.cocoon.ProcessingException
- when something went wrong.public CredentialWrapper[] getParentCredentials() throws org.apache.cocoon.ProcessingException
org.apache.cocoon.ProcessingException
- when something went wrong.public CredentialWrapper[] getCredentials(boolean inherit) throws org.apache.cocoon.ProcessingException
org.apache.cocoon.ProcessingException
- when something went wrong.protected org.apache.lenya.ac.ModifiablePolicy[] getPolicies(boolean inherit) throws org.apache.cocoon.ProcessingException
inherit
- If true, all ancestor policies are returned. Otherwise,
only the URL policies are returned.
org.apache.cocoon.ProcessingException
- when something went wrong.protected java.lang.String getPolicyURL()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |