class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional parent = optional(Context) input = optional(Input)
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Defined parent = defines(Context, doc=''' @rtype: Context The parent decoding that this decoding is based on. ''') doDecode = defines(IDo, doc=''' @rtype: callable(target, value) Decodes the value into the provided target. @param target: Context Target context object used for decoding. @param value: dictionary{object: object} The dictionary value to be decoded. ''') isMandatory = defines(bool, doc=''' @rtype: boolean Indicates that the decoding needs to have a value provided. ''') # ---------------------------------------------------------------- Optional doBegin = optional(IDo) doEnd = optional(IDo) # ---------------------------------------------------------------- Required type = requires(Type) doSet = requires(IDo) doGet = requires(IDo)
class ResponseHTTP(Context): ''' Context for HTTP response data. ''' # ---------------------------------------------------------------- Required status = requires(int, doc=''' @rtype: integer The response status code. ''') # ---------------------------------------------------------------- Optional code = optional(str, doc=''' @rtype: string The response code message. ''') text = optional(str, doc=''' @rtype: string The response text message (a short message). ''') headers = optional(dict, doc=''' @rtype: dictionary{string, string} The response headers. ''')
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional parent = optional(Context) property = optional(TypeProperty)
class Request(Context): ''' The request context. ''' # ---------------------------------------------------------------- Optional accTypes = optional(list) accCharSets = optional(list)
class RequestContentData(Context): ''' The request content context used for the content. ''' # ---------------------------------------------------------------- Optional name = optional(str) type = optional(str) charSet = optional(str) length = optional(int)
class Definition(Context): ''' The definition context. ''' # ---------------------------------------------------------------- Optional isMandatory = optional(bool) enumeration = optional(list) references = optional(list) # ---------------------------------------------------------------- Required name = requires(str) types = requires(list)
class PermissionResource(Context): ''' The permission context. ''' # ---------------------------------------------------------------- Optional values = optional(dict) putHeaders = optional(dict) navigate = optional(str) # ---------------------------------------------------------------- Required method = requires(int) path = requires(Path) invoker = requires(Invoker) filters = requires(list)
class DefineEncoder(Context): ''' The create encoder context. ''' # ---------------------------------------------------------------- Defined encoder = defines(ITransfrom, doc=''' @rtype: ITransfrom The encoder to be used for rendering objects. ''') # ---------------------------------------------------------------- Optional name = optional(str) specifiers = optional(list) # ---------------------------------------------------------------- Required objType = requires(Type)
class Solicit(Context): ''' The solicit context. ''' # ---------------------------------------------------------------- Defined gateways = defines(Iterable, doc=''' @rtype: Iterable(Gateway) The ACL gateways. ''') # ---------------------------------------------------------------- Optional rootURI = optional(str) replacements = optional(dict) # ---------------------------------------------------------------- Required permissions = requires(Iterable)
class Register(Context): ''' The register context. ''' # ---------------------------------------------------------------- Defined invokers = defines(list, doc=''' @rtype: list[Context] The invokers created based on the services. ''') validations = definesIf(dict, doc=''' @rtype: dictionary{TypeService: list[object, object]} The validations indexed by the service type. As a value a list that provides on the first position the binded validation target and on the second the binded target ''') doCopyInvoker = defines(IDo, doc=''' @rtype: callable(destination:Context, source:Context, exclude:set=None) -> Context On the first position the destination invoker to copy to and on the second position the source to copy from, returns the destination invoker. Accepts also a named argument containing a set of attributes names to exclude. ''') # ---------------------------------------------------------------- Optional exclude = optional(set) # ---------------------------------------------------------------- Required services = requires(Iterable)
class Request(Context): ''' The request context. ''' # ---------------------------------------------------------------- Required uri = requires(str) # ---------------------------------------------------------------- Optional argumentsOfType = optional(dict) # ---------------------------------------------------------------- Defined extension = defines(str, doc=''' @rtype: string The extension of the requested URI. ''') path = defines(Path, doc=''' @rtype: Path The path to the resource node. ''') converterId = defines(Converter, doc=''' @rtype: Converter The converter to use for model id's. ''') normalizerParameters = defines(Normalizer, doc=''' @rtype: Normalizer The normalizer to use for decoding parameters names. ''') converterParameters = defines(Converter, doc=''' @rtype: Converter The converter to use for the parameters values. ''')
class Solicitation(Context): ''' The solicitation context. ''' # ---------------------------------------------------------------- Optional encoderPath = optional(IEncoderPath) # ---------------------------------------------------------------- Required permissions = requires(Iterable)
class ResponseContentEncode(Context): ''' The response content context. ''' # ---------------------------------------------------------------- Required type = requires(str) # ---------------------------------------------------------------- Optional charSet = optional(str)
class Definition(Context): ''' The definition context. ''' # ---------------------------------------------------------------- Optional references = optional(list) # ---------------------------------------------------------------- Required name = requires(str)
class RequestContent(RequestContentData): ''' The request content context. ''' # ---------------------------------------------------------------- Required source = requires(IInputStream) # ---------------------------------------------------------------- Optional fetchNextContent = optional(Callable)
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional parent = optional(Context) # ---------------------------------------------------------------- Required input = requires(Input) doDecode = requires(IDo)
class RequestContent(Context): ''' The request content context. ''' # ---------------------------------------------------------------- Optional doFetchNextContent = optional(IDo) # ---------------------------------------------------------------- Required type = requires(str) charSet = requires(str)
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional isMandatory = optional(bool) # ---------------------------------------------------------------- Required type = requires(Type) doDecode = requires(IDo)
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional parent = optional(Context) # ---------------------------------------------------------------- Required input = requires(Input) property = requires(TypeProperty)
class Permission(Context): ''' The permission context. ''' # ---------------------------------------------------------------- Optional navigate = optional(str) # ---------------------------------------------------------------- Required access = requires(Access) filters = requires(dict)
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional parent = optional(Context) # ---------------------------------------------------------------- Required contentDefinitions = requires(dict) doDecode = requires(IDo)
class Invoker(Context): ''' The invoker context. ''' # ---------------------------------------------------------------- Optional filterInjected = optional(dict) # ---------------------------------------------------------------- Required path = requires(list) filterName = requires(str) location = requires(str)
class HeadersRequire(Context): ''' Context for required headers. ''' # ---------------------------------------------------------------- Required headers = optional(dict, doc=''' @rtype: dictionary{string, string} The raw headers. ''')
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Optional parent = optional(Context) # ---------------------------------------------------------------- Required parameterDefinition = requires(Context) doDecode = requires(IDo) doDefault = requires(IDo)
class RequestContentHTTPAsyncore(RequestContentHTTP): ''' The request content context. ''' # ---------------------------------------------------------------- Optional contentReader = optional(Callable, doc=''' @rtype: Callable The content reader callable used for pushing data from the asyncore read. Once the reader is finalized it will return a chain that is used for further request processing. ''')
class RequestDecode(Context): ''' The request context. ''' # ---------------------------------------------------------------- Required decoderHeader = requires(IDecoderHeader) # ---------------------------------------------------------------- Optional argumentsOfType = optional(dict) accLanguages = optional(list) language = optional(str) # ---------------------------------------------------------------- Defined normalizer = defines(Normalizer, doc=''' @rtype: Normalizer The normalizer to use for decoding request content. ''') converter = defines(Converter, doc=''' @rtype: Converter The converter to use for decoding request content. ''')
class Response(Context): ''' The response context. ''' # ---------------------------------------------------------------- Optional text = optional(str) errorMessage = optional(str, doc=''' @rtype: object The error message for the code. ''') errorDetails = optional(Object, doc=''' @rtype: Object The error text object describing a detailed situation for the error. ''') # ---------------------------------------------------------------- Required status = requires(int) code = requires(str) isSuccess = requires(bool) renderFactory = requires(Callable)
class Response(Context): ''' The response context. ''' # ---------------------------------------------------------------- Optional indexerFactory = optional(Callable) # ---------------------------------------------------------------- Required renderFactory = requires(Callable) obj = requires(object) isSuccess = requires(bool)
class RequestContentDecode(Context): ''' The request content context. ''' # ---------------------------------------------------------------- Optional source = optional(IInputStream) # ---------------------------------------------------------------- Defined length = defines(int, doc=''' @rtype: integer The content source length in bytes. ''')