Package org.apache.lenya.ac.impl

Examples of org.apache.lenya.ac.impl.DefaultPolicy


     */
    public CredentialWrapper[] getCredentials(boolean urlOnly) throws ProcessingException {

        List credentials = new ArrayList();

        DefaultPolicy policies[] = getPolicies(urlOnly);
        List policyCredentials = new ArrayList();
        for (int i = 0; i < policies.length; i++) {
            Credential[] creds = policies[i].getCredentials();
            for (int j = 0; j < creds.length; j++) {
                policyCredentials.add(creds[j]);
View Full Code Here


     */
    public void manipulateCredential(Item item, Role role, String operation)
        throws ProcessingException {

        try {
            DefaultPolicy policy =
                policyManager.buildSubtreePolicy(accessController.getAccreditableManager(), url);
            Accreditable accreditable = (Accreditable) item;

            if (operation.equals(ADD)) {
                policy.addRole(accreditable, role);
            } else if (operation.equals(DELETE)) {
                policy.removeRole(accreditable, role);
            }

            policyManager.saveSubtreePolicy(url, policy);

        } catch (Exception e) {
View Full Code Here

     * @throws ProcessingException when something went wrong.
     */
    public boolean isUrlSSLProtected() throws ProcessingException {
        boolean ssl;
        try {
            DefaultPolicy policy =
                policyManager.buildSubtreePolicy(accessController.getAccreditableManager(), url);
            ssl = policy.isSSLProtected();
        } catch (AccessControlException e) {
            throw new ProcessingException("Resolving policy failed: ", e);
        }
        return ssl;
    }
View Full Code Here

     * @param ssl A boolean value.
     * @throws ProcessingException when something went wrong.
     */
    public void setUrlSSLProtected(boolean ssl) throws ProcessingException {
        try {
            DefaultPolicy policy =
                policyManager.buildSubtreePolicy(accessController.getAccreditableManager(), url);
            policy.setSSL(ssl);
            policyManager.saveSubtreePolicy(url, policy);
        } catch (AccessControlException e) {
            throw new ProcessingException("Resolving policy failed: ", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.ac.impl.DefaultPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.