Package oasis.names.tc.wsrp.v1.types

Examples of oasis.names.tc.wsrp.v1.types.ServiceDescription


     * Actual WSRP initCookie() call
     **/
    public void initCookie() throws WSRPException {
        InitCookie request = new InitCookie();

        RegistrationContext regCtx = producer.getRegistrationContext();
        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        try {

View Full Code Here


    public PortletDescriptionResponse getPortletDescription(String userID,
                                                            String[] desiredLocales)
    throws WSRPException {
        GetPortletDescription request = new GetPortletDescription();

        RegistrationContext regCtx = producer.getRegistrationContext();
        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        request.setPortletContext(getPortlet().getPortletContext());
View Full Code Here

    public PortletPropertyDescriptionResponse getPortletPropertyDescription(String userID)
    throws WSRPException {
        GetPortletPropertyDescription request = new GetPortletPropertyDescription();
        request.setPortletContext(getPortlet().getPortletContext());

        RegistrationContext regCtx = producer.getRegistrationContext();
        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        UserContext userCtx = getUserContext(userID);
        if (userCtx != null)
View Full Code Here

    throws WSRPException {
        GetPortletProperties request = new GetPortletProperties();
        request.setPortletContext(getPortlet().getPortletContext());
        request.setNames(names);

        RegistrationContext regCtx = producer.getRegistrationContext();
        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        UserContext userCtx = getUserContext(userID);
        if (userCtx != null)
View Full Code Here

    public PortletContext setPortletProperties(PropertyList properties, String userID)
    throws WSRPException {
        SetPortletProperties request = new SetPortletProperties();
        request.setPortletContext(getPortlet().getPortletContext());

        RegistrationContext regCtx = producer.getRegistrationContext();
        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        UserContext userCtx = getUserContext(userID);
        if (userCtx != null)
View Full Code Here

    protected Producer getProducer(String producerID) throws WSRPException {
        ProducerRegistry producerRegistry = getConsumerEnvironment().getProducerRegistry();
        Producer producer = producerRegistry.getProducer(producerID);
        if (producer == null) {
            // Create producer and register it
            RegistrationData regData = new RegistrationData();
            regData.setConsumerName("uPortal WSRP Consumer");
            regData.setConsumerAgent("uPortal WSRP Consumer");
            producer = new ProducerImpl(producerID, markupUrl, serviceDescUrl, regUrl, mgmtUrl, regData);
            producerRegistry.addProducer(producer);
        }
        //System.out.println("returning producer=" + producer.toString());
        return producer;
View Full Code Here

        return desc;
    }

    public static RegistrationData createRegistrationData(Configuration config,
                                                          ConsumerEnvironment env) {
        RegistrationData registrationData = new RegistrationData(
                env.getConsumerAgent(),
                env.getSupportedModes(),
                WSRPAdapter.CONSUMER_URL,  //consumer-name
                null,         //consumerUserScopes
                env.getSupportedWindowStates(),
View Full Code Here

                                     String userID)
    throws WSRPException {

        checkInitCookie(userID);

        ReleaseSessions request = new ReleaseSessions();

        RegistrationContext regCtx = producer.getRegistrationContext();
        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        request.setSessionIDs(sessionIDs);

        ReturnAny response = null;
        try {

            response = markupPort.releaseSessions(request);
View Full Code Here

        if (regCtx != null)
            request.setRegistrationContext(regCtx);

        request.setSessionIDs(sessionIDs);

        ReturnAny response = null;
        try {

            response = markupPort.releaseSessions(request);

        } catch (java.rmi.RemoteException wsrpFault) {
View Full Code Here

    /**
     * Create the runtime context for the current request.
     */
    protected RuntimeContext getRuntimeContext(WSRPBaseRequest request) {
        RuntimeContext runtimeContext = new RuntimeContext();
        runtimeContext.setUserAuthentication(consumerEnv.getUserAuthentication());
        runtimeContext.setPortletInstanceKey(request.getPortletInstanceKey());

        URLTemplateComposer templateComposer = consumerEnv.getTemplateComposer();
        if (templateComposer != null) {
            runtimeContext.setNamespacePrefix(templateComposer.getNamespacePrefix());
        }

        Boolean doesUrlTemplateProcess = null;
        try {

            PortletDescription desc = producer.getPortletDescription(getPortlet().getParent());

            if (desc != null) {

                doesUrlTemplateProcess = desc.getDoesUrlTemplateProcessing();
            }

        } catch (WSRPException e) {

            // do nothing since exception has been logged already
            // continue with assumption that portlet does not support template processing
        }

        if (doesUrlTemplateProcess != null && templateComposer != null && doesUrlTemplateProcess.booleanValue()) {
            Templates templates = new Templates();
            templates.setBlockingActionTemplate(templateComposer.createBlockingActionTemplate(true, true, true, true));
            templates.setRenderTemplate(templateComposer.createRenderTemplate(true, true, true, true));
            templates.setDefaultTemplate(templateComposer.createDefaultTemplate(true, true, true, true));
            templates.setResourceTemplate(templateComposer.createResourceTemplate(true, true, true, true));
            templates.setSecureBlockingActionTemplate(
                templateComposer.createSecureBlockingActionTemplate(true, true, true, true));
            templates.setSecureRenderTemplate(templateComposer.createSecureRenderTemplate(true, true, true, true));
            templates.setSecureDefaultTemplate(templateComposer.createSecureDefaultTemplate(true, true, true, true));
            templates.setSecureResourceTemplate(templateComposer.createSecureResourceTemplate(true, true, true, true));
            runtimeContext.setTemplates(templates);
        }

        runtimeContext.setSessionID(request.getSessionID());
        runtimeContext.setExtensions(null);

        return runtimeContext;
    }
View Full Code Here

TOP

Related Classes of oasis.names.tc.wsrp.v1.types.ServiceDescription

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.