Examples of SunSpot


Examples of org.apache.cocoon.sunshine.sunspot.SunSpot

        if (name.equals(Constants.SESSION_CONTEXT_NAME) == true) {
            Request req = ObjectModelHelper.getRequest(objectModel);
            Session session = req.getSession(false);
            if (session != null) {

                SunSpot sunSpot = null;
                try {
                    sunSpot = (SunSpot)manager.lookup(SunSpot.ROLE);
                    // is this an external resource which wants access to a sunlet?
                    String value = req.getParameter("sunspotcontext");
                    if (value != null) {
                        int sepOne, sepTwo;
                        sepOne = value.indexOf('_');
                        if (sepOne != -1) {
                            sepTwo = value.indexOf('_', sepOne+1);
                            if (sepTwo != -1) {
                                String sunletIdentifier = value.substring(0, sepOne);
                                String sunletID = value.substring(sepOne+1, sepTwo);
                                String sunletNumber = value.substring(sepTwo+1);

                                if (sunletIdentifier.equals("sunlet") == true) {
                                    Map info = new HashMap(3);
                                    SessionContextImpl.sunLetInfo.set(info);

                                    SourceParameters pars = new SourceParameters();
                                    info.put(Constants.SUNLETINFO_PARAMETERS, pars);
                                    pars.setSingleParameterValue(Constants.PARAMETER_ID, sunletID);
                                    pars.setSingleParameterValue(Constants.PARAMETER_NUMBER, sunletNumber);
                                    pars.setSingleParameterValue(Constants.PARAMETER_MEDIA,
                                        (String)req.getAttribute(org.apache.cocoon.sunshine.sunrise.Constants.REQUEST_ATTRIBUTE_MEDIA_TYPE));

                                    info.put(Constants.SUNLETINFO_STATUSPROFILE, sunSpot.getStatusProfile());
                                    info.put(Constants.SUNLETINFO_PORTALURI, req.getRequestURI());
                                }
                            }
                        }
                    } else {
View Full Code Here

Examples of org.apache.cocoon.sunshine.sunspot.SunSpot

        if (name.equals(Constants.SESSION_CONTEXT_NAME) == true) {
            Request req = ObjectModelHelper.getRequest(objectModel);
            Session session = req.getSession(false);
            if (session != null) {

                SunSpot sunSpot = null;
                try {
                    sunSpot = (SunSpot)manager.lookup(SunSpot.ROLE);
                    // is this an external resource which wants access to a sunlet?
                    String value = req.getParameter("sunspotcontext");
                    if (value != null) {
                        int sepOne, sepTwo;
                        sepOne = value.indexOf('_');
                        if (sepOne != -1) {
                            sepTwo = value.indexOf('_', sepOne+1);
                            if (sepTwo != -1) {
                                String sunletIdentifier = value.substring(0, sepOne);
                                String sunletID = value.substring(sepOne+1, sepTwo);
                                String sunletNumber = value.substring(sepTwo+1);

                                if (sunletIdentifier.equals("sunlet") == true) {
                                    Map info = new HashMap(3);
                                    SessionContextImpl.sunLetInfo.set(info);

                                    SourceParameters pars = new SourceParameters();
                                    info.put(Constants.SUNLETINFO_PARAMETERS, pars);
                                    pars.setSingleParameterValue(Constants.PARAMETER_ID, sunletID);
                                    pars.setSingleParameterValue(Constants.PARAMETER_NUMBER, sunletNumber);
                                    pars.setSingleParameterValue(Constants.PARAMETER_MEDIA,
                                        (String)req.getAttribute(org.apache.cocoon.sunshine.sunrise.Constants.REQUEST_ATTRIBUTE_MEDIA_TYPE));

                                    info.put(Constants.SUNLETINFO_STATUSPROFILE, sunSpot.getStatusProfile());
                                    info.put(Constants.SUNLETINFO_PORTALURI, req.getRequestURI());
                                }
                            }
                        }
                    } else {
View Full Code Here

Examples of org.apache.cocoon.sunshine.sunspot.SunSpot

extends ComposerGenerator {

    public void generate()
    throws IOException, SAXException, ProcessingException {

        SunSpot sunSpot = null;
        try {
            sunSpot = (SunSpot) this.manager.lookup(SunSpot.ROLE);
            this.xmlConsumer.startDocument();

            Request request = ObjectModelHelper.getRequest(this.objectModel);
            if (request.getSession(false) != null) {
                sunSpot.showPortal(this.xmlConsumer, false, false);
            }
            this.xmlConsumer.endDocument();
        } catch (ComponentException ce) {
            throw new ProcessingException("Lookup of sunSpot failed.", ce);
        } finally {
View Full Code Here

Examples of org.apache.cocoon.sunshine.sunspot.SunSpot

                                   ", source="+source+
                                   ", par="+par);
        }
        final String sunLetID = par.getParameter("sunLet", null);

        SunSpot sunSpot = null;
        Map map = null;

        try {
            sunSpot = (SunSpot)this.manager.lookup( SunSpot.ROLE );
            sunSpot.configurationTest();
            if ( null != sunLetID) {
                sunSpot.checkAuthentication(redirector, sunLetID);
            }

        } finally {
            this.manager.release( sunSpot );
        }
View Full Code Here

Examples of org.apache.cocoon.sunshine.sunspot.SunSpot

        if (name.equals(Constants.SESSION_CONTEXT_NAME) == true) {
            Request req = ObjectModelHelper.getRequest(objectModel);
            Session session = req.getSession(false);
            if (session != null) {

                SunSpot sunSpot = null;
                try {
                    sunSpot = (SunSpot)manager.lookup(SunSpot.ROLE);
                    // is this an external resource which wants access to a sunlet?
                    String value = req.getParameter("sunspotcontext");
                    if (value != null) {
                        int sepOne, sepTwo;
                        sepOne = value.indexOf('_');
                        if (sepOne != -1) {
                            sepTwo = value.indexOf('_', sepOne+1);
                            if (sepTwo != -1) {
                                String sunletIdentifier = value.substring(0, sepOne);
                                String sunletID = value.substring(sepOne+1, sepTwo);
                                String sunletNumber = value.substring(sepTwo+1);

                                if (sunletIdentifier.equals("sunlet") == true) {
                                    Map info = new HashMap(3);
                                    SessionContextImpl.sunLetInfo.set(info);

                                    SourceParameters pars = new SourceParameters();
                                    info.put(Constants.SUNLETINFO_PARAMETERS, pars);
                                    pars.setSingleParameterValue(Constants.PARAMETER_ID, sunletID);
                                    pars.setSingleParameterValue(Constants.PARAMETER_NUMBER, sunletNumber);
                                    pars.setSingleParameterValue(Constants.PARAMETER_MEDIA,
                                        (String)req.getAttribute(org.apache.cocoon.sunshine.sunrise.Constants.REQUEST_ATTRIBUTE_MEDIA_TYPE));

                                    info.put(Constants.SUNLETINFO_STATUSPROFILE, sunSpot.getStatusProfile());
                                    info.put(Constants.SUNLETINFO_PORTALURI, req.getRequestURI());
                                }
                            }
                        }
                    } else {
View Full Code Here

Examples of org.apache.cocoon.sunshine.sunspot.SunSpot

extends ComposerGenerator {

    public void generate()
    throws IOException, SAXException, ProcessingException {

        SunSpot sunSpot = null;
        try {
            sunSpot = (SunSpot) this.manager.lookup(SunSpot.ROLE);
            this.xmlConsumer.startDocument();

            Request request = ObjectModelHelper.getRequest(this.objectModel);
            if (request.getSession(false) != null) {
                if (this.source == null
                    || this.source.equals("")
                    || this.source.equals("user") == true) {
                    sunSpot.showPortal(this.xmlConsumer, true, false);
                } else {
                    sunSpot.showAdminConf(this.xmlConsumer);
                }
            }

            this.xmlConsumer.endDocument();
        } catch (ComponentException ce) {
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.