Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceParameters


                    throw new ProcessingException("Transformer exception: " + local, local);
                }
            }
            if (user == null || node == null) {
                final String newUserResource = handler.getNewUserResource();
                final SourceParameters newUsersPars = handler.getNewUserResourceParameters();
                if (parameters == null) parameters = new SourceParameters();
                parameters.add(newUsersPars);

                if (handler.getApplicationName() != null)
                    parameters.setSingleParameterValue("application", handler.getApplicationName());
                parameters.setSingleParameterValue("type", "user");
View Full Code Here


        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("BEGIN deleteRole role="+name+", parameters="+parameters);
        }
        if (handler.getDeleteRoleResource() != null) {
            final String deleteRoleResource = handler.getDeleteRoleResource();
            final SourceParameters handlerPars = handler.getDeleteRoleResourceParameters();
            if (parameters == null) parameters = new SourceParameters();
            parameters.add(handlerPars);

            if (handler.getApplicationName() != null)
                parameters.setSingleParameterValue("application", handler.getApplicationName());
            parameters.setSingleParameterValue("type", "role");
View Full Code Here

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("BEGIN deleteUser role="+role+", ID="+name+", parameters="+parameters);
        }
        if (handler.getDeleteUserResource() != null) {
            final String deleteUserResource = handler.getDeleteUserResource();
            final SourceParameters handlerPars = handler.getDeleteUserResourceParameters();
            if (parameters == null) parameters = new SourceParameters();
            parameters.add(handlerPars);

            if (handler.getApplicationName() != null)
                parameters.setSingleParameterValue("application", handler.getApplicationName());
            parameters.setSingleParameterValue("type", "user");
View Full Code Here

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("BEGIN changeUser role="+role+", ID="+name+", parameters="+parameters);
        }
        if (handler.getChangeUserResource() != null) {
            final String changeUserResource = handler.getChangeUserResource();
            final SourceParameters handlerPars = handler.getChangeUserResourceParameters();
            if (parameters == null) parameters = new SourceParameters();
            parameters.add(handlerPars);

            if (handler.getApplicationName() != null)
                parameters.setSingleParameterValue("application", handler.getApplicationName());
            parameters.setSingleParameterValue("type", "user");
View Full Code Here

        NamespaceAccessToken nat = m_repository.getNamespaceToken(namespace);
        if (nat == null) {
            throw new SourceException("No such namespace: " + namespace);
        }

        SourceParameters queryParameters = null;

        if (query == null || query.length() == 0) {
            queryParameters = new SourceParameters();
        } else {
            queryParameters = new SourceParameters(query);
        }

        String version = queryParameters.getParameter("version",null);
        String scope   = queryParameters.getParameter("scope",
            nat.getNamespaceConfig().getFilesPath());
       
        if (getLogger().isDebugEnabled()) {
            getLogger().debug("scheme: " + scheme);
            getLogger().debug("principal: " + principal);
View Full Code Here

        UserHandler handler = this.getUserHandler( handlerName );
        final boolean authenticated = ( handler != null );
        if ( !authenticated ) {
            if (redirector != null) {
                // create parameters
                SourceParameters parameters = config.getRedirectParameters();
                if (parameters == null) parameters = new SourceParameters();
                final Request request = this.getRequest();
                String resource = request.getRequestURI();
                if (request.getQueryString() != null) {
                    resource += '?' + request.getQueryString();
                }
   
                parameters.setSingleParameterValue("resource", resource);
                final String redirectURI = config.getRedirectURI();
                redirector.globalRedirect(false, SourceUtil.appendParameters(redirectURI, parameters));
            }
        } else {
            // update state
View Full Code Here

    return authenticated;
  }

    public String getForwardingURI(String handlerName) throws ProcessingException {
        HandlerConfiguration config = this.getHandlerConfiguration( handlerName );
        SourceParameters parameters = config.getRedirectParameters();
        if (parameters == null) parameters = new SourceParameters();
        final Request request = this.getRequest();
        String resource = request.getRequestURI();
        if (request.getQueryString() != null) {
            resource += '?' + request.getQueryString();
        }
   
        parameters.setSingleParameterValue("resource", resource);
        final String redirectURI = config.getRedirectURI();
        return SourceUtil.appendParameters(redirectURI, parameters);
    }
View Full Code Here

        // first step: encode parameters which are already appended to the url
        int queryPos = uri.indexOf('?');

        if (queryPos!=-1) {
            String queryString = uri.substring(queryPos+1);
            SourceParameters queries = new SourceParameters(queryString);

            if (queries.hasParameters()) {
                StringBuffer buffer;

                buffer = new StringBuffer(uri.substring(0, queryPos));
                String current;
                Iterator iter = queries.getParameterNames();
                char separator = '?';
                Iterator values;

                while (iter.hasNext()==true) {
                    current = (String) iter.next();
                    values = queries.getParameterValues(current);
                    while (values.hasNext()) {
                        buffer.append(separator).append(current).append('=').append(org.apache.excalibur.source.SourceUtil.encode((String) values.next()));
                        separator = '&';
                    }
                }
View Full Code Here

                    props.put(OutputKeys.ENCODING, "ISO-8859-1");
                    content = XMLUtils.serializeNode(frag, props);
        }
       
                if (parameters==null) {
                    parameters = new SourceParameters();
                } else {
                    parameters = (SourceParameters) parameters.clone();
                }
                parameters.setSingleParameterValue("content", content);
                source = SourceUtil.getSource(location, typeParameters,
View Full Code Here

        if (this.getLogger().isDebugEnabled()) {
            this.getLogger().debug("BEGIN endParametersRecording source="+source);
        }
        this.sendEndPrefixMapping();
        ParametersRecorder recorder = (ParametersRecorder)this.removeRecorder();
        SourceParameters pars = recorder.getParameters(source);

        if (this.getLogger().isDebugEnabled()) {
            this.getLogger().debug("END endParametersRecording parameters="+pars);
        }
        return pars;
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.SourceParameters

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.