agave-apps/apps-core/src/main/java/org/iplantc/service/apps/queue/actions/CloneAction.java
/**
     * Verifies that the {@link ExecutionSystem} is a valid execution system for the user
     * 
     * @param executionSystem to validate 
     * @return provided {@link ExecutionSystem} if {@code executionSystem} is not null, the user's default {@link ExecutionSystem} otherwise.
     * @throws SystemUnknownException
     */
Verifies that the  ExecutionSystem is a valid execution system for the user

@param executionSystem to validate
@return provided  ExecutionSystem if  executionSystem is not null, the user's default  ExecutionSystem otherwise.
Verifies that the ExecutionSystem is a valid execution system for the user @param executionSystem to validate @return provided ExecutionSystem if executionSystem is not null the user ' s default ExecutionSystem otherwise .
protected ExecutionSystem verifyClonedSoftwareExecutionSystem(ExecutionSystem executionSystem) 
    throws SystemUnknownException, PermissionException
    {
        if (executionSystem == null) {
            if (StringUtils.isNotEmpty(clonedSoftwareExecutionSystemId)) {
                throw new SystemUnknownException("No execution system found matching " 
                        + clonedSoftwareExecutionSystemId);
            } else {
                executionSystem = this.systemManager.getUserDefaultExecutionSystem(getClonedSoftwareOwner());
            }
        }
        if (executionSystem == null) {
            throw new SystemUnknownException("No target execution system was specified, and the user "
                    + "has no default execution system. Please specify a target execution system "
                    + "on which to run the cloned app or define a default execution system.");
        } 
        else if (!executionSystem.getUserRole(getClonedSoftwareOwner()).canPublish()) {
            throw new PermissionException(
                    "User does not have permission to publish applications on the target " + 
                    "execution system. Verify you have been granted a " + RoleType.PUBLISHER +
                    "role on the target execution system " + executionSystem.getSystemId());
        }
        return executionSystem;
    }
protected ExecutionSystem verifyClonedSoftwareExecutionSystem ( ExecutionSystem executionSystem ) throws SystemUnknownException , PermissionException { if ( executionSystem == null ) { if ( StringUtils . isNotEmpty ( clonedSoftwareExecutionSystemId ) ) { throw new SystemUnknownException ( "No execution system found matching " + clonedSoftwareExecutionSystemId ) ; } else { executionSystem = this . systemManager . getUserDefaultExecutionSystem ( getClonedSoftwareOwner ( ) ) ; } } if ( executionSystem == null ) { throw new SystemUnknownException ( "No target execution system was specified, and the user " + "has no default execution system. Please specify a target execution system " + "on which to run the cloned app or define a default execution system." ) ; } else if ( ! executionSystem . getUserRole ( getClonedSoftwareOwner ( ) ) . canPublish ( ) ) { throw new PermissionException ( "User does not have permission to publish applications on the target " + "execution system. Verify you have been granted a " + RoleType . PUBLISHER + "role on the target execution system " + executionSystem . getSystemId ( ) ) ; } return executionSystem ; }
Verifies that the {@link ExecutionSystem} is a valid execution system for the user
Verifies that the { @link ExecutionSystem } is a valid execution system for the user