| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.cms.ac.DocumentPolicyManagerWrapper
public class DocumentPolicyManagerWrapper
A PolicyManager which is capable of mapping all URLs of a document to the appropriate canonical
 URL, e.g. /foo/bar_de.print.html is mapped to /foo/bar.
| Field Summary | 
|---|
| Fields inherited from interface org.apache.lenya.ac.PolicyManager | 
|---|
ROLE | 
| Constructor Summary | |
|---|---|
DocumentPolicyManagerWrapper()
Ctor.  | 
|
| Method Summary | |
|---|---|
 void | 
accreditableAdded(AccreditableManager manager,
                  Accreditable accreditable)
Called when an accreditable was added.  | 
 void | 
accreditableRemoved(AccreditableManager manager,
                    Accreditable accreditable)
Called when an accreditable was removed.  | 
 DefaultPolicy | 
buildSubtreePolicy(AccreditableManager controller,
                   java.lang.String url)
Builds a subtree policy from a file.  | 
 DefaultPolicy | 
buildURLPolicy(AccreditableManager controller,
               java.lang.String url)
Builds the URL policy for a URL from a file.  | 
 void | 
configure(org.apache.avalon.framework.configuration.Configuration configuration)
 | 
 void | 
dispose()
 | 
 DefaultPolicy[] | 
getPolicies(AccreditableManager controller,
            java.lang.String url)
Returns the existing policies for all URL steps, beginning with the root policy.  | 
 Policy | 
getPolicy(AccreditableManager controller,
          java.lang.String url)
Returns the policy for a given page.  | 
 InheritingPolicyManager | 
getPolicyManager()
 | 
protected  java.lang.String | 
getPolicyURL(java.lang.String webappUrl)
Returns the URI which is used to obtain the policy for a webapp URL.  | 
protected  Publication | 
getPublication(java.lang.String url)
Returns the publication for a certain URL.  | 
protected  org.apache.avalon.framework.service.ServiceManager | 
getServiceManager()
Returns the service manager.  | 
 void | 
saveSubtreePolicy(java.lang.String url,
                  DefaultPolicy policy)
Saves a Subtree policy.  | 
 void | 
saveURLPolicy(java.lang.String url,
              DefaultPolicy policy)
Saves a URL policy.  | 
 void | 
service(org.apache.avalon.framework.service.ServiceManager manager)
 | 
 void | 
setPolicyManager(InheritingPolicyManager policyManager)
 | 
| 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 | 
| Constructor Detail | 
|---|
public DocumentPolicyManagerWrapper()
| Method Detail | 
|---|
protected java.lang.String getPolicyURL(java.lang.String webappUrl)
                                 throws AccessControlException
webappUrl - The webapp URL.
AccessControlException - when something went wrong.
protected Publication getPublication(java.lang.String url)
                              throws AccessControlException
url - The webapp url.
AccessControlException - when the publication could not be created.protected org.apache.avalon.framework.service.ServiceManager getServiceManager()
public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceableorg.apache.avalon.framework.service.ServiceExceptionServiceable.service(org.apache.avalon.framework.service.ServiceManager)public InheritingPolicyManager getPolicyManager()
public void setPolicyManager(InheritingPolicyManager policyManager)
policyManager - The policyManager to set.
public DefaultPolicy buildURLPolicy(AccreditableManager controller,
                                    java.lang.String url)
                             throws AccessControlException
InheritingPolicyManager
buildURLPolicy in interface InheritingPolicyManagercontroller - The access controller to use.url - The URL inside the web application.
AccessControlException - when something went wrong.InheritingPolicyManager.buildURLPolicy(org.apache.lenya.ac.AccreditableManager,
      java.lang.String)
public DefaultPolicy buildSubtreePolicy(AccreditableManager controller,
                                        java.lang.String url)
                                 throws AccessControlException
InheritingPolicyManager
buildSubtreePolicy in interface InheritingPolicyManagercontroller - The access controller to use.url - The URL inside the web application.
AccessControlException - when something went wrong.InheritingPolicyManager.buildSubtreePolicy(org.apache.lenya.ac.AccreditableManager,
      java.lang.String)
public DefaultPolicy[] getPolicies(AccreditableManager controller,
                                   java.lang.String url)
                            throws AccessControlException
InheritingPolicyManager
getPolicies in interface InheritingPolicyManagercontroller - The accreditable manager to use.url - The URL inside the web application.
AccessControlException - when something went wrong.InheritingPolicyManager.getPolicies(org.apache.lenya.ac.AccreditableManager,
      java.lang.String)
public void saveURLPolicy(java.lang.String url,
                          DefaultPolicy policy)
                   throws AccessControlException
InheritingPolicyManager
saveURLPolicy in interface InheritingPolicyManagerurl - The URL to save the policy for.policy - The policy to save.
AccessControlException - when something went wrong.InheritingPolicyManager.saveURLPolicy(java.lang.String,
      org.apache.lenya.ac.impl.DefaultPolicy)
public void saveSubtreePolicy(java.lang.String url,
                              DefaultPolicy policy)
                       throws AccessControlException
InheritingPolicyManager
saveSubtreePolicy in interface InheritingPolicyManagerurl - The url to save the policy for.policy - The policy to save.
AccessControlException - when something went wrong.InheritingPolicyManager.saveSubtreePolicy(java.lang.String,
      org.apache.lenya.ac.impl.DefaultPolicy)
public Policy getPolicy(AccreditableManager controller,
                        java.lang.String url)
                 throws AccessControlException
PolicyManager
getPolicy in interface PolicyManagercontroller - The access controller.url - The url inside the web application.
AccessControlException - when something went wrong.PolicyManager.getPolicy(org.apache.lenya.ac.AccreditableManager,
      java.lang.String)
public void accreditableRemoved(AccreditableManager manager,
                                Accreditable accreditable)
                         throws AccessControlException
PolicyManager
accreditableRemoved in interface PolicyManagermanager - The accreditable manager the accreditable belonged to.accreditable - The accreditable that was removed.
AccessControlException - when something went wrong.PolicyManager.accreditableRemoved(org.apache.lenya.ac.AccreditableManager,
      org.apache.lenya.ac.Accreditable)
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(org.apache.avalon.framework.configuration.Configuration)public void dispose()
dispose in interface org.apache.avalon.framework.activity.DisposableDisposable.dispose()
public void accreditableAdded(AccreditableManager manager,
                              Accreditable accreditable)
                       throws AccessControlException
PolicyManager
accreditableAdded in interface PolicyManagermanager - The accreditable manager the accreditable belonged to.accreditable - The accreditable that was removed.
AccessControlException - when something went wrong.PolicyManager.accreditableAdded(org.apache.lenya.ac.AccreditableManager, org.apache.lenya.ac.Accreditable)
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||