Rules

Proxy

class dlkit.proxy.rules.Proxy

Bases: dlkit.osid.rules.OsidResult

A Proxy is used to transfer external information from an application server into an OSID Provider.

has_authentication()

Tests if an authentication is available.

Returns:true if an Authentication is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

authentication

Gets the Authentication for this proxy.

Returns:the authentication
Return type:osid.authentication.process.Authentication
Raise:IllegalStatehas_authentication() is false

compliance: mandatory – This method must be implemented.

has_effective_agent()

Tests if an effective agent is available.

Returns:true if an effective agent is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

effective_agent_id

Gets the effective Agent Id for this proxy.

Returns:the effective agent Id
Return type:osid.id.Id
Raise:IllegalStatehas_effective_agent() is false

compliance: mandatory – This method must be implemented.

effective_agent

Gets the effective Agent for this proxy.

Returns:the effective agent
Return type:osid.authentication.Agent
Raise:IllegalStatehas_effective_agent() is false
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

has_effective_date()

Tests if an effective date is available.

Returns:true if an effective date is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

effective_date

Gets the effective date.

Returns:the effective date
Return type:timestamp
Raise:IllegalStatehas_effective_date() is false

compliance: mandatory – This method must be implemented.

effective_clock_rate

Gets the rate of the clock.

Returns:the rate
Return type:decimal
Raise:IllegalStatehas_effective_date() is false

compliance: mandatory – This method must be implemented.

locale

Gets the locale.

Returns:a locale
Return type:osid.locale.Locale

compliance: mandatory – This method must be implemented.

has_format_type()

Tests if a DisplayText format Type is available.

Returns:true if a format type is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

format_type

Gets the DisplayText format Type.

Returns:the format Type
Return type:osid.type.Type
Raise:IllegalStatehas_format_type() is false

compliance: mandatory – This method must be implemented.

get_proxy_record(proxy_record_type)

Gets the proxy record corresponding to the given Proxy record Type.

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

Parameters:proxy_record_type (osid.type.Type) – the type of proxy record to retrieve
Returns:the proxy record
Return type:osid.proxy.records.ProxyRecord
Raise:NullArgumentproxy_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(proxy_record_type) is false

compliance: mandatory – This method must be implemented.

Proxy Condition

class dlkit.proxy.rules.ProxyCondition

Bases: dlkit.osid.rules.OsidCondition

A ProxyCondition is used to transfer external information into a proxy.

effective_agent_id
set_effective_date(date, rate)

Sets the effective date.

Parameters:
  • date (timestamp) – a date
  • rate (decimal) – the rate at which the clock should tick from the given effective date. 0 is a clock that is fixed
Raise:

NullArgumentdate is null

compliance: mandatory – This method must be implemented.

language_type
script_type
calendar_type
time_type
currency_type
unit_system_type
format_type
get_proxy_condition_record(proxy_condition_type)

Gets the proxy condition record corresponding to the given Proxy record Type.

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

Parameters:proxy_condition_type (osid.type.Type) – the type of proxy condition record to retrieve
Returns:the proxy condition record
Return type:osid.proxy.records.ProxyConditionRecord
Raise:NullArgumentproxy_condition_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(proxy_condition_record_type) is false

compliance: mandatory – This method must be implemented.