Exemplo n.º 1
0
 public V1RegistrationState modifyRegistration(V1ModifyRegistration modifyRegistration)
     throws V1MissingParameters, V1OperationFailed, V1InvalidRegistration {
   try {
     RegistrationState registrationState =
         producer.modifyRegistration(V1ToV2Converter.toV2ModifyRegistration(modifyRegistration));
     return V2ToV1Converter.toV1RegistrationState(registrationState);
   } catch (MissingParameters missingParameters) {
     throw V2ToV1Converter.toV1Exception(V1MissingParameters.class, missingParameters);
   } catch (OperationFailed operationFailed) {
     throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
   } catch (InvalidRegistration invalidRegistration) {
     throw V2ToV1Converter.toV1Exception(V1MissingParameters.class, invalidRegistration);
   } catch (ResourceSuspended resourceSuspended) {
     throw WSRP1ExceptionFactory.createWSException(
         V1OperationFailed.class, "Resource suspended", resourceSuspended);
   } catch (OperationNotSupported operationNotSupported) {
     throw WSRP1ExceptionFactory.createWSException(
         V1OperationFailed.class, "Not supported", operationNotSupported);
   }
 }