Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.Policy


                            } else {
                                // document is live
                                //if ssl, add prefix, if not, check for live mount point and apply if present
                                try {
                                    String url = urlPrefix + documentId;
                                    Policy policy = policyManager.getPolicy(accreditableManager, url);
                                    if (policy.isSSLProtected()) {
                                            log.debug(" live is SSL protected");
                                     // add prefix  
                                        newAttrs.setValue(
                                                i,
                                                sslPrefix + documentId + languageExtension + ".html");
                                    }
                                    else {
                                        // check for live mount point
                                        newAttrs.setValue(
                                        i,
                                        getNewHrefValue(languageExtension, documentId));
                                    }
                                   
                                    }
                                    catch (AccessControlException e) {
                                      throw new SAXException(e);
                                    }

                            }
                        } else {
                            // authoring area
                            // if ssl, add prefix to newhrefvalue, if not, take
                            // just newhrefvalue
                            try {
                                String url = urlPrefix + documentId;
                                String finalurl;
                                Policy policy = policyManager.getPolicy(accreditableManager, url);
                                if (policy.isSSLProtected()) {
                                 // add prefix
                                        log.debug(" authoring is SSL protected");
                                        log.debug(" ssl prefix: " + sslPrefix);
                                        finalurl = sslPrefix + documentId + languageExtension + ".html";
                                        log.debug(" finalurl: " + finalurl);                                       
View Full Code Here


                getLogger().debug("    URL:         [" + urlPrefix + documentId + "]");
            }

            try {
                String url = urlPrefix + documentId;
                Policy policy = policyManager.getPolicy(accreditableManager, url);
                Role[] roles = policy.getRoles(identity);

                getLogger().debug("    Roles:       [" + roles.length + "]");

                if (roles.length == 0) {
                    getLogger().debug("    Adding attribute [protected='true']");
View Full Code Here

TOP

Related Classes of org.apache.lenya.ac.Policy

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.