Interface CampusAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
CampusBatchAdminSession

public interface CampusAdminSession extends OsidSession

This session creates and removes campuses. The data for create and update is provided by the consumer via the form.

  • Method Details

    • canCreateCampuses

      boolean canCreateCampuses()
      Tests if this user can create Campuses . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Campus will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
      Returns:
      false if Campus creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateCampusWithRecordTypes

      boolean canCreateCampusWithRecordTypes(Type[] campusRecordTypes)
      Tests if this user can create a single Campus using the desired record interface types. While RoomManager.getCampusRecordTypes() can be used to examine which record interfaces are supported, this method tests which record(s) are required for creating a specific Campus . Providing an empty array tests if a Campus can be created with no records.
      Parameters:
      campusRecordTypes - array of campus record types
      Returns:
      true if Campus creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - campusRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getCampusFormForCreate

      CampusForm getCampusFormForCreate(Type[] campusRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the campus form for creating new campuses. A new form should be requested for each create transaction.
      Parameters:
      campusRecordTypes - array of campus record types
      Returns:
      the campus form
      Throws:
      NullArgumentException - campusRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get foem for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createCampus

      Creates a new Campus .
      Parameters:
      campusForm - the form for this Campus
      Returns:
      the new Campus
      Throws:
      IllegalStateException - campusForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - campusForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - campusForm did not originate from getCampusFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateCampuses

      boolean canUpdateCampuses()
      Tests if this user can update Campuses . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Campus will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
      Returns:
      false if Campus modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCampusFormForUpdate

      Gets the campus form for updating an existing campus. A new campus form should be requested for each update transaction.
      Parameters:
      campusId - the Id of the Campus
      Returns:
      the campus form
      Throws:
      NotFoundException - campusId is not found
      NullArgumentException - campusId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateCampus

      void updateCampus(CampusForm campusForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing campus.
      Parameters:
      campusForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - campusForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - campusForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - campusForm did not originate from getCampusFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteCampuses

      boolean canDeleteCampuses()
      Tests if this user can delete Campuses A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Campus will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
      Returns:
      false if Campus deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteCampus

      Deletes a Campus .
      Parameters:
      campusId - the Id of the Campus to remove
      Throws:
      NotFoundException - campusId not found
      NullArgumentException - campusId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageCampusAliases

      boolean canManageCampusAliases()
      Tests if this user can manage Id aliases for Campuses . A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if Campus aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasCampus

      Adds an Id to a Campus for the purpose of creating compatibility. The primary Id of the Campus is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another campus, it is reassigned to the given campus Id .
      Parameters:
      campusId - the Id of a Campus
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - campusId not found
      NullArgumentException - campusId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.