Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.RegistrationData


      @WebParam(mode = WebParam.Mode.OUT, name = "registrationState", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]> registrationState)
      throws V1MissingParameters, V1OperationFailed
   {
      try
      {
         RegistrationData registrationData = WSRPTypeFactory.createRegistrationData(consumerName, consumerAgent, methodGetSupported);

         if (ParameterValidation.existsAndIsNotEmpty(consumerModes))
         {
            registrationData.getConsumerModes().addAll(consumerModes);
         }
         if (ParameterValidation.existsAndIsNotEmpty(consumerWindowStates))
         {
            registrationData.getConsumerWindowStates().addAll(consumerWindowStates);
         }
         if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
         {
            registrationData.getConsumerUserScopes().addAll(consumerUserScopes);
         }
//      registrationData.getCustomUserProfileData().addAll(customUserProfileData);
         if (ParameterValidation.existsAndIsNotEmpty(registrationProperties))
         {
            registrationData.getRegistrationProperties().addAll(WSRPUtils.transform(registrationProperties, V1ToV2Converter.PROPERTY));
         }
         if (ParameterValidation.existsAndIsNotEmpty(extensions.value))
         {
            registrationData.getExtensions().addAll(WSRPUtils.transform(extensions.value, V1ToV2Converter.EXTENSION));
         }

         RegistrationContext registrationContext = producer.register(registrationData);
         registrationHandle.value = registrationContext.getRegistrationHandle();
         registrationState.value = registrationContext.getRegistrationState();
View Full Code Here


      @WebParam(mode = WebParam.Mode.OUT, name = "registrationState", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]> registrationState)
      throws V1MissingParameters, V1OperationFailed
   {
      try
      {
         RegistrationData registrationData = WSRPTypeFactory.createRegistrationData(consumerName, consumerAgent, methodGetSupported);

         if (ParameterValidation.existsAndIsNotEmpty(consumerModes))
         {
            registrationData.getConsumerModes().addAll(consumerModes);
         }
         if (ParameterValidation.existsAndIsNotEmpty(consumerWindowStates))
         {
            registrationData.getConsumerWindowStates().addAll(consumerWindowStates);
         }
         if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
         {
            registrationData.getConsumerUserScopes().addAll(consumerUserScopes);
         }
//      registrationData.getCustomUserProfileData().addAll(customUserProfileData);
         if (ParameterValidation.existsAndIsNotEmpty(registrationProperties))
         {
            registrationData.getRegistrationProperties().addAll(WSRPUtils.transform(registrationProperties, V1ToV2Converter.PROPERTY));
         }
         if (ParameterValidation.existsAndIsNotEmpty(extensions.value))
         {
            registrationData.getExtensions().addAll(WSRPUtils.transform(extensions.value, V1ToV2Converter.EXTENSION));
         }

         RegistrationContext registrationContext = producer.register(WSRPTypeFactory.createRegister(registrationData, null, null));
         registrationHandle.value = registrationContext.getRegistrationHandle();
         registrationState.value = registrationContext.getRegistrationState();
View Full Code Here

      @WebParam(mode = WebParam.Mode.OUT, name = "registrationState", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]> registrationState)
      throws V1MissingParameters, V1OperationFailed
   {
      try
      {
         RegistrationData registrationData = WSRPTypeFactory.createRegistrationData(consumerName, consumerAgent, methodGetSupported);

         if (ParameterValidation.existsAndIsNotEmpty(consumerModes))
         {
            registrationData.getConsumerModes().addAll(consumerModes);
         }
         if (ParameterValidation.existsAndIsNotEmpty(consumerWindowStates))
         {
            registrationData.getConsumerWindowStates().addAll(consumerWindowStates);
         }
         if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
         {
            registrationData.getConsumerUserScopes().addAll(consumerUserScopes);
         }
//      registrationData.getCustomUserProfileData().addAll(customUserProfileData);
         if (ParameterValidation.existsAndIsNotEmpty(registrationProperties))
         {
            registrationData.getRegistrationProperties().addAll(WSRPUtils.transform(registrationProperties, V1ToV2Converter.PROPERTY));
         }
         if (ParameterValidation.existsAndIsNotEmpty(extensions.value))
         {
            registrationData.getExtensions().addAll(WSRPUtils.transform(extensions.value, V1ToV2Converter.EXTENSION));
         }

         RegistrationContext registrationContext = producer.register(registrationData);
         registrationHandle.value = registrationContext.getRegistrationHandle();
         registrationState.value = registrationContext.getRegistrationState();
View Full Code Here

   public static RegistrationData toV2RegistrationData(V1RegistrationData registrationData)
   {
      if (registrationData != null)
      {
         RegistrationData result = WSRPTypeFactory.createRegistrationData(registrationData.getConsumerName(), registrationData.getConsumerAgent(), registrationData.isMethodGetSupported());

         List<Property> properties = WSRPUtils.transform(registrationData.getRegistrationProperties(), PROPERTY);
         if (properties != null)
         {
            result.getRegistrationProperties().addAll(properties);
         }
         List<String> modes = registrationData.getConsumerModes();
         if (ParameterValidation.existsAndIsNotEmpty(modes))
         {
            result.getConsumerModes().addAll(modes);
         }
         List<String> consumerUserScopes = registrationData.getConsumerUserScopes();
         if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
         {
            result.getConsumerUserScopes().addAll(consumerUserScopes);
         }
         List<String> windowStates = registrationData.getConsumerWindowStates();
         if (ParameterValidation.existsAndIsNotEmpty(windowStates))
         {
            result.getConsumerWindowStates().addAll(windowStates);
         }
         List<Extension> extensions = WSRPUtils.transform(registrationData.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here

   public static ModifyRegistration toV2ModifyRegistration(V1ModifyRegistration modifyRegistration)
   {
      if (modifyRegistration != null)
      {
         RegistrationContext registrationContext = toV2RegistrationContext(modifyRegistration.getRegistrationContext());
         RegistrationData registrationData = toV2RegistrationData(modifyRegistration.getRegistrationData());
         ModifyRegistration result = WSRPTypeFactory.createModifyRegistration(registrationContext, registrationData);

         return result;
      }
      else
View Full Code Here

    */
   public static RegistrationData createRegistrationData(String consumerName, String consumerAgent, boolean methodGetSupported)
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "consumer name", "RegistrationData");
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerAgent, "consumer agent", "RegistrationData");
      RegistrationData regData = createDefaultRegistrationData();
      regData.setConsumerName(consumerName);
      regData.setConsumerAgent(consumerAgent);
      regData.setMethodGetSupported(methodGetSupported);
      return regData;
   }
View Full Code Here

    * @return
    * @since 2.4.1
    */
   public static RegistrationData createDefaultRegistrationData()
   {
      RegistrationData registrationData = new RegistrationData();
      registrationData.setConsumerName(WSRPConstants.DEFAULT_CONSUMER_NAME);
      registrationData.setConsumerAgent(WSRPConstants.CONSUMER_AGENT);
      registrationData.setMethodGetSupported(false);
      return registrationData;
   }
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

   public RegistrationContext register(Register register) throws MissingParameters, OperationFailed, OperationNotSupported
   {
      WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(register, "Register");

      RegistrationData registrationData = register.getRegistrationData();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(registrationData, "RegistrationData", "Register");

      ProducerRegistrationRequirements registrationRequirements = producer.getProducerRegistrationRequirements();

      String consumerName = registrationData.getConsumerName();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(consumerName, "consumer name", "RegistrationData");

      String consumerAgent = registrationData.getConsumerAgent();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(consumerAgent, "consumer agent", "RegistrationData");

      Registration registration;
      try
      {
View Full Code Here

         if (ParameterValidation.isNullOrEmpty(registrationHandle))
         {
            throwInvalidRegistrationFault("Null or empty registration handle");
         }

         RegistrationData registrationData = modifyRegistration.getRegistrationData();
         WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(registrationData, "RegistrationData", "ModifyRegistration");

         String consumerName = registrationData.getConsumerName();
         WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(consumerName, "consumer name", "RegistrationData");

         String consumerAgent = registrationData.getConsumerAgent();
         WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(consumerAgent, "consumer agent", "RegistrationData");

         log.debug("Attempting to modify registration with handle '" + registrationHandle + "'");
         String msg = "Could not modify registration with handle '" + registrationHandle + "'";
         try
View Full Code Here

TOP

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

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.