All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.anaptecs.jeaf.services.usermanagement.AuthorizationAdminServiceProxy Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
/*
 * anaptecs GmbH, Ricarda-Huch-Str. 71, 72760 Reutlingen, Germany
 * 
 * Copyright 2004 - 2019. All rights reserved.
 */
package com.anaptecs.jeaf.services.usermanagement;

import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.List;

import com.anaptecs.jeaf.core.api.MessageConstants;
import com.anaptecs.jeaf.core.api.Service;
import com.anaptecs.jeaf.core.api.ServiceObjectID;
import com.anaptecs.jeaf.core.servicechannel.api.Command;
import com.anaptecs.jeaf.core.servicechannel.api.ServiceProxy;
import com.anaptecs.jeaf.core.spi.TransactionBehavior;
import com.anaptecs.jeaf.xfun.api.XFun;
import com.anaptecs.jeaf.xfun.api.errorhandling.ApplicationException;
import com.anaptecs.jeaf.xfun.api.errorhandling.JEAFSystemException;
import com.anaptecs.jeaf.xfun.api.trace.Trace;
import com.anaptecs.jeaf.xfun.types.Period;

/**
 * ServiceProxy class for JEAF service AuthorizationAdminService.
 */
public final class AuthorizationAdminServiceProxy extends ServiceProxy implements AuthorizationAdminService {
  /**
   * Serial version uid for the proxy class.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Initialize object.
   *
   * @param pTransactionBehavior Definition of transactional behavior. The Parameter must not be null.
   */
  public AuthorizationAdminServiceProxy( TransactionBehavior pTransactionBehavior ) {
    super(AuthorizationAdminService.class, pTransactionBehavior);
  }

  /**
   * Generated proxy implementation for method "createRoleDefinition".
   * 
   * Method creates a new role definition from the passed object. Therefore also the authorizations which link
   * authorization types and role definitions have to be set on the passed object. All referenced authorization types
   * already have to exist. The method does not create authorization types if they do not exist yet.
   */
  public RoleDefinition createRoleDefinition( RoleDefinition pRoleDefinition ) {
    try {
      Command lCommand = new CreateRoleDefinition_RoleDefinition_AuthorizationAdminService_Command(pRoleDefinition);
      return (RoleDefinition) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getRoleDefinition".
   * 
   * Method returns the role definition with the passed id. A role definition with the passed id must exist.
   */
  public RoleDefinition getRoleDefinition( ServiceObjectID pRoleDefinitionID ) {
    try {
      Command lCommand = new GetRoleDefinition_ServiceObjectID_AuthorizationAdminService_Command(pRoleDefinitionID);
      return (RoleDefinition) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "deleteRoleDefinition".
   * 
   * Method delete the passed role definition. A role definition can only be deleted if it is not referenced any more.
   */
  public void deleteRoleDefinition( RoleDefinition pRoleDefintion ) {
    try {
      Command lCommand = new DeleteRoleDefinition_RoleDefinition_AuthorizationAdminService_Command(pRoleDefintion);
      this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getAllRoleDefinitions".
   * 
   * Method returns all available role definitions.
   */
  @SuppressWarnings("unchecked")
  public List getAllRoleDefinitions( ) {
    try {
      Command lCommand = new GetAllRoleDefinitions_AuthorizationAdminService_Command();
      return (List) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "createAuthorizationType".
   * 
   * Method creates a new authorization type from the passed object. There must not already exist an authorization type
   * with the same name.
   */
  public AuthorizationType createAuthorizationType( AuthorizationType pAuthorizationType ) {
    try {
      Command lCommand =
          new CreateAuthorizationType_AuthorizationType_AuthorizationAdminService_Command(pAuthorizationType);
      return (AuthorizationType) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getAuthorizationType".
   * 
   * Method returns the authorization type with the passed id. An authorization type with the passed id must exist.
   */
  public AuthorizationType getAuthorizationType( ServiceObjectID pAuthorizationTypeID ) {
    try {
      Command lCommand =
          new GetAuthorizationType_ServiceObjectID_AuthorizationAdminService_Command(pAuthorizationTypeID);
      return (AuthorizationType) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "deleteAuthorizationType".
   * 
   * Method deletes the passed authorization type. An authorization type can only be deleted if it is not referenced any
   * more.
   */
  public void deleteAuthorizationType( AuthorizationType pAuthorizationType ) {
    try {
      Command lCommand =
          new DeleteAuthorizationType_AuthorizationType_AuthorizationAdminService_Command(pAuthorizationType);
      this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getAllAuthorizationTypes".
   * 
   * Method returns all available authorization types.
   */
  @SuppressWarnings("unchecked")
  public List getAllAuthorizationTypes( ) {
    try {
      Command lCommand = new GetAllAuthorizationTypes_AuthorizationAdminService_Command();
      return (List) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "assignRole".
   * 
   * Method assigns the passed role to the passed user for the passed validity period.
   * 
   * 
   */
  public UserAccount assignRole( RoleDefinition pRoleDefinition, UserAccount pUserAccount, Period pValidityPeriod,
      UserAccountLoadStrategy pLoadStrategy ) {
    try {
      Command lCommand =
          new AssignRole_RoleDefinition_UserAccount_Period_UserAccountLoadStrategy_AuthorizationAdminService_Command(
              pRoleDefinition, pUserAccount, pValidityPeriod, pLoadStrategy);
      return (UserAccount) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "unassignRole".
   * 
   * Method unassigns the passed role from the passed user.
   */
  public UserAccount unassignRole( RoleDefinition pRoleDefinition, UserAccount pUserAccount,
      UserAccountLoadStrategy pLoadStrategy ) {
    try {
      Command lCommand =
          new UnassignRole_RoleDefinition_UserAccount_UserAccountLoadStrategy_AuthorizationAdminService_Command(
              pRoleDefinition, pUserAccount, pLoadStrategy);
      return (UserAccount) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getAllUseCaseDefinitions".
   * 
   * Method returns all available use case definitions.
   */
  @SuppressWarnings("unchecked")
  public List getAllUseCaseDefinitions( ) {
    try {
      Command lCommand = new GetAllUseCaseDefinitions_AuthorizationAdminService_Command();
      return (List) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getUseCaseDefinition".
   * 
   * Method returns the use case definition for the use case with the passed name.
   */
  public UseCaseDefinition getUseCaseDefinition( String pUseCaseName ) {
    try {
      Command lCommand = new GetUseCaseDefinition_String_AuthorizationAdminService_Command(pUseCaseName);
      return (UseCaseDefinition) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "getRoleDefinition".
   * 
   * The method gets the role definition with the given name. If no role definition could be found an Exception is
   * thrown
   */
  public RoleDefinition getRoleDefinition( String pName ) throws UserManagementServiceSystemException {
    try {
      Command lCommand = new GetRoleDefinition_String_AuthorizationAdminService_Command(pName);
      return (RoleDefinition) this.executeCommand(lCommand);
    }
    catch (UserManagementServiceSystemException e) {
      throw e;
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }

  /**
   * Generated proxy implementation for method "synchronizeRolesAndAuthorizations".
   * 
   * Method synchronizes the given RoleDefinition with the Database. The role definitions from the given list will be
   * imported and all older role definitions and authorizations which are not given via the role definition list will be
   * lost.
   */
  @SuppressWarnings("unchecked")
  public List synchronizeRolesAndAuthorizations( List pRoleDefinitions ) {
    try {
      Command lCommand =
          new SynchronizeRolesAndAuthorizations_RoleDefinition_AuthorizationAdminService_Command(pRoleDefinitions);
      return (List) this.executeCommand(lCommand);
    }
    catch (ApplicationException e) {
      throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
    }
  }
}

/**
 * Generated command class for service method "createRoleDefinition".
 */
final class CreateRoleDefinition_RoleDefinition_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("createRoleDefinition", RoleDefinition.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "createRoleDefinition(RoleDefinition.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pRoleDefinition" to the service implementation via the service channel.
   */
  private final RoleDefinition roleDefinition;

  /**
   * Initialize object. All parameters from method "createRoleDefinition" have to be passed as parameters to this
   * command object.
   * 
   * @param pRoleDefinition RoleDefinition
   */
  CreateRoleDefinition_RoleDefinition_AuthorizationAdminService_Command( RoleDefinition pRoleDefinition ) {
    super(AuthorizationAdminService.class);
    roleDefinition = pRoleDefinition;
    parameters = new Object[] { roleDefinition };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.createRoleDefinition(roleDefinition);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getRoleDefinition".
 */
final class GetRoleDefinition_ServiceObjectID_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getRoleDefinition", ServiceObjectID.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getRoleDefinition(ServiceObjectID.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pRoleDefinitionID" to the service implementation via the service
   * channel.
   */
  private final ServiceObjectID roleDefinitionID;

  /**
   * Initialize object. All parameters from method "getRoleDefinition" have to be passed as parameters to this command
   * object.
   * 
   * @param pRoleDefinitionID ServiceObjectID
   */
  GetRoleDefinition_ServiceObjectID_AuthorizationAdminService_Command( ServiceObjectID pRoleDefinitionID ) {
    super(AuthorizationAdminService.class);
    roleDefinitionID = pRoleDefinitionID;
    parameters = new Object[] { roleDefinitionID };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getRoleDefinition(roleDefinitionID);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "deleteRoleDefinition".
 */
final class DeleteRoleDefinition_RoleDefinition_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("deleteRoleDefinition", RoleDefinition.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "deleteRoleDefinition(RoleDefinition.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pRoleDefintion" to the service implementation via the service channel.
   */
  private final RoleDefinition roleDefintion;

  /**
   * Initialize object. All parameters from method "deleteRoleDefinition" have to be passed as parameters to this
   * command object.
   * 
   * @param pRoleDefintion RoleDefinition
   */
  DeleteRoleDefinition_RoleDefinition_AuthorizationAdminService_Command( RoleDefinition pRoleDefintion ) {
    super(AuthorizationAdminService.class);
    roleDefintion = pRoleDefintion;
    parameters = new Object[] { roleDefintion };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    lService.deleteRoleDefinition(roleDefintion);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    // Method has no return type thus the method returns null.
    return null;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getAllRoleDefinitions".
 */
final class GetAllRoleDefinitions_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getAllRoleDefinitions");
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getAllRoleDefinitions(null)");
    }
  }

  /**
   * Initialize object. All parameters from method "getAllRoleDefinitions" have to be passed as parameters to this
   * command object.
   * 
   * 
   */
  GetAllRoleDefinitions_AuthorizationAdminService_Command( ) {
    super(AuthorizationAdminService.class);
    parameters = new Object[] {};
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getAllRoleDefinitions();
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "createAuthorizationType".
 */
final class CreateAuthorizationType_AuthorizationType_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("createAuthorizationType", AuthorizationType.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "createAuthorizationType(AuthorizationType.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pAuthorizationType" to the service implementation via the service
   * channel.
   */
  private final AuthorizationType authorizationType;

  /**
   * Initialize object. All parameters from method "createAuthorizationType" have to be passed as parameters to this
   * command object.
   * 
   * @param pAuthorizationType AuthorizationType
   */
  CreateAuthorizationType_AuthorizationType_AuthorizationAdminService_Command( AuthorizationType pAuthorizationType ) {
    super(AuthorizationAdminService.class);
    authorizationType = pAuthorizationType;
    parameters = new Object[] { authorizationType };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.createAuthorizationType(authorizationType);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getAuthorizationType".
 */
final class GetAuthorizationType_ServiceObjectID_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getAuthorizationType", ServiceObjectID.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getAuthorizationType(ServiceObjectID.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pAuthorizationTypeID" to the service implementation via the service
   * channel.
   */
  private final ServiceObjectID authorizationTypeID;

  /**
   * Initialize object. All parameters from method "getAuthorizationType" have to be passed as parameters to this
   * command object.
   * 
   * @param pAuthorizationTypeID ServiceObjectID
   */
  GetAuthorizationType_ServiceObjectID_AuthorizationAdminService_Command( ServiceObjectID pAuthorizationTypeID ) {
    super(AuthorizationAdminService.class);
    authorizationTypeID = pAuthorizationTypeID;
    parameters = new Object[] { authorizationTypeID };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getAuthorizationType(authorizationTypeID);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "deleteAuthorizationType".
 */
final class DeleteAuthorizationType_AuthorizationType_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("deleteAuthorizationType", AuthorizationType.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "deleteAuthorizationType(AuthorizationType.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pAuthorizationType" to the service implementation via the service
   * channel.
   */
  private final AuthorizationType authorizationType;

  /**
   * Initialize object. All parameters from method "deleteAuthorizationType" have to be passed as parameters to this
   * command object.
   * 
   * @param pAuthorizationType AuthorizationType
   */
  DeleteAuthorizationType_AuthorizationType_AuthorizationAdminService_Command( AuthorizationType pAuthorizationType ) {
    super(AuthorizationAdminService.class);
    authorizationType = pAuthorizationType;
    parameters = new Object[] { authorizationType };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    lService.deleteAuthorizationType(authorizationType);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    // Method has no return type thus the method returns null.
    return null;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getAllAuthorizationTypes".
 */
final class GetAllAuthorizationTypes_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getAllAuthorizationTypes");
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getAllAuthorizationTypes(null)");
    }
  }

  /**
   * Initialize object. All parameters from method "getAllAuthorizationTypes" have to be passed as parameters to this
   * command object.
   * 
   * 
   */
  GetAllAuthorizationTypes_AuthorizationAdminService_Command( ) {
    super(AuthorizationAdminService.class);
    parameters = new Object[] {};
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getAllAuthorizationTypes();
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "assignRole".
 */
final class AssignRole_RoleDefinition_UserAccount_Period_UserAccountLoadStrategy_AuthorizationAdminService_Command
    extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("assignRole", RoleDefinition.class, UserAccount.class,
          Period.class, UserAccountLoadStrategy.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(),
          "assignRole(RoleDefinition.class, UserAccount.class, Period.class, UserAccountLoadStrategy.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pRoleDefinition" to the service implementation via the service channel.
   */
  private final RoleDefinition roleDefinition;

  /**
   * Attribute transports the method parameter "pUserAccount" to the service implementation via the service channel.
   */
  private final UserAccount userAccount;

  /**
   * Attribute transports the method parameter "pValidityPeriod" to the service implementation via the service channel.
   */
  private final Period validityPeriod;

  /**
   * Attribute transports the method parameter "pLoadStrategy" to the service implementation via the service channel.
   */
  private final UserAccountLoadStrategy loadStrategy;

  /**
   * Initialize object. All parameters from method "assignRole" have to be passed as parameters to this command object.
   * 
   * @param pRoleDefinition RoleDefinition
   * @param pUserAccount UserAccount
   * @param pValidityPeriod Period
   * @param pLoadStrategy UserAccountLoadStrategy
   */
  AssignRole_RoleDefinition_UserAccount_Period_UserAccountLoadStrategy_AuthorizationAdminService_Command(
      RoleDefinition pRoleDefinition, UserAccount pUserAccount, Period pValidityPeriod,
      UserAccountLoadStrategy pLoadStrategy ) {
    super(AuthorizationAdminService.class);
    roleDefinition = pRoleDefinition;
    userAccount = pUserAccount;
    validityPeriod = pValidityPeriod;
    loadStrategy = pLoadStrategy;
    parameters = new Object[] { roleDefinition, userAccount, validityPeriod, loadStrategy };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult =
        (Serializable) lService.assignRole(roleDefinition, userAccount, validityPeriod, loadStrategy);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "unassignRole".
 */
final class UnassignRole_RoleDefinition_UserAccount_UserAccountLoadStrategy_AuthorizationAdminService_Command
    extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("unassignRole", RoleDefinition.class,
          UserAccount.class, UserAccountLoadStrategy.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(),
          "unassignRole(RoleDefinition.class, UserAccount.class, UserAccountLoadStrategy.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pRoleDefinition" to the service implementation via the service channel.
   */
  private final RoleDefinition roleDefinition;

  /**
   * Attribute transports the method parameter "pUserAccount" to the service implementation via the service channel.
   */
  private final UserAccount userAccount;

  /**
   * Attribute transports the method parameter "pLoadStrategy" to the service implementation via the service channel.
   */
  private final UserAccountLoadStrategy loadStrategy;

  /**
   * Initialize object. All parameters from method "unassignRole" have to be passed as parameters to this command
   * object.
   * 
   * @param pRoleDefinition RoleDefinition
   * @param pUserAccount UserAccount
   * @param pLoadStrategy UserAccountLoadStrategy
   */
  UnassignRole_RoleDefinition_UserAccount_UserAccountLoadStrategy_AuthorizationAdminService_Command(
      RoleDefinition pRoleDefinition, UserAccount pUserAccount, UserAccountLoadStrategy pLoadStrategy ) {
    super(AuthorizationAdminService.class);
    roleDefinition = pRoleDefinition;
    userAccount = pUserAccount;
    loadStrategy = pLoadStrategy;
    parameters = new Object[] { roleDefinition, userAccount, loadStrategy };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.unassignRole(roleDefinition, userAccount, loadStrategy);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getAllUseCaseDefinitions".
 */
final class GetAllUseCaseDefinitions_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getAllUseCaseDefinitions");
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getAllUseCaseDefinitions(null)");
    }
  }

  /**
   * Initialize object. All parameters from method "getAllUseCaseDefinitions" have to be passed as parameters to this
   * command object.
   * 
   * 
   */
  GetAllUseCaseDefinitions_AuthorizationAdminService_Command( ) {
    super(AuthorizationAdminService.class);
    parameters = new Object[] {};
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getAllUseCaseDefinitions();
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getUseCaseDefinition".
 */
final class GetUseCaseDefinition_String_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getUseCaseDefinition", String.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getUseCaseDefinition(String.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pUseCaseName" to the service implementation via the service channel.
   */
  private final String useCaseName;

  /**
   * Initialize object. All parameters from method "getUseCaseDefinition" have to be passed as parameters to this
   * command object.
   * 
   * @param pUseCaseName String
   */
  GetUseCaseDefinition_String_AuthorizationAdminService_Command( String pUseCaseName ) {
    super(AuthorizationAdminService.class);
    useCaseName = pUseCaseName;
    parameters = new Object[] { useCaseName };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getUseCaseDefinition(useCaseName);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "getRoleDefinition".
 */
final class GetRoleDefinition_String_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("getRoleDefinition", String.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "getRoleDefinition(String.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pName" to the service implementation via the service channel.
   */
  private final String name;

  /**
   * Initialize object. All parameters from method "getRoleDefinition" have to be passed as parameters to this command
   * object.
   * 
   * @param pName String
   */
  GetRoleDefinition_String_AuthorizationAdminService_Command( String pName ) {
    super(AuthorizationAdminService.class);
    name = pName;
    parameters = new Object[] { name };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) throws UserManagementServiceSystemException {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.getRoleDefinition(name);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}

/**
 * Generated command class for service method "synchronizeRolesAndAuthorizations".
 */
final class SynchronizeRolesAndAuthorizations_RoleDefinition_AuthorizationAdminService_Command extends Command {
  /**
   * Default serial version uid.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Constant for factor to convert nano seconds to milliseconds.
   */
  private static final int MILLISECONDS = 1000 * 1000;

  /**
   * Constant describes the service method that is called by this proxy class.
   */
  private static final Method SERVICE_METHOD;

  /**
   * Object array with all parameters that are passed to the service.
   */
  private final Object[] parameters;
  /**
   * Initializer is used to get the method object describing the called service method only once.
   */
  static {
    try {
      SERVICE_METHOD = AuthorizationAdminService.class.getMethod("synchronizeRolesAndAuthorizations", List.class);
    }
    catch (NoSuchMethodException e) {
      throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e,
          AuthorizationAdminService.class.getName(), "synchronizeRolesAndAuthorizations(List.class)");
    }
  }

  /**
   * Attribute transports the method parameter "pRoleDefinitions" to the service implementation via the service channel.
   */
  private final List roleDefinitions;

  /**
   * Initialize object. All parameters from method "synchronizeRolesAndAuthorizations" have to be passed as parameters
   * to this command object.
   * 
   * @param pRoleDefinitions List
   */
  SynchronizeRolesAndAuthorizations_RoleDefinition_AuthorizationAdminService_Command(
      List pRoleDefinitions ) {
    super(AuthorizationAdminService.class);
    roleDefinitions = pRoleDefinitions;
    parameters = new Object[] { roleDefinitions };
  }

  /**
   * Method executes the service call represented by this command object via JEAFs service channel.
   * 
   * @param pTargetService Reference to the service which should be called by this command. The parameter must not be
   * null.
   * @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
   * in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
   * will be serialized or not. If a service method has no return type (void) then the method returns null. Service
   * methods also may return null as return value.
   */
  @Override
  public Serializable execute( Service pTargetService ) {
    // Execute service call.
    AuthorizationAdminService lService = (AuthorizationAdminService) pTargetService;
    // Trace service call.
    Trace lTrace = XFun.getTrace();
    lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
    long lStartTime = System.nanoTime();
    Serializable lResult = (Serializable) lService.synchronizeRolesAndAuthorizations(roleDefinitions);
    // Calculate duration of service call in milliseconds
    String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
    // Trace result of service call.
    lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
    return lResult;
  }

  /**
   * Method returns a method object describing the service method that will be called by this command object.
   * 
   * @return {@link Method} Method object describing the called service method. The method never returns null.
   */
  @Override
  public final Method getServiceMethod( ) {
    return SERVICE_METHOD;
  }

  /**
   * Method returns all parameters that will be passed to the service.
   * 
   * @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
   * an empty array in case that the method has no parameters.
   */
  @Override
  public Object[] getParameters( ) {
    return parameters;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy