Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.RegistrationState


         throw WSRP2ExceptionFactory.createWSException(MissingParameters.class, "Missing required portletContext in CopyPortlets.", null);
      }

      Registration fromRegistration = producer.getRegistrationOrFailIfInvalid(copyPortlets.getFromRegistrationContext());

      RegistrationContext toRegistationContext = copyPortlets.getToRegistrationContext();

      //if toRegistrationContext is null, then we use the fromRegistrationContext (from spec).
      //NOTE: this means we can't move between a PortletContext on a registered consumer to a non-registered consumer
      // between two non-registered consumers will still be ok.
      if (toRegistationContext == null)
View Full Code Here


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

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

                  persistentRegistrationInfo.setRegistrationContext(registrationContext);

                  if (debug)
                  {
                     String msg = "Consumer with id '" + persistentId + "' successfully registered with handle: '"
                        + registrationContext.getRegistrationHandle() + "'";
                     log.debug(msg);
                  }

                  RefreshResult res = new RefreshResult();
View Full Code Here

      {
         persistentEndpointInfo.refresh();

         try
         {
            RegistrationContext registrationContext = getRegistrationContext();
            persistentEndpointInfo.getRegistrationService().deregister(registrationContext, UserAccess.getUserContext());
            log.info("Consumer with id '" + persistentId + "' deregistered.");
         }
         catch (Exception e)
         {
View Full Code Here

         if (force || isModifyRegistrationRequired())
         {
            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(
View Full Code Here

      {
         ModifyRegistration modifyRegistration = WSRPTypeFactory.createModifyRegistration(
            V1ToV2Converter.toV2RegistrationContext(registrationContext),
            V1ToV2Converter.toV2RegistrationData(registrationData));

         RegistrationState result = producer.modifyRegistration(modifyRegistration);

         // it is possible (if not likely) that result of modifyRegistration be null
         if (result != null)
         {
            registrationState.value = result.getRegistrationState();
            extensions.value = WSRPUtils.transform(result.getExtensions(), V2ToV1Converter.EXTENSION);
         }
      }
      catch (MissingParameters missingParameters)
      {
         throw V2ToV1Converter.toV1Exception(V1MissingParameters.class, missingParameters);
View Full Code Here

      @WebParam(name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions)
      throws InvalidRegistration, MissingParameters, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      ModifyRegistration modifyRegistration = WSRPTypeFactory.createModifyRegistration(registrationContext, registrationData);

      RegistrationState result = producer.modifyRegistration(modifyRegistration);

      // it is possible (if not likely) that result of modifyRegistration be null
      if (result != null)
      {
         registrationState.value = result.getRegistrationState();
         extensions.value = result.getExtensions();
      }
   }
View Full Code Here

   ) throws InvalidRegistration, MissingParameters, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      ModifyRegistration modifyRegistration = WSRPTypeFactory.createModifyRegistration(registrationContext, registrationData);
      modifyRegistration.setUserContext(userContext);

      RegistrationState result = producer.modifyRegistration(modifyRegistration);

      // it is possible (if not likely) that result of modifyRegistration be null
      if (result != null)
      {
         registrationState.value = result.getRegistrationState();
         scheduledDestruction.value = result.getScheduledDestruction();
         extensions.value = result.getExtensions();
      }
   }
View Full Code Here

      {
         ModifyRegistration modifyRegistration = WSRPTypeFactory.createModifyRegistration(
            V1ToV2Converter.toV2RegistrationContext(registrationContext),
            V1ToV2Converter.toV2RegistrationData(registrationData));

         RegistrationState result = producer.modifyRegistration(modifyRegistration);

         // it is possible (if not likely) that result of modifyRegistration be null
         if (result != null)
         {
            registrationState.value = result.getRegistrationState();
            extensions.value = WSRPUtils.transform(result.getExtensions(), V2ToV1Converter.EXTENSION);
         }
      }
      catch (MissingParameters missingParameters)
      {
         throw V2ToV1Converter.toV1Exception(V1MissingParameters.class, missingParameters);
View Full Code Here

      {
         ModifyRegistration modifyRegistration = WSRPTypeFactory.createModifyRegistration(
            V1ToV2Converter.toV2RegistrationContext(registrationContext),
            V1ToV2Converter.toV2RegistrationData(registrationData));

         RegistrationState result = producer.modifyRegistration(modifyRegistration);

         // it is possible (if not likely) that result of modifyRegistration be null
         if (result != null)
         {
            registrationState.value = result.getRegistrationState();
            extensions.value = WSRPUtils.transform(result.getExtensions(), V2ToV1Converter.EXTENSION);
         }
      }
      catch (MissingParameters missingParameters)
      {
         throw V2ToV1Converter.toV1Exception(V1MissingParameters.class, missingParameters);
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v2.RegistrationState

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.