Exemplo n.º 1
0
 public V1PortletContext clonePortlet(V1ClonePortlet clonePortlet)
     throws V1InvalidUserCategory, V1AccessDenied, V1OperationFailed, V1InvalidHandle,
         V1InvalidRegistration, V1InconsistentParameters, V1MissingParameters {
   try {
     PortletContext portletContext =
         producer.clonePortlet(V1ToV2Converter.toV2ClonePortlet(clonePortlet));
     return V2ToV1Converter.toV1PortletContext(portletContext);
   } catch (AccessDenied accessDenied) {
     throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
   } catch (InvalidUserCategory invalidUserCategory) {
     throw V2ToV1Converter.toV1Exception(V1InvalidUserCategory.class, invalidUserCategory);
   } catch (OperationFailed operationFailed) {
     throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
   } catch (InvalidHandle invalidHandle) {
     throw V2ToV1Converter.toV1Exception(V1InvalidHandle.class, invalidHandle);
   } catch (InvalidRegistration invalidRegistration) {
     throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class, invalidRegistration);
   } catch (InconsistentParameters inconsistentParameters) {
     throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class, inconsistentParameters);
   } catch (MissingParameters missingParameters) {
     throw V2ToV1Converter.toV1Exception(V1MissingParameters.class, missingParameters);
   } catch (ModifyRegistrationRequired modifyRegistrationRequired) {
     throw WSRP1ExceptionFactory.createWSException(
         V1OperationFailed.class, "Need to call modifyRegistration", modifyRegistrationRequired);
   } catch (ResourceSuspended resourceSuspended) {
     throw WSRP1ExceptionFactory.createWSException(
         V1OperationFailed.class, "Resource suspended", resourceSuspended);
   } catch (OperationNotSupported operationNotSupported) {
     throw WSRP1ExceptionFactory.createWSException(
         V1OperationFailed.class, "Not supported", operationNotSupported);
   }
 }