Click or drag to resize

PFApplicationRestHandler Class

Provides methods to handle requests of three types:

-Extended actions made to the item module. URLs follow this format: "RestItem/APPLICATION_NAME/CONTENTTYPE_NAME/ITEM_ID/ACTION_NAME/PARAMETER_1/PARAMETER_2/..."

-Actions not centered on a specific entity. URLs follow this format: "RestCustomAction/APPLICATION_NAME/ACTION_NAME/PARAMETER_1/PARAMETER_2/..."

-Requests made on a custom (not Packflow) resource. URLs follow this format: "RestCustomResource/APPLICATION_NAME/RESOURCE_NAME/PARAMETER_1/PARAMETER_2/..."

Posted values are available using a dedicated method.

This class is inherited in all applications for customization.

Inheritance Hierarchy

Namespace:  Packflow.Rest
Assembly:  MicaSystems.Packflow.Interface (in MicaSystems.Packflow.Interface.dll) Version: 1.0.0.0 (2.0.0.223)
Syntax
C#
public abstract class PFApplicationRestHandler

The PFApplicationRestHandler type exposes the following members.

Constructors
  NameDescription
Protected methodPFApplicationRestHandler
Top
Properties
  NameDescription
Public propertyApplication
Gets the Packflow application.
Public propertyCustomHttpMethod
Gets the HTTP method text. Only filled if the used Http method is not listed by the RestHttpMethod enum.
Public propertyHttpMethod
Gets the HTTP method.
Public propertyRequest
Gets the request.
Public propertyRequestExpectsCamelCaseJson
Gets a (request parameter) value indicating if the returned JSON should follow camel case. Default value: false. Query string parameter name: "camelCase".
Public propertyRequestExpectsIgnoredNullValues
Gets a (request parameter) value indicating if the returned JSON should ignore null values. Default value: true. Query string parameter name: "ignoreNullValues".
Public propertyRequestExpectsPrettyJson
Gets a (request parameter) value indicating if the returned JSON should be indented. Default value: false. Query string parameter name: "pretty".
Public propertyResponse
Gets the response.
Top
Methods
  NameDescription
Protected methodGetPostedValue
Gets a posted parameter value.
Protected methodGetRequestBody
Gets the request body.
Protected methodGetSerializerSettings
Gets the serializer settings for JsonConvert (NewtonSoft).
Public methodHandleCustomActionRequest
Handles Rest requests for custom actions with an URL following the format

"RestCustomAction/APPLICATION_NAME/ACTION_NAME/PARAMETER_1/PARAMETER_2/..."

Public methodHandleCustomResourceRequest
Handles Rest requests for custom resources with an URL following the format

"RestCustomResource/APPLICATION_NAME/RESOURCE_NAME/PARAMETER_1/PARAMETER_2/..."

Public methodHandleItemCustomRequest
Handles Rest requests for custom actions on an item with an URL following the format

"RestItem/APPLICATION_NAME/CONTENTTYPE_NAME/ITEM_ID/ACTION_NAME/PARAMETER_1/PARAMETER_2/..."

Protected methodSerializeResult
Serializes an object (using JSON) to be returned in the response. Respects request parameters.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodAsT
Casts an object to another type. Returns default(T) if the object is null.
(Defined by Utils_Other.)
Public Extension MethodEqualsAll
Checks that this object is equal to every object in parameters.
(Defined by Utils_Other.)
Public Extension MethodEqualsAny
Checks that this object is equal to at least one of the parameters.
(Defined by Utils_Other.)
Public Extension MethodGetString
Converts an object to String using ToString() method, else returns String.Empty.
(Defined by Utils_Other.)
Public Extension MethodIsGenericListOverloaded.
Checks if this object is a System.Collections.Generic.List.
(Defined by Utils_Linq.)
Public Extension MethodIsGenericList(Type)Overloaded.
Checks if this object is a System.Collections.Generic.List using type as T.
(Defined by Utils_Linq.)
Public Extension MethodSerializeOverloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerialize(String)Overloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerializeJsonOverloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(ListType)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(DataContractJsonSerializerSettings)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Top
See Also