Resource Open Service Interface Definitions resource version 3.0.0

The Resource OSID defines a service to access and manage a directory of objects.

Resources

Resources may represent people, places or a set or arbitrary entities that are used throughout the OSIDs as references to indirect objects. In core OSID, Resources have no other meaning other than to provide an identifier and a relation to an authentication principal. Resource Types may define extra data to define an employee, organizational unit or an inventory item.

Resources are referenced throughout the OSIDs to and the abstraction level of this service provides a consistent interface with which to access and manage object references not directly pertinent to the service in play. For example, a Repository OSID may reference Resources as authors or a Course OSID may reference Resources for students and instructors. Each of these OSIDs may orchestrate a Resource OSID to provide management of the set of referenced resources.

A Resource genus Type may be used to provide a label the kind of resource. This service offers the flexibility that the producer of a film may be a person, a production company, or a fire hydrant. While genus Types may be used to constrain the kinds of Resources that may be related to various OsidObjects if necessary , OSID Consumers are expected to simply use the Resource as a reference. If an OSID Consumer wishes to provide a mechanism for updating a Resource referenced, the OSID Consumer should use an orchestrated Resource OSID.

Agents

A Resource also provides the mapping between an authentication Agent and the entity on whose behalf the agent is acting. An Agent can only map to a single Resource while a Resource can have multiple Agents. An agent that represents the unix login of “vijay” on server due.mit.edu can map to a Resource representing Vijay Kumar, who may also have a campus agent of “vkumar@mit.edu.”

Group

When a Resource is referenced in another OSID, it is a singular entity. To provide groupings of multiple people or things, a Resource can also be defined as a hierarchical group of other resources. Whether a resource is a single entity or a group is an attribute of the Resource itself. If a Resource is a group, then its membership can be queried or managed in one of the group sessions. This overloading of the object definition serves to keep the nature of the resource separate from the other OSIDs such that a message to a “group”, for example, is referenced as a single resource receipient. Other OSIDs are blind to whether or not a referenced Resource is a group or a singular entity..

Resource Relationships

For kicks, Resources may have arbitrrary relationships to other Resources using the ResourceRelationship interface. Resource relationships may also be used to provide a place to describe in more detail, or hang data, on a member to group relationship.

Bin Cataloging

Resources may be mapped into hierarchial Bins for the purpose of cataloging or federation.

Sub Packages

The Resource OSID includes a Resource Demographic OSID for managing dynamically generated populations of Resources and a Resource Batch OSID for managing Resources in bulk.

Service Managers

Resource Profile

class dlkit.services.resource.ResourceProfile

Bases: dlkit.osid.managers.OsidProfile

The resource profile describes interoperability among resource services.

supports_resource_lookup()

Tests if resource lookup is supported.

Returns:true if resource lookup is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_query()

Tests if resource query is supported.

Returns:true if resource query is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Tests if resource search is supported.

Returns:true if resource search is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_admin()

Tests if resource administration is supported.

Returns:true if resource administration is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_notification()

Tests if resource notification is supported.

Messages may be sent when resources are created, modified, or deleted.

Returns:true if resource notification is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_bin()

Tests if retrieving mappings of resource and bins is supported.

Returns:true if resource bin mapping retrieval is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_bin_assignment()

Tests if managing mappings of resource and bins is supported.

Returns:true if resource bin assignment is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_agent()

Tests if retrieving mappings of resource and agents is supported.

Returns:true if resource agent mapping retrieval is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_resource_agent_assignment()

Tests if managing mappings of resources and agents is supported.

Returns:true if resource agent assignment is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_bin_lookup()

Tests if bin lookup is supported.

Returns:true if bin lookup is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_bin_query()

Tests if bin query is supported.

Returns:true if bin query is supported , false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_bin_admin()

Tests if bin administration is supported.

Returns:true if bin administration is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_bin_hierarchy()

Tests if a bin hierarchy traversal is supported.

Returns:true if a bin hierarchy traversal is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

supports_bin_hierarchy_design()

Tests if a bin hierarchy design is supported.

Returns:true if a bin hierarchy design is supported, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

resource_record_types

Gets all the resource record types supported.

Returns:the list of supported resource record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

resource_search_record_types

Gets all the resource search record types supported.

Returns:the list of supported resource search record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

resource_relationship_record_types

Gets the supported ResourceRelationship record types.

Returns:a list containing the supported ResourceRelationship record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

resource_relationship_search_record_types

Gets the supported ResourceRelationship search record types.

Returns:a list containing the supported ResourceRelationship search record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

bin_record_types

Gets all the bin record types supported.

Returns:the list of supported bin record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

bin_search_record_types

Gets all the bin search record types supported.

Returns:the list of supported bin search record types
Return type:osid.type.TypeList

compliance: mandatory – This method must be implemented.

Resource Manager

class dlkit.services.resource.ResourceManager(proxy=None)

Bases: dlkit.osid.managers.OsidManager, dlkit.osid.sessions.OsidSession, dlkit.services.resource.ResourceProfile

The resource manager provides access to resource lookup and creation sessions and provides interoperability tests for various aspects of this service.

The sessions included in this manager are:

  • ResourceLookupSession: a session to retrieve resources
  • ResourceQuerySession: a session to query resources
  • ResourceSearchSession: a session to search for resources
  • ResourceAdminSession: a session to create and delete resources
  • ResourceNotificationSession: a session to receive notifications pertaining to resource changes
  • ResourceBinSession: a session to look up resource to bin mappings
  • ResourceBinAssignmentSession: a session to manage resource to bin mappings
  • ResourceSmartBinSession: a session to manage smart resource bins
  • MembershipSession: a session to query memberships
  • GroupSession: a session to retrieve group memberships
  • GroupAssignmentSession: a session to manage groups
  • GroupNotificationSession: a session to retrieve notifications on changes to group membership
  • GroupHierarchySession: a session to view a group hierarchy
  • RsourceAgentSession: a session to retrieve Resource and Agent mappings
  • ResourceAgentAssignmentSession: a session to manage Resource and Agent mappings
  • ResourceRelationshipLookupSession: a session to retrieve resource relationships
  • ResourceRelationshipQuerySession: a session to query for resource relationships
  • ResourceRelationshipSearchSession: a session to search for resource relationships
  • ResourceRelationshipAdminSession: a session to create and delete resource relationships
  • ResourceRelationshipNotificationSession: a session to receive notifications pertaining to resource relationshipchanges
  • ResourceRelationshipBinSession: a session to look up resource relationship to bin mappings
  • ResourceRelationshipBinAssignmentSession: a session to manage resource relationship to bin mappings
  • ResourceRelationshipSmartBinSession: a session to manage smart resource relationship bins
  • BinLookupSession: a session to retrieve bins
  • BinQuerySession: a session to query bins
  • BinSearchSession: a session to search for bins
  • BinAdminSession: a session to create, update and delete bins
  • BinNotificationSession: a session to receive notifications pertaining to changes in bins
  • BinHierarchySession: a session to traverse bin hierarchies
  • BinHierarchyDesignSession: a session to manage bin hierarchies
resource_batch_manager

Gets the ResourceBatchManager.

Returns:a ResourceBatchManager
Return type:osid.resource.batch.ResourceBatchManager
Raise:OperationFailed – unable to complete request
Raise:Unimplementedsupports_resource_batch() is false

compliance: optional – This method must be implemented if ``supports_resource_batch()`` is ``true``.

resource_demographic_manager

Gets the ResourceDemographicManager.

Returns:a ResourceDemographicManager
Return type:osid.resource.demographic.ResourceDemographicManager
Raise:OperationFailed – unable to complete request
Raise:Unimplementedsupports_resource_demographic() is false

compliance: optional – This method must be implemented if ``supports_resource_demographic()`` is ``true``.

Bin Lookup Methods

ResourceManager.can_lookup_bins()

Tests if this user can perform Bin lookups.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returns:false if lookup methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.use_comparative_bin_view()

The returns from the bin methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

ResourceManager.use_plenary_bin_view()

A complete view of the Bin returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

ResourceManager.get_bin(bin_id)

Gets the Bin specified by its Id.

In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Bin may have a different Id than requested, such as the case where a duplicate Id was assigned to a Bin and retained for compatibility.

Parameters:bin_id (osid.id.Id) – Id of the Bin
Returns:the bin
Return type:osid.resource.Bin
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method is must be implemented.

ResourceManager.get_bins_by_ids(bin_ids)

Gets a BinList corresponding to the given IdList.

In plenary mode, the returned list contains all of the bins specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Bins may be omitted from the list and may present the elements in any order including returning a unique set.

Parameters:bin_ids (osid.id.IdList) – the list of Ids to retrieve
Returns:the returned Bin list
Return type:osid.resource.BinList
Raise:NotFound – an Id was not found
Raise:NullArgumentbin_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_bins_by_genus_type(bin_genus_type)

Gets a BinList corresponding to the given bin genus Type which does not include bins of types derived from the specified Type.

In plenary mode, the returned list contains all known bins or an error results. Otherwise, the returned list may contain only those bins that are accessible through this session.

Parameters:bin_genus_type (osid.type.Type) – a bin genus type
Returns:the returned Bin list
Return type:osid.resource.BinList
Raise:NullArgumentbin_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_bins_by_parent_genus_type(bin_genus_type)

Gets a BinList corresponding to the given bin genus Type and include any additional bins with genus types derived from the specified Type.

In plenary mode, the returned list contains all known bins or an error results. Otherwise, the returned list may contain only those bins that are accessible through this session.

Parameters:bin_genus_type (osid.type.Type) – a bin genus type
Returns:the returned Bin list
Return type:osid.resource.BinList
Raise:NullArgumentbin_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_bins_by_record_type(bin_record_type)

Gets a BinList containing the given bin record Type.

In plenary mode, the returned list contains all known bins or an error results. Otherwise, the returned list may contain only those bins that are accessible through this session.

Parameters:bin_record_type (osid.type.Type) – a bin record type
Returns:the returned Bin list
Return type:osid.resource.BinList
Raise:NullArgumentbin_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_bins_by_provider(resource_id)

Gets a BinList from the given provider.

In plenary mode, the returned list contains all known bins or an error results. Otherwise, the returned list may contain only those bins that are accessible through this session.

Parameters:resource_id (osid.id.Id) – a resource Id
Returns:the returned Bin list
Return type:osid.resource.BinList
Raise:NullArgumentresource_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.bins

Gets all Bins.

In plenary mode, the returned list contains all known bins or an error results. Otherwise, the returned list may contain only those bins that are accessible through this session.

Returns:a list of Bins
Return type:osid.resource.BinList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Bin Query Methods

ResourceManager.can_search_bins()

Tests if this user can perform Bin searches.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.

Returns:false if search methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.bin_query

Gets a bin query.

The returned query will not have an extension query.

Returns:the bin query
Return type:osid.resource.BinQuery

compliance: mandatory – This method must be implemented.

ResourceManager.get_bins_by_query(bin_query)

Gets a list of Bins matching the given bin query.

Parameters:bin_query (osid.resource.BinQuery) – the bin query
Returns:the returned BinList
Return type:osid.resource.BinList
Raise:NullArgumentbin_query is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – a bin_query is not of this service

compliance: mandatory – This method must be implemented.

Bin Admin Methods

ResourceManager.can_create_bins()

Tests if this user can create Bins.

A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Bin will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returns:false if Bin creation is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.can_create_bin_with_record_types(bin_record_types)

Tests if this user can create a single Bin using the desired record types.

While ResourceManager.getBinRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Bin. Providing an empty array tests if a Bin can be created with no records.

Parameters:bin_record_types (osid.type.Type[]) – array of bin record types
Returns:true if Bin creation using the specified Types is supported, false otherwise
Return type:boolean
Raise:NullArgumentbin_record_types is null

compliance: mandatory – This method must be implemented.

ResourceManager.get_bin_form_for_create(bin_record_types)

Gets the bin form for creating new bins.

Parameters:bin_record_types (osid.type.Type[]) – array of bin record types
Returns:the bin form
Return type:osid.resource.BinForm
Raise:NullArgumentbin_record_types is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – unable to get form with requested record types

compliance: mandatory – This method must be implemented.

ResourceManager.create_bin(bin_form)

Creates a new Bin.

Parameters:bin_form (osid.resource.BinForm) – the form for this Bin
Returns:the new Bin
Return type:osid.resource.Bin
Raise:IllegalStatebin_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentbin_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedbin_form did not originate from get_bin_form_for_create()

compliance: mandatory – This method must be implemented.

ResourceManager.can_update_bins()

Tests if this user can update Bins.

A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Bin will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returns:false if Bin modification is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.get_bin_form_for_update(bin_id)

Gets the bin form for updating an existing bin.

A new bin form should be requested for each update transaction.

Parameters:bin_id (osid.id.Id) – the Id of the Bin
Returns:the bin form
Return type:osid.resource.BinForm
Raise:NotFoundbin_id is not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.update_bin(bin_form)

Updates an existing bin.

Parameters:bin_form (osid.resource.BinForm) – the form containing the elements to be updated
Raise:IllegalStatebin_form already used in an update transaction
Raise:InvalidArgument – the form contains an invalid value
Raise:NullArgumentbin_id or bin_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedbin_form did not originate from get_bin_form_for_update()

compliance: mandatory – This method must be implemented.

ResourceManager.can_delete_bins()

Tests if this user can delete Bins.

A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Bin will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returns:false if Bin deletion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.delete_bin(bin_id)

Deletes a Bin.

Parameters:bin_id (osid.id.Id) – the Id of the Bin to remove
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.can_manage_bin_aliases()

Tests if this user can manage Id aliases for Bins.

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

Returns:false if Bin aliasing is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.alias_bin(bin_id, alias_id)

Adds an Id to a Bin for the purpose of creating compatibility.

The primary Id of the Bin is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another bin, it is reassigned to the given bin Id.

Parameters:
  • bin_id (osid.id.Id) – the Id of a Bin
  • alias_id (osid.id.Id) – the alias Id
Raise:

AlreadyExistsalias_id is already assigned

Raise:

NotFoundbin_id not found

Raise:

NullArgumentbin_id or alias_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Bin Hierarchy Methods

ResourceManager.bin_hierarchy_id

Gets the hierarchy Id associated with this session.

Returns:the hierarchy Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

ResourceManager.bin_hierarchy

Gets the hierarchy associated with this session.

Returns:the hierarchy associated with this session
Return type:osid.hierarchy.Hierarchy
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.can_access_bin_hierarchy()

Tests if this user can perform hierarchy queries.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an an application that may not offer traversal functions to unauthorized users.

Returns:false if hierarchy traversal methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.use_comparative_bin_view()

The returns from the bin methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

ResourceManager.use_plenary_bin_view()

A complete view of the Bin returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

ResourceManager.root_bin_ids

Gets the root bin Ids in this hierarchy.

Returns:the root bin Ids
Return type:osid.id.IdList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.root_bins

Gets the root bins in the bin hierarchy.

A node with no parents is an orphan. While all bin Ids are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node.

Returns:the root bins
Return type:osid.resource.BinList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method is must be implemented.

ResourceManager.has_parent_bins(bin_id)

Tests if the Bin has any parents.

Parameters:bin_id (osid.id.Id) – the Id of a bin
Returns:true if the bin has parents, false otherwise
Return type:boolean
Raise:NotFoundbin_id is not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.is_parent_of_bin(id_, bin_id)

Tests if an Id is a direct parent of a bin.

Parameters:
  • id (osid.id.Id) – an Id
  • bin_id (osid.id.Id) – the Id of a bin
Returns:

true if this id is a parent of bin_id, false otherwise

Return type:

boolean

Raise:

NotFoundbin_id is not found

Raise:

NullArgumentid or bin_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented. implementation notes: If id not found return false.

ResourceManager.get_parent_bin_ids(bin_id)

Gets the parent Ids of the given bin.

Parameters:bin_id (osid.id.Id) – the Id of a bin
Returns:the parent Ids of the bin
Return type:osid.id.IdList
Raise:NotFoundbin_id is not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_parent_bins(bin_id)

Gets the parents of the given bin.

Parameters:bin_id (osid.id.Id) – the Id to query
Returns:the parents of the bin
Return type:osid.resource.BinList
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.is_ancestor_of_bin(id_, bin_id)

Tests if an Id is an ancestor of a bin.

Parameters:
  • id (osid.id.Id) – an Id
  • bin_id (osid.id.Id) – the Id of a bin
Returns:

true if this id is an ancestor of bin_id, false otherwise

Return type:

boolean

Raise:

NotFoundbin_id is not found

Raise:

NullArgumentid or bin_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented. implementation notes: If id not found return false.

ResourceManager.has_child_bins(bin_id)

Tests if a bin has any children.

Parameters:bin_id (osid.id.Id) – the Id of a bin
Returns:true if the bin_id has children, false otherwise
Return type:boolean
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.is_child_of_bin(id_, bin_id)

Tests if a bin is a direct child of another.

Parameters:
  • id (osid.id.Id) – an Id
  • bin_id (osid.id.Id) – the Id of a bin
Returns:

true if the id is a child of bin_id, false otherwise

Return type:

boolean

Raise:

NotFoundbin_id is not found

Raise:

NullArgumentid or bin_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented. implementation notes: If id not found return false.

ResourceManager.get_child_bin_ids(bin_id)

Gets the child Ids of the given bin.

Parameters:bin_id (osid.id.Id) – the Id to query
Returns:the children of the bin
Return type:osid.id.IdList
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_child_bins(bin_id)

Gets the children of the given bin.

Parameters:bin_id (osid.id.Id) – the Id to query
Returns:the children of the bin
Return type:osid.resource.BinList
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.is_descendant_of_bin(id_, bin_id)

Tests if an Id is a descendant of a bin.

Parameters:
  • id (osid.id.Id) – an Id
  • bin_id (osid.id.Id) – the Id of a bin
Returns:

true if the id is a descendant of the bin_id, false otherwise

Return type:

boolean

Raise:

NotFoundbin_id is not found

Raise:

NullArgumentid or bin_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented. implementation notes: If id is not found return false.

ResourceManager.get_bin_node_ids(bin_id, ancestor_levels, descendant_levels, include_siblings)

Gets a portion of the hierarchy for the given bin.

Parameters:
  • bin_id (osid.id.Id) – the Id to query
  • ancestor_levels (cardinal) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.
  • descendant_levels (cardinal) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.
  • include_siblings (boolean) – true to include the siblings of the given node, false to omit the siblings
Returns:

a bin node

Return type:

osid.hierarchy.Node

Raise:

NotFoundbin_id not found

Raise:

NullArgumentbin_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.get_bin_nodes(bin_id, ancestor_levels, descendant_levels, include_siblings)

Gets a portion of the hierarchy for the given bin.

Parameters:
  • bin_id (osid.id.Id) – the Id to query
  • ancestor_levels (cardinal) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.
  • descendant_levels (cardinal) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.
  • include_siblings (boolean) – true to include the siblings of the given node, false to omit the siblings
Returns:

a bin node

Return type:

osid.resource.BinNode

Raise:

NotFoundbin_id not found

Raise:

NullArgumentbin_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Bin Hierarchy Design Methods

ResourceManager.bin_hierarchy_id

Gets the hierarchy Id associated with this session.

Returns:the hierarchy Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

ResourceManager.bin_hierarchy

Gets the hierarchy associated with this session.

Returns:the hierarchy associated with this session
Return type:osid.hierarchy.Hierarchy
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.can_modify_bin_hierarchy()

Tests if this user can change the hierarchy.

A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.

Returns:false if changing this hierarchy is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ResourceManager.add_root_bin(bin_id)

Adds a root bin.

Parameters:bin_id (osid.id.Id) – the Id of a bin
Raise:AlreadyExistsbin_id is already in hierarchy
Raise:NotFoundbin_id not found
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.remove_root_bin(bin_id)

Removes a root bin.

Parameters:bin_id (osid.id.Id) – the Id of a bin
Raise:NotFoundbin_id not a root
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.add_child_bin(bin_id, child_id)

Adds a child to a bin.

Parameters:
  • bin_id (osid.id.Id) – the Id of a bin
  • child_id (osid.id.Id) – the Id of the new child
Raise:

AlreadyExistsbin_id is already a parent of child_id

Raise:

NotFoundbin_id or child_id not found

Raise:

NullArgumentbin_id or child_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.remove_child_bin(bin_id, child_id)

Removes a child from a bin.

Parameters:
  • bin_id (osid.id.Id) – the Id of a bin
  • child_id (osid.id.Id) – the Id of the new child
Raise:

NotFoundbin_id not a parent of child_id

Raise:

NullArgumentbin_id or child_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

ResourceManager.remove_child_bins(bin_id)

Removes all children from a bin.

Parameters:bin_id (osid.id.Id) – the Id of a bin
Raise:NotFoundbin_id not in hierarchy
Raise:NullArgumentbin_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.