Examples of SourceParameters


Examples of com.google.gdt.eclipse.designer.nls.SourceParameters

    IEditableSupport editableSupport = support.getEditable();
    // prepare editable source
    IEditableSource editableSource = NlsTestUtils.createEmptyEditable("test.client.MyConstants");
    editableSource.setKeyGeneratorStrategy(GwtSource.GWT_KEY_GENERATOR);
    // prepare parameters
    SourceParameters parameters = new SourceParameters();
    IJavaProject javaProject = m_lastEditor.getJavaProject();
    {
      parameters.m_constant = new SourceClassParameters();
      SourceClassParameters constant = parameters.m_constant;
      constant.m_sourceFolder = javaProject.findPackageFragmentRoot(new Path("/TestProject/src"));
View Full Code Here

Examples of org.apache.avalon.excalibur.source.SourceParameters

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

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

Examples of org.apache.avalon.excalibur.source.SourceParameters

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

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

Examples of org.apache.avalon.excalibur.source.SourceParameters

        // Element: loadxml
        } else if (name.equals(LOADCONTEXT_ELEMENT) == true) {
            String path       = (String)stack.pop();
            String contextName = (String)stack.pop();
            SourceParameters pars = this.endParametersRecording((SourceParameters)null);
            pars.setSingleParameterValue("contextname", contextName);
            pars.setSingleParameterValue("path", path);

            DocumentFragment frag = null;
            this.getSunShineComponent().getContext(contextName).loadXML(path,
                                                                        pars,
                                                                        this.objectModel,
                                                                        this.resolver,
                                                                        this.manager);
        // Element context url
        } else if (name.equals(SunShinePreTransformer.CONTEXT_URL_ELEMENT) == true) {
            this.ignoreEventsCount--;
            String contextUrl = this.request.getScheme() + "://" +
                                this.request.getServerName() + ":" +
                                this.request.getServerPort() +
                                this.request.getContextPath();
            this.sendTextEvent(contextUrl);

        // Element link
        } else if (name.equals(LINK_ELEMENT) == true) {
            String linkName = null;
            String target = null;
            String medium = null;
            String text = this.endSerializedXMLRecording();
            String element;
            do {
                element = (String)this.stack.pop();
                if (element.equals("LINK") == true) {
                    linkName = (String)this.stack.pop();
                } else if (element.equals("TARGET") == true) {
                    target = (String)this.stack.pop();
                } else if (element.equals("MEDIUM") == true) {
                    medium = (String)this.stack.pop();
                }
            } while (element.equals("LINK") == false);

            if (this.currentLinkResource != null) {
                SourceParameters pars = new SourceParameters();
                pars.setParameter("name", linkName);
                if (target != null) {
                    pars.setParameter("target", target);
                }
                if (medium != null) {
                    pars.setParameter("medium", medium);
                }
                pars.setParameter("text", text);
                this.getResourceConnector().streamXML(this.currentLinkResource.getResourceType(),
                      null,
                      this.currentLinkResource.getResourceIdentifier(),
                      pars,
                      this.contentHandler,
View Full Code Here

Examples of org.apache.avalon.excalibur.source.SourceParameters

        // Element: savexml
        } else if (name.equals(SAVECONTEXT_ELEMENT) == true) {
            String path        = (String)stack.pop();
            String contextName = (String)stack.pop();
            SourceParameters pars = this.endParametersRecording((SourceParameters)null);
            pars.setSingleParameterValue("contextname", contextName);
            pars.setSingleParameterValue("path", path);

            this.getSunShineComponent().getContext(contextName).saveXML(path,
                                                                        pars,
                                                                        this.objectModel,
                                                                        this.resolver,
View Full Code Here

Examples of org.apache.avalon.excalibur.source.SourceParameters

        // 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(SourceUtil.encode((String)values.next()));
View Full Code Here

Examples of org.apache.avalon.excalibur.source.SourceParameters

        Properties format = XMLUtil.defaultSerializeToXMLFormat(true);
        this.setOutputKeys(format, typeParameters);
        String content = XMLUtil.serializeNode(fragment, format);
        if (resourceParameters == null) {
            resourceParameters = new SourceParameters();
        } else {
            resourceParameters = (SourceParameters)resourceParameters.clone();
        }
        resourceParameters.setSingleParameterValue("content", content);
View Full Code Here

Examples of org.apache.avalon.excalibur.source.SourceParameters

        if (uri == null || uri.trim().length() == 0) {
            throw new IllegalArgumentException("saveContentToURI: URI is required");
        }

        if (resourceParameters == null) {
            resourceParameters = new SourceParameters();
        } else {
            resourceParameters = (SourceParameters)resourceParameters.clone();
        }
        resourceParameters.setSingleParameterValue("content", content);
View Full Code Here

Examples of org.apache.avalon.excalibur.source.SourceParameters

     * If source is null a new Parameters object is created
     * Otherwise they are joined.
     */
    public ParametersRecorder() {
        super();
        this.parameters = new SourceParameters();
    }
View Full Code Here

Examples of org.apache.excalibur.source.SourceParameters

        // are we already logged in?
        UserHandler handler = this.getUserHandler( handlerName );
        final boolean authenticated = ( handler != null );
        if ( !authenticated ) {
            // 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
            RequestState state = new RequestState( handler, applicationName, this.resolver );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.