def get_composition_assets(self, composition_id):
        """Gets the list of assets mapped to the given ``Composition``.

        arg:    composition_id (osid.id.Id): ``Id`` of the
                ``Composition``
        return: (osid.repository.AssetList) - list of assets
        raise:  NotFound - ``composition_id`` not found
        raise:  NullArgument - ``composition_id`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure
        *compliance: mandatory -- This method is must be implemented.*

        """
        # Implemented from template for
        # osid.repository.AssetCompositionSession.get_composition_assets
        collection = JSONClientValidated('repository',
                                         collection='Composition',
                                         runtime=self._runtime)
        composition = collection.find_one(
            dict({'_id': ObjectId(composition_id.get_identifier())},
                 **self._view_filter()))
        if 'assetIds' not in composition:
            raise errors.NotFound('no Assets are assigned to this Composition')
        asset_ids = []
        for idstr in composition['assetIds']:
            asset_ids.append(Id(idstr))
        mgr = self._get_provider_manager('REPOSITORY')
        lookup_session = mgr.get_asset_lookup_session(proxy=self._proxy)
        lookup_session.use_federated_repository_view()
        return lookup_session.get_assets_by_ids(asset_ids)
def get_composition_assets ( self , composition_id ) : collection = JSONClientValidated ( 'repository' , collection = 'Composition' , runtime = self . _runtime ) composition = collection . find_one ( dict ( { '_id' : ObjectId ( composition_id . get_identifier ( ) ) } , ** self . _view_filter ( ) ) ) if 'assetIds' not in composition : raise errors . NotFound ( 'no Assets are assigned to this Composition' ) asset_ids = [ ] for idstr in composition [ 'assetIds' ] : asset_ids . append ( Id ( idstr ) ) mgr = self . _get_provider_manager ( 'REPOSITORY' ) lookup_session = mgr . get_asset_lookup_session ( proxy = self . _proxy ) lookup_session . use_federated_repository_view ( ) return lookup_session . get_assets_by_ids ( asset_ids )
Gets the list of assets mapped to the given ``Composition``.

        arg:    composition_id (osid.id.Id): ``Id`` of the
                ``Composition``
        return: (osid.repository.AssetList) - list of assets
        raise:  NotFound - ``composition_id`` not found
        raise:  NullArgument - ``composition_id`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure
        *compliance: mandatory -- This method is must be implemented.*