Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.RegistrationContext


   public V1ReturnAny deregister(V1RegistrationContext deregister) throws V1OperationFailed, V1InvalidRegistration
   {
      try
      {
         final RegistrationContext registrationContext = V1ToV2Converter.toV2RegistrationContext(deregister);
         producer.deregister(WSRPTypeFactory.createDeregister(registrationContext, null));
         return null;
      }
      catch (InvalidRegistration invalidRegistration)
      {
View Full Code Here


   {
      if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
      {
         WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(modifyRegistration, "ModifyRegistration");

         RegistrationContext registrationContext = modifyRegistration.getRegistrationContext();
         WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(registrationContext, "RegistrationContext", "ModifyRegistration");
         String registrationHandle = registrationContext.getRegistrationHandle();
         if (ParameterValidation.isNullOrEmpty(registrationHandle))
         {
            throwInvalidRegistrationFault("Null or empty registration handle");
         }
View Full Code Here

         String msg = "Could not register consumer named '" + consumerName + "'";
         log.debug(msg, e);
         throw WSRP2ExceptionFactory.throwWSException(OperationFailed.class, msg, e);
      }

      RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(registration.getRegistrationHandle());
      log.debug("Registration completed without error.");
      return registrationContext;
   }
View Full Code Here

      WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(deregister, "Deregister");

      if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
      {

         final RegistrationContext registrationContext = deregister.getRegistrationContext();
         WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(registrationContext, "RegistrationContext");

         String registrationHandle = registrationContext.getRegistrationHandle();
         if (ParameterValidation.isNullOrEmpty(registrationHandle))
         {
            throwInvalidRegistrationFault("Null or empty registration handle");
         }
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 '" + getId() + "' 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 '" + getId() + "' 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

   public RegistrationContext getRegistrationContext()
   {
      if (persistentRegistrationHandle != null)
      {
         RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(persistentRegistrationHandle);
         registrationContext.setRegistrationState(persistentRegistrationState);
         return registrationContext;
      }
      else
      {
         return null;
View Full Code Here

      PortletContext portletContext = decode(portletHandle);

      String resourceId = path.substring(portletHandleEnd);

      String registrationHandle = req.getParameter(REG_HANDLE);
      RegistrationContext registrationContext = null;
      if (!ParameterValidation.isNullOrEmpty(registrationHandle))
      {
         registrationContext = WSRPTypeFactory.createRegistrationContext(registrationHandle);
      }
View Full Code Here

    * @since 2.4.1
    */
   public static RegistrationContext createRegistrationContext(String registrationHandle)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(registrationHandle, "Registration handle");
      RegistrationContext registrationContext = new RegistrationContext();
      registrationContext.setRegistrationHandle(registrationHandle);
      return registrationContext;
   }
View Full Code Here

TOP

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

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.