C# Class Phun.ContentConnector

Inheritance: IContentConnector
Mostrar archivo Open project: noogen/phuncms

Public Methods

Method Description
ContentConnector ( ) : System

Initializes a new instance of the ContentConnector class.

Create ( string path, string data, Uri uri ) : ContentModel

Create the file.

CreateOrUpdate ( string path, Uri uri, byte data ) : ContentModel

Creates the or update.

CreateOrUpdate ( string path, string data, Uri uri ) : ContentModel

Update the file.

Delete ( string path, Uri uri ) : ContentModel

Deletes the specified model.

GetTenantHost ( Uri url ) : string

Gets the current host.

List ( string path, Uri uri ) : IQueryable

Lists the specified path.

Normalize ( string path ) : string

Applies the path convention.

OnContentEvent ( ContentConnectorEventArgument e ) : void

Called when [content event].

OnContentEvent ( string eventName, ContentModel model ) : void

Called when [content event].

RenderPage ( System.Web.HttpContextBase httpContext ) : ContentModel

View content.

ResolvePath ( string path, string tenantHost, System.Web.HttpContextBase context ) : string

Resolves the path. Also allow for caching path resolution.

Retrieve ( string path, Uri uri ) : ContentModel

Retrieves the specified path.

Private Methods

Method Description
CheckPage ( string path, string tenantHost, string extension ) : string

Checks the page.

Method Details

ContentConnector() public method

Initializes a new instance of the ContentConnector class.
public ContentConnector ( ) : System
return System

Create() public method

Create the file.
500;Cannot create or overwrite an existing content of path: + path
public Create ( string path, string data, Uri uri ) : ContentModel
path string The path.
data string The data.
uri System.Uri The URI.
return Phun.Data.ContentModel

CreateOrUpdate() public method

Creates the or update.
Cannot update root path.;path
public CreateOrUpdate ( string path, Uri uri, byte data ) : ContentModel
path string The path.
uri System.Uri The URI.
data byte The data.
return Phun.Data.ContentModel

CreateOrUpdate() public method

Update the file.
public CreateOrUpdate ( string path, string data, Uri uri ) : ContentModel
path string The path.
data string The data.
uri System.Uri The URI.
return Phun.Data.ContentModel

Delete() public method

Deletes the specified model.
500;Unable to delete protected path '/'.
public Delete ( string path, Uri uri ) : ContentModel
path string The path.
uri System.Uri The URI.
return Phun.Data.ContentModel

GetTenantHost() public method

Gets the current host.
public GetTenantHost ( Uri url ) : string
url System.Uri The URL.
return string

List() public method

Lists the specified path.
public List ( string path, Uri uri ) : IQueryable
path string The path.
uri System.Uri The URI.
return IQueryable

Normalize() public method

Applies the path convention.
public Normalize ( string path ) : string
path string The path.
return string

OnContentEvent() public method

Called when [content event].
public OnContentEvent ( ContentConnectorEventArgument e ) : void
e ContentConnectorEventArgument The instance containing the event data.
return void

OnContentEvent() public method

Called when [content event].
public OnContentEvent ( string eventName, ContentModel model ) : void
eventName string Name of the event.
model Phun.Data.ContentModel The model.
return void

RenderPage() public method

View content.
public RenderPage ( System.Web.HttpContextBase httpContext ) : ContentModel
httpContext System.Web.HttpContextBase The HTTP context.
return Phun.Data.ContentModel

ResolvePath() public method

Resolves the path. Also allow for caching path resolution.
404;Failed on all attempt to search vash file for: + path
public ResolvePath ( string path, string tenantHost, System.Web.HttpContextBase context ) : string
path string The path.
tenantHost string The tenant host.
context System.Web.HttpContextBase The context.
return string

Retrieve() public method

Retrieves the specified path.
404;PhunCms path not found.
public Retrieve ( string path, Uri uri ) : ContentModel
path string The path.
uri System.Uri The URI.
return Phun.Data.ContentModel