C# Class BExIS.Web.Shell.Areas.SAM.Controllers.TenantsController

Inheritance: Controller
Exibir arquivo Open project: BEXIS2/Core

Public Methods

Method Description
Activate ( string id ) : System.Web.Mvc.ActionResult

If the tenat is not active, activates it and returns to the list action with updated information reports any problem, otherwise

Create ( ) : System.Web.Mvc.ActionResult

Should accept a tenant package in a zip form (or a handle to it), check its validity, check for duplication, etc and install it as a new tenant if not exist, othwerise as an update to the exisiting one.

Details ( string id ) : System.Web.Mvc.ActionResult

Shows the deatils of the chosen tenant. Indicates if it is: default, active, and current

Download ( string id ) : System.Web.Mvc.ActionResult

Creates a zip downloadable of the specified tenant and pushes it to the client The zip file has the predefined folder/file structure

Edit ( string id ) : System.Web.Mvc.ActionResult
Inactivate ( string id ) : System.Web.Mvc.ActionResult

If the tenat is active, inactivates it and returns to the list action with updated information reports any problem, otherwise

There MUST at least one active tenant remain in the list after this operation.

Index ( ) : System.Web.Mvc.ActionResult

List all the registered tenants with thier status, etc.

The one that is currently serving, should be highlighted.

MakeDefault ( string id ) : System.Web.Mvc.ActionResult
Unregister ( string id ) : System.Web.Mvc.ActionResult

If the tenat is inactive and is not default, deletes it and returns to the list action with updated information reports any problem, otherwise

1. It is not allowed to delete an ACTIVE tenant. If needed, the chosen tenant must be inctivated first. 2. It is not allowed to delete the DEFAULT tenant. If needed, another tenant must be set as the default, before deleting the chosen one. 3.There MUST at least one active tenant remaining in the list after this operation.

Private Methods

Method Description
Create ( TenantCreateModel model ) : System.Web.Mvc.ActionResult
Delete ( string id ) : void
Edit ( TenantEditModel model ) : System.Web.Mvc.ActionResult
IsDeletable ( string id ) : bool
Tenants_Select ( ) : System.Web.Mvc.ActionResult

Method Details

Activate() public method

If the tenat is not active, activates it and returns to the list action with updated information reports any problem, otherwise
public Activate ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult

Create() public method

Should accept a tenant package in a zip form (or a handle to it), check its validity, check for duplication, etc and install it as a new tenant if not exist, othwerise as an update to the exisiting one.
public Create ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

Details() public method

Shows the deatils of the chosen tenant. Indicates if it is: default, active, and current
public Details ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult

Download() public method

Creates a zip downloadable of the specified tenant and pushes it to the client The zip file has the predefined folder/file structure
public Download ( string id ) : System.Web.Mvc.ActionResult
id string The ID of the tenat its branding package is requested
return System.Web.Mvc.ActionResult

Edit() public method

public Edit ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult

Inactivate() public method

If the tenat is active, inactivates it and returns to the list action with updated information reports any problem, otherwise
There MUST at least one active tenant remain in the list after this operation.
public Inactivate ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult

Index() public method

List all the registered tenants with thier status, etc.
The one that is currently serving, should be highlighted.
public Index ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

MakeDefault() public method

public MakeDefault ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult

Unregister() public method

If the tenat is inactive and is not default, deletes it and returns to the list action with updated information reports any problem, otherwise
1. It is not allowed to delete an ACTIVE tenant. If needed, the chosen tenant must be inctivated first. 2. It is not allowed to delete the DEFAULT tenant. If needed, another tenant must be set as the default, before deleting the chosen one. 3.There MUST at least one active tenant remaining in the list after this operation.
public Unregister ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult