OSID Logo
OSID Specifications
installation package
Version 3.0.0
Release Candidate Preview
Interfaceosid.installation.PackageAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Packages. 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 Package, a PackagetForm is requested using getPackageFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned PackageForm 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 PackageForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each PackageForm corresponds to an attempted transaction.

For updates, PackageForms are requested to the Package Id that is to be updated using getPackageFormForUpdate(). Similarly, the PackageForm has metadata about the data that can be updated and it can perform validation before submitting the update. The PackageForm can only be used once for a successful update and cannot be reused.

The delete operations delete Packages. To unmap a Package from the current Depot, the PackageDepotAssignmentSession should be used. These delete operations attempt to remove the Package 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.

MethodgetDepotId
Description

Gets the Depot Id associated with this session.

Returnosid.id.Idthe Depot Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetDepot
Description

Gets the Depot associated with this session.

Returnosid.installation.Depotthe Depot associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreatePackages
Description

Tests if this user can create Packages. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Package will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Package creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreatePackageWithRecordTypes
Description

Tests if this user can create a single Package using the desired record types. While InstallationManager.getPackageRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Package. Providing an empty array tests if a Package can be created with no records.

Parametersosid.type.Type[]packageRecordTypesarray of package record types
Returnboolean true if Package creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT packageRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPackageFormForCreate
Description

Gets the package form for creating new packages. A new form should be requested for each create transaction.

Parametersosid.type.Type[]packageRecordTypesarray of package record types
Returnosid.installation.PackageFormthe package form
ErrorsNULL_ARGUMENT packageRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePackage
Description

Creates a new Package.

Parametersosid.installation.PackageFormpackageFormthe form for this Package
Returnosid.installation.Packagethe new Package
ErrorsILLEGAL_STATE packageForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT packageForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED packageForm did not originate from getPackageFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePackages
Description

Tests if this user can update Packages. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Package will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if package modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePackage
Description

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 a PERMISSION_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.

Parametersosid.id.IdpackageIdthe Id of the Package
Returnboolean false if package modification is not authorized, true otherwise
ErrorsNULL_ARGUMENT packageId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

If the packageId is not found, then it is acceptable to return false to indicate the lack of an update available.

MethodgetPackageFormForUpdate
Description

Gets the package form for updating an existing package. A new package form should be requested for each update transaction.

Parametersosid.id.IdpackageIdthe Id of the Package
Returnosid.installation.PackageFormthe package form
ErrorsNOT_FOUND packageId is not found
NULL_ARGUMENT packageId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePackage
Description

Updates an existing package.

Parametersosid.installation.PackageFormpackageFormthe form containing the elements to be updated
ErrorsINVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT packageForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED packageForm did not originate from getPackageFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeletePackages
Description

Tests if this user can delete Packages. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Package will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Package deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanDeletePackage
Description

Tests if this user can delete a specified Package. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting the Package will result in a PERMISSION_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.

Parametersosid.id.IdpackageIdthe Id of the Package
Returnboolean false if Package deletion is not authorized, true otherwise
ErrorsNULL_ARGUMENT packageId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

If the packageId is not found, then it is acceptable to return false to indicate the lack of a delete available.

MethoddeletePackage
Description

Deletes the Package identified by the given Id.

Parametersosid.id.IdpackageIdthe Id of the Package to delete
ErrorsNOT_FOUNDa Package was not found identified by the given Id
NULL_ARGUMENT packageId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePackageAliases
Description

Tests if this user can manage Id aliases for Packages. 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.

Returnboolean false if Package aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasPackage
Description

Adds an Id to a Package for the purpose of creating compatibility. The primary Id of the Package is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another package it is reassigned to the given package Id.

Parametersosid.id.IdpackageIdthe Id of a Package
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND packageId not found
NULL_ARGUMENT packageId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateInstallationContent
Description

Tests if this user can create content for Packages. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an InstallationContent will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if installation content creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateInstallationContentWithRecordTypes
Description

Tests if this user can create an InstallationContent using the desired record types. While InstallationManager.getInstallationContentRecordTypes() can be used to test which records are supported, this method tests which records are required for creating a specific InstallationContent. Providing an empty array tests if an InstallationContent can be created with no records.

Parametersosid.type.Type[]installationContentRecordTypesarray of installation content record types
Returnboolean true if InstallationContent creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT installationContentRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetInstallationContentFormForCreate
Description

Gets an installation content form for creating new installation contents.

Parametersosid.id.IdpackageIdthe Id of a Package
osid.type.Type[]installationContentRecordTypesarray of installation content record types
Returnosid.installation.InstallationContentFormthe installation content form
ErrorsNOT_FOUND packageId is not found
NULL_ARGUMENT packageId or installationContentRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateInstallationContent
Description

Creates new InstallationContent for a given package.

Parametersosid.installation.InstallationContentForminstallationContentFormthe form for this InstallationContent
Returnosid.installation.InstallationContentthe new InstallationContent
ErrorsILLEGAL_STATE installationContentForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT installationContentForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED installationContentForm did not originate from getInstallationContentFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateInstallationContents
Description

Tests if this user can update InstallationContent. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an InstallationContent will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if InstallationContent modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetInstallationContentFormForUpdate
Description

Gets the installation content form for updating an existing installation content. A new installation content form should be requested for each update transaction.

Parametersosid.id.IdinstallationContentIdthe Id of the InstallationContent
Returnosid.installation.InstallationContentFormthe v content form
ErrorsNOT_FOUND installationContentId is not found
NULL_ARGUMENT installationContentId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdateInstallationContent
Description

Updates an existing installation content.

Parametersosid.installation.InstallationContentForminstallationContentFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE installationContentForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT installationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED installationContentForm did not originate from getInstallationContentFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteInstallationContents
Description

Tests if this user can delete InstallationContents. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an InstallationContent will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if InstallationContent deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteInstallationContent
Description

Deletes content from a package.

Parametersosid.id.IdinstallationContentIdthe Id of the InstallationContent
ErrorsNOT_FOUND installationContentId is not found
NULL_ARGUMENT installationContentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePackageVersions
Description

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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if package versioning is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaddPackageVersion
Description

Sets the given package to be the next version of another package.

Parametersosid.id.IdpackageIdthe Id of a Package
osid.id.IdnextPackageIdthe Id of the net package version
ErrorsALREADY_EXISTS nextPackageId or packageId already part of a version chain
NOT_FOUND packageId or nextPackageId not found
NULL_ARGUMENT packageId or nextPackageId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremovePackageVersion
Description

Removes a package from being the next version of another package.

Parametersosid.id.IdpackageIdthe Id of a Package
osid.id.IdnextPackageIdthe Id of the net package version
ErrorsNOT_FOUND nextPackageId does not follow packageId
NULL_ARGUMENT packageId or dependencyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.