Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.PortletContext


            WSRPConstants.getDefaultLocales(),
            modelDescription,
            resourceList,
            new Holder<List<Extension>>());

         PortletPropertyDescriptionResponse response = WSRPTypeFactory.createPortletPropertyDescriptionResponse(null);
         response.setModelDescription(modelDescription.value);
         response.setResourceList(resourceList.value);

         return response;
      }
      catch (InvalidHandle invalidHandleFault)
      {
View Full Code Here


                     new Holder<List<Extension>>(),
                     registrationHandle,
                     registrationState
                  );

                  RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(registrationHandle.value);
                  registrationContext.setRegistrationState(registrationState.value);

                  persistentRegistrationInfo.setRegistrationContext(registrationContext);
                  String msg = "Consumer with id '" + persistentId + "' successfully registered with handle: '"
                     + registrationContext.getRegistrationHandle() + "'";
                  log.debug(msg);
                  RefreshResult res = new RefreshResult();
                  res.setRegistrationResult(result);
                  return res;
               }
View Full Code Here

      {
         persistentEndpointInfo.refresh();

         try
         {
            RegistrationContext registrationContext = getRegistrationContext();
            persistentEndpointInfo.getRegistrationService().deregister(
               registrationContext.getRegistrationHandle(),
               registrationContext.getRegistrationState(),
               new ArrayList<Extension>());
            log.info("Consumer with id '" + persistentId + "' deregistered.");
         }
         catch (Exception e)
         {
View Full Code Here

      {
         persistentEndpointInfo.refresh();

         try
         {
            RegistrationContext registrationContext = getRegistrationContext();
            Holder<byte[]> registrationState = new Holder<byte[]>();

            // invocation
            persistentEndpointInfo.getRegistrationService().modifyRegistration(
               registrationContext,
View Full Code Here

            if (!result.hasIssues())
            {
               try
               {
                  log.debug("Attempting registration");
                  RegistrationData registrationData = persistentRegistrationInfo.getRegistrationData();
                  Holder<String> registrationHandle = new Holder<String>();
                  Holder<byte[]> registrationState = new Holder<byte[]>();

                  // invocation
                  persistentEndpointInfo.getRegistrationService().register(
                     registrationData.getConsumerName(),
                     registrationData.getConsumerAgent(),
                     registrationData.isMethodGetSupported(),
                     registrationData.getConsumerModes(),
                     registrationData.getConsumerWindowStates(),
                     registrationData.getConsumerUserScopes(),
                     registrationData.getCustomUserProfileData(),
                     registrationData.getRegistrationProperties(),
                     new Holder<List<Extension>>(),
                     registrationHandle,
                     registrationState
                  );
View Full Code Here

      return result;
   }

   private RefreshResult internalRefresh(boolean forceRefresh) throws PortletInvokerException
   {
      ServiceDescription serviceDescription;

      if (isModifyRegistrationRequired)
      {
         return new RefreshResult(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
      }
View Full Code Here

   }

   private ServiceDescription getUnmanagedServiceDescription(boolean asUnregistered) throws PortletInvokerException, OperationFailed, InvalidRegistration
   {
      //todo: might need to implement customization of default service description
      ServiceDescription serviceDescription;
      try
      {
         Holder<Boolean> requiresRegistration = new Holder<Boolean>();
         Holder<List<PortletDescription>> offeredPortlets = new Holder<List<PortletDescription>>();
         Holder<List<ItemDescription>> userCategoryDescriptions = new Holder<List<ItemDescription>>();
         Holder<List<ItemDescription>> userProfileItemDescriptions = new Holder<List<ItemDescription>>();
         Holder<List<ItemDescription>> windowStateDescriptions = new Holder<List<ItemDescription>>();
         Holder<List<ItemDescription>> modeDescriptions = new Holder<List<ItemDescription>>();
         Holder<CookieProtocol> initCookie = new Holder<CookieProtocol>();
         Holder<ModelDescription> registrationPropertyDescription = new Holder<ModelDescription>();
         Holder<List<String>> locales = new Holder<List<String>>();
         Holder<ResourceList> resourceList = new Holder<ResourceList>();

         // invocation
         persistentEndpointInfo.getServiceDescriptionService().getServiceDescription(
            asUnregistered ? null : getRegistrationContext(),
            WSRPConstants.getDefaultLocales(), // todo: deal with locales better
            requiresRegistration,
            offeredPortlets,
            userCategoryDescriptions,
            userProfileItemDescriptions,
            windowStateDescriptions,
            modeDescriptions,
            initCookie,
            registrationPropertyDescription,
            locales,
            resourceList,
            new Holder<List<Extension>>());

         serviceDescription = WSRPTypeFactory.createServiceDescription(requiresRegistration.value);
         serviceDescription.setRegistrationPropertyDescription(registrationPropertyDescription.value);
         serviceDescription.setRequiresInitCookie(initCookie.value);
         serviceDescription.setResourceList(resourceList.value);
         serviceDescription.getCustomModeDescriptions().addAll(modeDescriptions.value);
         serviceDescription.getCustomUserProfileItemDescriptions().addAll(userProfileItemDescriptions.value);
         serviceDescription.getCustomWindowStateDescriptions().addAll(windowStateDescriptions.value);
         serviceDescription.getLocales().addAll(locales.value);
         serviceDescription.getOfferedPortlets().addAll(offeredPortlets.value);
         serviceDescription.getUserCategoryDescriptions().addAll(userCategoryDescriptions.value);

         return serviceDescription;
      }
      catch (Exception e)
      {
View Full Code Here

            Class portTypeClass = null;
            try
            {
               portTypeClass = WSRPV1MarkupPortType.class;
               WSRPV1MarkupPortType markupPortType = wsService.getPort(WSRPV1MarkupPortType.class);
               markupURL = (String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);

               portTypeClass = WSRPV1ServiceDescriptionPortType.class;
               WSRPV1ServiceDescriptionPortType sdPort = wsService.getPort(WSRPV1ServiceDescriptionPortType.class);
               serviceDescriptionURL = (String)((BindingProvider)sdPort).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
View Full Code Here

         WSRPV2MarkupPortType port = getService(WSRPV2MarkupPortType.class);
         return new V2MarkupService(port);
      }
      else
      {
         WSRPV1MarkupPortType port = getService(WSRPV1MarkupPortType.class);
         return new V1MarkupService(port);
      }
   }
View Full Code Here

         URL wsdlURL = new URL(wsdlDefinitionURL);

         Service service = Service.create(wsdlURL, SERVICE);

//         WSRPV1MarkupPortType markupPortType = service.getPort(WSRPBaseService, WSRPV1MarkupPortType.class);
         WSRPV1MarkupPortType markupPortType = service.getPort(WSRPV1MarkupPortType.class);
         services.put(WSRPV1MarkupPortType.class, markupPortType);
         markupURL = (String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);

//         WSRPV1ServiceDescriptionPortType sdPort = service.getPort(WSRPServiceDescriptionService, WSRPV1ServiceDescriptionPortType.class);
         WSRPV1ServiceDescriptionPortType sdPort = service.getPort(WSRPV1ServiceDescriptionPortType.class);
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v1.PortletContext

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.