Interface InstallationPackageDepotAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface InstallationPackageDepotAssignmentSession extends OsidSession

This session provides methods to re-assign InstallationPackages to Depots. A InstallationPackage may map to multiple Depots and removing the last reference to an InstallationPackage is the equivalent of deleting it. Each Depot may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a InstallationPackage to another Depot is not a copy operation (eg: does not change its Id).

  • Method Details

    • canAssignInstallationPackages

      boolean canAssignInstallationPackages()
      Tests if this user can alter package/depot mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignInstallationPackagesToDepot

      boolean canAssignInstallationPackagesToDepot(Id depotId)
      Tests if this user can alter package/depot mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      depotId - the Id of the Depot
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - depotId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDepotIds

      IdList getAssignableDepotIds(Id depotId) throws OperationFailedException
      Gets a list of depot including and under the given depot node in which any package can be assigned.
      Parameters:
      depotId - the Id of the Depot
      Returns:
      list of assignable depot Ids
      Throws:
      NullArgumentException - depotId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDepotIdsForInstallationPackage

      IdList getAssignableDepotIdsForInstallationPackage(Id depotId, Id installationPackageId) throws OperationFailedException
      Gets a list of depot including and under the given depot node in which a specific package can be assigned.
      Parameters:
      depotId - the Id of the Depot
      installationPackageId - the Id of the InstallationPackage
      Returns:
      list of assignable depot Ids
      Throws:
      NullArgumentException - depotId or installationPackageId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignInstallationPackageToDepot

      void assignInstallationPackageToDepot(Id installationPackageId, Id depotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing InstallationPackage to a Depot.
      Parameters:
      installationPackageId - the Id of the InstallationPackage
      depotId - the Id of the Depot
      Throws:
      AlreadyExistsException - installationPackageId is already assigned to depotId
      NotFoundException - installationPackageId or depotId not found
      NullArgumentException - installationPackageId or depotId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignInstallationPackageFromDepot

      void unassignInstallationPackageFromDepot(Id installationPackageId, Id depotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a InstallationPackage from a Depot.
      Parameters:
      installationPackageId - the Id of the InstallationPackage
      depotId - the Id of the Depot
      Throws:
      NotFoundException - installationPackageId or depotId not found or installationPackageId not assigned to depotId
      NullArgumentException - installationPackageId or depotId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignInstallationPackageToDepot

      void reassignInstallationPackageToDepot(Id installationPackageId, Id fromDepotId, Id toDepotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a InstallationPackage from one Depot to another. Mappings to other Depots are unaffected.
      Parameters:
      installationPackageId - the Id of the InstallationPackage
      fromDepotId - the Id of the current Depot
      toDepotId - the Id of the destination Depot
      Throws:
      AlreadyExistsException - installationPackageId already assigned to toDepotId
      NotFoundException - installationPackageId, fromDepotId, or toDepotId not found or installationPackageId not mapped to fromDepotId
      NullArgumentException - installationPackageId, fromDepotId, or toDepotId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.