Package org.fcrepo.server.security

Examples of org.fcrepo.server.security.Authorization


                throw new InternalError500Exception(request,
                                                    actionLabel,
                                                    "server not available",
                                                    new String[0]);
            }
            Authorization authModule = null;
            authModule =
                    m_server.getBean("org.fcrepo.server.security.Authorization", Authorization.class);
            if (authModule == null) {
                throw new InternalError500Exception(request,
                                                    actionLabel,
                                                    "Required Authorization module not available",
                                                    new String[0]);
            }
            try {
                authModule.reloadPolicies(context);
            } catch (AuthzOperationalException aoe) {
                throw new Forbidden403Exception(request,
                                                actionLabel,
                                                "authorization failed",
                                                new String[0]);
View Full Code Here


    public OAIResponder getResponder() throws RepositoryException {
        if (m_responder == null) {
            try {
                OAIProvider provider = m_server
                        .getBean("org.fcrepo.oai.OAIProvider", OAIProvider.class);
                Authorization authz = m_server
                        .getBean("org.fcrepo.server.security.Authorization", Authorization.class);
                m_responder = new OAIResponder(provider, authz);
            } catch (Exception e) {
                throw new RepositoryException(e.getClass().getName() + ": "
                        + e.getMessage());
View Full Code Here

            URL fileUrl = new URL(params.getUrl());
            File cFile = new File(fileUrl.toURI()).getCanonicalFile();
            // security check
            URI cURI = cFile.toURI();
            logger.info("Checking resolution security on " + cURI);
            Authorization authModule = getServer()
                    .getBean("org.fcrepo.server.security.Authorization", Authorization.class);
            if (authModule == null) {
                throw new GeneralException(
                "Missing required Authorization module");
            }
            authModule.enforceRetrieveFile(params.getContext(), cURI.toString());
            // end security check
            String mimeType = params.getMimeType();

            // if mimeType was not given, try to determine it automatically
            if (mimeType == null || mimeType.equalsIgnoreCase("")){
View Full Code Here

TOP

Related Classes of org.fcrepo.server.security.Authorization

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.