Interface InstallationPackageAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
InstallationPackageBatchAdminSession
This session creates, updates, and deletes
InstallationPackages. The data for create and update is provided by the
consumer via the form object. OsidForms are requested for each
create or update and may not be reused.
Create and update operations differ in their usage. To create a
InstallationPackage, a InstallationPackagetForm is requested
using getInstallationPackageFormForCreate() specifying the desired
record Types or none if no record Types are needed. The
returned InstallationPackageForm will indicate that it is to be
used with a create operation and can be used to examine metdata or
validate data prior to creation. Once the InstallationPackageForm
is submiited to a create operation, it cannot be reused with another
create operation unless the first operation was unsuccessful. Each
InstallationPackageForm corresponds to an attempted transaction.
For updates, InstallationPackageForms are requested to the
InstallationPackage Id that is to be updated using
getInstallationPackageFormForUpdate(). Similarly, the
InstallationPackageForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
InstallationPackageForm can only be used once for a successful update and
cannot be reused.
The delete operations delete InstallationPackages. To unmap a
InstallationPackage from the current Depot, the
InstallationPackageDepotAssignmentSession should be used. These delete
operations attempt to remove the InstallationPackage itself thus
removing it from all known Depot catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstallationPackageVersion(Id installationPackageId, Id nextInstallationPackageId) Sets the given package to be the next version of another package.voidaliasInstallationPackage(Id installationPackageId, Id aliasId) Adds anIdto aInstallationPackagefor the purpose of creating compatibility.booleanTests if this user can create content forInstallationPackages.booleancanCreateInstallationContentWithRecordTypes(Type[] installationContentRecordTypes) Tests if this user can create anInstallationContentusing the desired record types.booleanTests if this user can createInstallationPackages.booleancanCreateInstallationPackageWithRecordTypes(Type[] installationPackageRecordTypes) Tests if this user can create a singleInstallationPackageusing the desired record types.booleanTests if this user can deleteInstallationContents.booleancanDeleteInstallationPackage(Id installationPackageId) Tests if this user can delete a specifiedInstallationPackage.booleanTests if this user can deleteInstallationPackages.booleanTests if this user can manageIdaliases forInstallationPackages.booleanTests if this user can manage package versions.booleanTests if this user can updateInstallationContent.booleancanUpdateInstallationPackage(Id installationPackageId) Tests if this user can update a specified package.booleanTests if this user can updateInstallationPackages.createInstallationContent(InstallationContentForm installationContentForm) Creates newInstallationContentfor a given package.createInstallationPackage(InstallationPackageForm installationPackageForm) Creates a newInstallationPackage.voiddeleteInstallationContent(Id installationContentId) Deletes content from a package.voiddeleteInstallationPackage(Id installationPackageId) Deletes theInstallationPackageidentified by the givenId.getDepot()Gets theDepotassociated with this session.Gets theDepotIdassociated with this session.getInstallationContentFormForCreate(Id installationPackageId, Type[] installationContentRecordTypes) Gets an installation content form for creating new installation contents.getInstallationContentFormForUpdate(Id installationContentId) Gets the installation content form for updating an existing installation content.getInstallationPackageFormForCreate(Type[] installationPackageRecordTypes) Gets the package form for creating new packages.getInstallationPackageFormForUpdate(Id installationPackageId) Gets the package form for updating an existing package.voidremoveInstallationPackageVersion(Id installationPackageId, Id nextInstallationPackageId) Removes a package from being the next version of another package.voidupdateInstallationContent(InstallationContentForm installationContentForm) Updates an existing installation content.voidupdateInstallationPackage(InstallationPackageForm installationPackageForm) Updates an existing package.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getDepotId
Id getDepotId()Gets theDepotIdassociated with this session.- Returns:
- the
Depot Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getDepot
Gets theDepotassociated with this session.- Returns:
- the
Depotassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateInstallationPackages
boolean canCreateInstallationPackages()Tests if this user can createInstallationPackages. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aInstallationPackagewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifInstallationPackagecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateInstallationPackageWithRecordTypes
Tests if this user can create a singleInstallationPackageusing the desired record types. WhileInstallationManager.getInstallationPackageRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificInstallationPackage. Providing an empty array tests if aInstallationPackagecan be created with no records.- Parameters:
installationPackageRecordTypes- array of package record types- Returns:
trueifInstallationPackagecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-installationPackageRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getInstallationPackageFormForCreate
InstallationPackageForm getInstallationPackageFormForCreate(Type[] installationPackageRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the package form for creating new packages. A new form should be requested for each create transaction.- Parameters:
installationPackageRecordTypes- array of package record types- Returns:
- the package form
- Throws:
NullArgumentException-installationPackageRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createInstallationPackage
InstallationPackage createInstallationPackage(InstallationPackageForm installationPackageForm) throws OperationFailedException, PermissionDeniedException Creates a newInstallationPackage.- Parameters:
installationPackageForm- the form for thisInstallationPackage- Returns:
- the new
InstallationPackage - Throws:
IllegalStateException-installationPackageFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-installationPackageFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-installationPackageFormdid not originate fromgetInstallationPackageFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateInstallationPackages
boolean canUpdateInstallationPackages()Tests if this user can updateInstallationPackages. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aInstallationPackagewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseif package modification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canUpdateInstallationPackage
Tests if this user can update a specified package. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating the package will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer an update operation to an unauthorized user for this function.- Parameters:
installationPackageId- theIdof theInstallationPackage- Returns:
falseif package modification is not authorized,trueotherwise- Throws:
NullArgumentException-installationPackageIdisnull- Compliance:
mandatory- This method must be implemented.- Notes:
If- the {@code installationPackageId} is not found, then it is acceptable to return false to indicate the lack of an update available.
-
getInstallationPackageFormForUpdate
InstallationPackageForm getInstallationPackageFormForUpdate(Id installationPackageId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the package form for updating an existing package. A new package form should be requested for each update transaction.- Parameters:
installationPackageId- theIdof theInstallationPackage- Returns:
- the package form
- Throws:
NotFoundException-installationPackageIdis not foundNullArgumentException-installationPackageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateInstallationPackage
void updateInstallationPackage(InstallationPackageForm installationPackageForm) throws OperationFailedException, PermissionDeniedException Updates an existing package.- Parameters:
installationPackageForm- the form containing the elements to be updated- Throws:
InvalidArgumentException- the form contains an invalid valueNullArgumentException-installationPackageFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-installationPackageFormdid not originate fromgetInstallationPackageFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteInstallationPackages
boolean canDeleteInstallationPackages()Tests if this user can deleteInstallationPackages. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aInstallationPackagewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifInstallationPackagedeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canDeleteInstallationPackage
Tests if this user can delete a specifiedInstallationPackage. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting theInstallationPackagewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer a delete operation to an unauthorized user for this function.- Parameters:
installationPackageId- theIdof theInstallationPackage- Returns:
falseifInstallationPackagedeletion is not authorized,trueotherwise- Throws:
NullArgumentException-installationPackageIdisnull- Compliance:
mandatory- This method must be implemented.- Notes:
If- the {@code installationPackageId} is not found, then it is acceptable to return false to indicate the lack of a delete available.
-
deleteInstallationPackage
void deleteInstallationPackage(Id installationPackageId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes theInstallationPackageidentified by the givenId.- Parameters:
installationPackageId- theIdof theInstallationPackageto delete- Throws:
NotFoundException- aInstallationPackagewas not found identified by the givenIdNullArgumentException-installationPackageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageInstallationPackageAliases
boolean canManageInstallationPackageAliases()Tests if this user can manageIdaliases forInstallationPackages. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifInstallationPackagealiasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasInstallationPackage
void aliasInstallationPackage(Id installationPackageId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aInstallationPackagefor the purpose of creating compatibility. The primaryIdof theInstallationPackageis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another package it is reassigned to the given packageId.- Parameters:
installationPackageId- theIdof aInstallationPackagealiasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-installationPackageIdnot foundNullArgumentException-installationPackageIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateInstallationContent
boolean canCreateInstallationContent()Tests if this user can create content forInstallationPackages. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anInstallationContentwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifinstallationcontent creation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateInstallationContentWithRecordTypes
Tests if this user can create anInstallationContentusing the desired record types. WhileInstallationManager.getInstallationContentRecordTypes()can be used to test which records are supported, this method tests which records are required for creating a specificInstallationContent. Providing an empty array tests if anInstallationContentcan be created with no records.- Parameters:
installationContentRecordTypes- array of installation content record types- Returns:
trueifInstallationContentcreation using the specifiedTypesis supported,falseotherwise- Throws:
NullArgumentException-installationContentRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getInstallationContentFormForCreate
InstallationContentForm getInstallationContentFormForCreate(Id installationPackageId, Type[] installationContentRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets an installation content form for creating new installation contents.- Parameters:
installationPackageId- theIdof aInstallationPackageinstallationContentRecordTypes- array of installation content record types- Returns:
- the installation content form
- Throws:
NotFoundException-installationPackageIdis not foundNullArgumentException-installationPackageIdorinstallationContentRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createInstallationContent
InstallationContent createInstallationContent(InstallationContentForm installationContentForm) throws OperationFailedException, PermissionDeniedException Creates newInstallationContentfor a given package.- Parameters:
installationContentForm- the form for thisInstallationContent- Returns:
- the new
InstallationContent - Throws:
IllegalStateException-installationContentFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-installationContentFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-installationContentFormdid not originate fromgetInstallationContentFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateInstallationContents
boolean canUpdateInstallationContents()Tests if this user can updateInstallationContent. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anInstallationContentwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifInstallationContentmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getInstallationContentFormForUpdate
InstallationContentForm getInstallationContentFormForUpdate(Id installationContentId) throws NotFoundException, OperationFailedException Gets the installation content form for updating an existing installation content. A new installation content form should be requested for each update transaction.- Parameters:
installationContentId- theIdof theInstallationContent- Returns:
- the v content form
- Throws:
NotFoundException-installationContentIdis not foundNullArgumentException-installationContentIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
updateInstallationContent
void updateInstallationContent(InstallationContentForm installationContentForm) throws OperationFailedException, PermissionDeniedException Updates an existing installation content.- Parameters:
installationContentForm- the form containing the elements to be updated- Throws:
IllegalStateException-installationContentFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-installationFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-installationContentFormdid not originate fromgetInstallationContentFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteInstallationContents
boolean canDeleteInstallationContents()Tests if this user can deleteInstallationContents. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anInstallationContentwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifInstallationContentdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteInstallationContent
void deleteInstallationContent(Id installationContentId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes content from a package.- Parameters:
installationContentId- theIdof theInstallationContent- Throws:
NotFoundException-installationContentIdis not foundNullArgumentException-installationContentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageInstallationPackageVersions
boolean canManageInstallationPackageVersions()Tests if this user can manage package versions. A return of true does not guarantee successful authorization. A return of false indicates that it is known version methods will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseif package versioning is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
addInstallationPackageVersion
void addInstallationPackageVersion(Id installationPackageId, Id nextInstallationPackageId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Sets the given package to be the next version of another package.- Parameters:
installationPackageId- theIdof aInstallationPackagenextInstallationPackageId- theIdof the net package version- Throws:
AlreadyExistsException-nextInstallationPackageIdorinstallationPackageIdalready part of a version chainNotFoundException-installationPackageIdornextInstallationPackageIdnot foundNullArgumentException-installationPackageIdornextInstallationPackageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeInstallationPackageVersion
void removeInstallationPackageVersion(Id installationPackageId, Id nextInstallationPackageId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a package from being the next version of another package.- Parameters:
installationPackageId- theIdof aInstallationPackagenextInstallationPackageId- theIdof the net package version- Throws:
NotFoundException-nextInstallationPackageIddoes not followinstallationPackageIdNullArgumentException-installationPackageIdordependencyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-