Exemple #1
0
    def get_hierarchy_sequencing_session_for_hierarchy(self, hierarchy_id):
        """Gets the ``OsidSession`` associated with the sequencing design service using for the given hierarchy.

        arg:    hierarchy_id (osid.id.Id): the ``Id`` of the graph
        return: (osid.hierarchy.HierarchySequencingSession) - a
                ``HierarchySequencingSession``
        raise:  NotFound - ``hierarchy_id`` is not found
        raise:  NullArgument - ``hierarchy_id`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  Unimplemented - ``supports_hierarchy_sequencing()`` or
                ``supports_visible_federation()`` is ``false``
        *compliance: optional -- This method must be implemented if
        ``supports_hierarchy_sequencing()`` and
        ``supports_visible_federation()`` are ``true``.*

        """
        if not self.supports_hierarchy_sequencing():
            raise errors.Unimplemented()
        ##
        # Also include check to see if the catalog Id is found otherwise raise errors.NotFound
        ##
        # pylint: disable=no-member
        return sessions.HierarchySequencingSession(hierarchy_id, self._runtime)
Exemple #2
0
    def get_hierarchy_structure_notification_session(
            self, hierarchy_structure_receiver):
        """Gets the session for subscribing to notifications of changes within a hierarchy structure.

        arg:    hierarchy_structure_receiver
                (osid.hierarchy.HierarchyStructureReceiver): a receiver
        return: (osid.hierarchy.HierarchyStructureNotificationSession) -
                a ``HierarchyStructureNotificationSession``
        raise:  NullArgument - ``hierarchy_structure_receiver`` is
                ``null``
        raise:  OperationFailed - unable to complete request
        raise:  Unimplemented -
                ``supports_hierarchy_structure_notification()`` is
                ``false``
        *compliance: optional -- This method must be implemented if
        ``supports_hierarchy_structure_notification()`` is ``true``.*

        """
        if not self.supports_hierarchy_structure_notification():
            raise errors.Unimplemented()
        # pylint: disable=no-member
        return sessions.HierarchyStructureNotificationSession(
            runtime=self._runtime, receiver=hierarchy_structure_receiver)
Exemple #3
0
    def get_agent_lookup_session_for_agency(self, agency_id):
        """Gets the ``OsidSession`` associated with the agent lookup service for the given agency.

        arg:    agency_id (osid.id.Id): the ``Id`` of the agency
        return: (osid.authentication.AgentLookupSession) - ``an
                _agent_lookup_session``
        raise:  NotFound - ``agency_id`` not found
        raise:  NullArgument - ``agency_id`` is ``null``
        raise:  OperationFailed - ``unable to complete request``
        raise:  Unimplemented - ``supports_agent_lookup()`` or
                ``supports_visible_federation()`` is ``false``
        *compliance: optional -- This method must be implemented if
        ``supports_agent_lookup()`` and
        ``supports_visible_federation()`` are ``true``.*

        """
        if not self.supports_agent_lookup():
            raise errors.Unimplemented()
        ##
        # Also include check to see if the catalog Id is found otherwise raise errors.NotFound
        ##
        # pylint: disable=no-member
        return sessions.AgentLookupSession(agency_id, runtime=self._runtime)
Exemple #4
0
    def get_properties_by_record_type(self, record_type):
        """Gets a list of properties corresponding to the specified record type.

        Properties provide a means for applications to display a
        representation of the contents of a record without understanding
        its record interface specification. Applications needing to
        examine a specific propertyshould use the methods defined by the
        record ``Type``. The resulting set includes properties specified
        by parents of the record ``type`` in the case a record's
        interface extends another.

        arg:    record_type (osid.type.Type): the record type
                corresponding to the properties set to retrieve
        return: (osid.PropertyList) - a list of properties
        raise:  NullArgument - ``record_type`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - an authorization failure occurred
        raise:  Unsupported - ``has_record_type(record_type)`` is
                ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        raise errors.Unimplemented()
Exemple #5
0
    def get_relationship_record(self, relationship_record_type):
        """Gets the relationshop record corresponding to the given ``Relationship`` record ``Type``.

        This method is used to retrieve an object implementing the
        requested record. The ``relationship_record_type`` may be the
        ``Type`` returned in ``get_record_types()`` or any of its
        parents in a ``Type`` hierarchy where
        ``has_record_type(relationship_record_type)`` is ``true`` .

        arg:    relationship_record_type (osid.type.Type): the type of
                relationship record to retrieve
        return: (osid.relationship.records.RelationshipRecord) - the
                relationship record
        raise:  NullArgument - ``relationship_record_type`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure occurred
        raise:  Unsupported -
                ``has_record_type(relationship_record_type)`` is
                ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        raise errors.Unimplemented()
Exemple #6
0
    def get_assessment_part_record(self, assessment_part_record_type):
        """Gets the assessment part record corresponding to the given ``AssessmentPart`` record ``Type``.

        This method is used to retrieve an object implementing the
        requested record. The ``assessment_part_record_type`` may be the
        ``Type`` returned in ``get_record_types()`` or any of its
        parents in a ``Type`` hierarchy where
        ``has_record_type(assessment_part_record_type)`` is ``true`` .

        arg:    assessment_part_record_type (osid.type.Type): the type
                of the record to retrieve
        return: (osid.assessment.authoring.records.AssessmentPartRecord)
                - the assessment part record
        raise:  NullArgument - ``assessment_part_record_type`` is
                ``null``
        raise:  OperationFailed - unable to complete request
        raise:  Unsupported -
                ``has_record_type(assessment_part_record_type)`` is
                ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        raise errors.Unimplemented()
Exemple #7
0
    def get_assessment_part_search_results_record(
            self, assessment_part_search_record_type):
        """Gets the assessment part search results record corresponding to the given assessment part search record ``Type``.

        This method must be used to retrieve an object implementing the
        requested record.

        arg:    assessment_part_search_record_type (osid.type.Type): an
                assessment part search record type
        return: (osid.assessment.authoring.records.AssessmentPartSearchR
                esultsRecord) - the assessment part search results
                record
        raise:  NullArgument - ``assessment_part_search_record_type`` is
                ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure occurred
        raise:  Unsupported -
                ``has_record_type(assessment_part_search_record_type)``
                is ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        raise errors.Unimplemented()
Exemple #8
0
    def get_logging_session_for_log(self, log_id, proxy):
        """Gets the ``OsidSession`` associated with the logging service for the given log.

        arg:    log_id (osid.id.Id): the ``Id`` of the ``Log``
        arg:    proxy (osid.proxy.Proxy): a proxy
        return: (osid.logging.LoggingSession) - a ``LoggingSession``
        raise:  NotFound - no ``Log`` found by the given ``Id``
        raise:  NullArgument - ``log_id`` or ``proxy`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  Unimplemented - ``supports_logging()`` or
                ``supports_visible_federation()`` is ``false``
        *compliance: optional -- This method must be implemented if
        ``supports_logging()`` and ``supports_visible_federation()`` are
        ``true``*

        """
        if not self.supports_logging():
            raise errors.Unimplemented()
        ##
        # Also include check to see if the catalog Id is found otherwise raise errors.NotFound
        ##
        # pylint: disable=no-member
        return sessions.LoggingSession(log_id, proxy, self._runtime)
Exemple #9
0
    def get_relationship_search_results_record(
            self, relationship_search_record_type):
        """Gets the relationship search results record corresponding to the given relationship search record ``Type``.

        This method must be used to retrieve an object implementing the
        requested record interface along with all of its ancestor
        interfaces.

        arg:    relationship_search_record_type (osid.type.Type): a
                relationship search record type
        return:
                (osid.relationship.records.RelationshipSearchResultsReco
                rd) - the relationship search results record
        raise:  NullArgument - ``relationship_search_record_type`` is
                ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure occurred
        raise:  Unsupported -
                ``has_record_type(relationship_search_record_type)`` is
                ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        raise errors.Unimplemented()
Exemple #10
0
    def get_response_record(self, item_record_type):
        """Gets the response record corresponding to the given ``Item`` record ``Type``.

        This method is used to retrieve an object implementing the
        requested record. The ``item_record_type`` may be the ``Type``
        returned in ``get_record_types()`` or any of its parents in a
        ``Type`` hierarchy where ``has_record_type(item_record_type)``
        is ``true`` .

        arg:    item_record_type (osid.type.Type): an item record type
        return: (osid.assessment.records.ResponseRecord) - the response
                record
        raise:  NullArgument - ``item_record_type`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  Unsupported - ``has_record_type(item_record_type)`` is
                ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        if not self.has_record_type(item_record_type):
            raise errors.Unsupported()
        if str(item_record_type) not in self._records:
            raise errors.Unimplemented()
        return self._records[str(item_record_type)]
Exemple #11
0
    def get_relationship_admin_session_for_family(self, family_id):
        """Gets the ``OsidSession`` associated with the relationship administration service for the given family.

        arg:    family_id (osid.id.Id): the ``Id`` of the ``Family``
        return: (osid.relationship.RelationshipAdminSession) - a
                ``RelationshipAdminSession``
        raise:  NotFound - no family found by the given ``Id``
        raise:  NullArgument - ``family_id`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  Unimplemented - ``supports_relationship_admin()`` or
                ``supports_visible_federation()`` is ``false``
        *compliance: optional -- This method must be implemented if
        ``supports_relationship_admin()`` and
        ``supports_visible_federation()`` are ``true``*

        """
        if not self.supports_relationship_admin():
            raise errors.Unimplemented()
        ##
        # Also include check to see if the catalog Id is found otherwise raise errors.NotFound
        ##
        # pylint: disable=no-member
        return sessions.RelationshipAdminSession(family_id,
                                                 runtime=self._runtime)
Exemple #12
0
    def match_keyword(self, keyword=None, string_match_type=None, match=None):
        """Adds a keyword to match.

        Multiple keywords can be added to perform a boolean ``OR`` among
        them. A keyword may be applied to any of the elements defined in
        this object such as the display name, description or any method
        defined in an interface implemented by this object.

        arg:    keyword (string): keyword to match
        arg:    string_match_type (osid.type.Type): the string match
                type
        arg:    match (boolean): ``true`` for a positive match,
                ``false`` for a negative match
        raise:  InvalidArgument - ``keyword`` is not of
                ``string_match_type``
        raise:  NullArgument - ``keyword`` or ``string_match_type`` is
                ``null``
        raise:  Unsupported -
                ``supports_string_match_type(string_match_type)`` is
                ``false``
        *compliance: mandatory -- This method must be implemented.*

        """
        raise errors.Unimplemented()
Exemple #13
0
    def get_circle_of_trust_session_for_agency(self, agency_id, proxy):
        """Gets the ``OsidSession`` associated with the trust circle service for the given agency.

        arg:    agency_id (osid.id.Id): the ``Id`` of the agency
        arg:    proxy (osid.proxy.Proxy): a proxy
        return: (osid.authentication.process.CircleOfTrustSession) - a
                ``CircleOfTrustSession``
        raise:  NotFound - ``agency_id`` not found
        raise:  NullArgument - ``agency_id`` or ``proxy`` is ``null``
        raise:  OperationFailed - ``unable to complete request``
        raise:  Unimplemented - ``supports_ciirle_of_trust()`` or
                ``supports_visible_federation()`` is ``false``
        *compliance: optional -- This method must be implemented if
        ``supports_circle_of_trust()`` and
        ``supports_visible_federation()`` are ``true``.*

        """
        if not self.supports_circle_of_trust():
            raise errors.Unimplemented()
        ##
        # Also include check to see if the catalog Id is found otherwise raise errors.NotFound
        ##
        # pylint: disable=no-member
        return sessions.CircleOfTrustSession(agency_id, proxy, self._runtime)