Table of Contents

Interface IAreaService

Namespace
Dynamicweb.Content
Assembly
Dynamicweb.dll
The IAreaService interface defines operations for working with the Area Aggregate
[Obsolete("Use AreaService instead.")]
public interface IAreaService

Methods

CanDeleteArea(Area)

Returns a value indicating if the specified area can be deleted.
bool CanDeleteArea(Area area)

Parameters

area Area
The area for which to determine if it can be deleted.

Returns

bool
True if the area can be deleted, otherwise false.

Remarks

If the Area is a master area (The primary version of a website in contrast to language versions of the same website), and it has language versions. The area cannot be deleted until the language versions has been deleted. If it is not a master area, the area can be deleted.

CopyArea(CopyAreaInfo)

Creates a copy and persists it as specified in the CopyAreaInfo instance
ApplicationResponse<Area> CopyArea(CopyAreaInfo copyAreaInfo)

Parameters

copyAreaInfo CopyAreaInfo
Indicating what and how to perform the actual copy

Returns

ApplicationResponse<Area>
A response indicating the success or failure of the operation

DeleteArea(int)

Deletes the area with the specified id
ApplicationResponse DeleteArea(int areaId)

Parameters

areaId int
The id of the area to delete

Returns

ApplicationResponse

GetArea(int)

Gets the area with the specified id
Area GetArea(int id)

Parameters

id int
The id of the area to get

Returns

Area
The area with the specified id if it exists, otherwise Nothing

GetAreas()

Gets all areas default sorted by their Name property
IList<Area> GetAreas()

Returns

IList<Area>
A list of areas sorted by their name property

GetAreas(AreaSort)

Gets all areas sorted by the indicated property
IList<Area> GetAreas(AreaSort sortBy)

Parameters

sortBy AreaSort
Indicates what property of the Area the resulting list of areas should be sorted by

Returns

IList<Area>
A list sorted by the indicated property

GetAreasByDomain(string)

Get all areas that have an associated domain as specified
IList<Area> GetAreasByDomain(string domain)

Parameters

domain string
The domain for which all associated areas should be returned

Returns

IList<Area>
A list of areas associated with a given domain

GetAreasByDomain(string, bool)

Get all areas that have an associated domain as specified
IList<Area> GetAreasByDomain(string domain, bool onlyLocked)

Parameters

domain string
The domain for which all associated areas should be returned
onlyLocked bool
If true only areas with pages locked to the specified domain will be returned

Returns

IList<Area>
A list of areas associated with a given domain

GetLanguageAreas(int)

Gets all language areas
IList<Area> GetLanguageAreas(int masterAreaId)

Parameters

masterAreaId int
The id of the master area

Returns

IList<Area>
A list of language areas for the given master area id

GetMasterArea(Area)

Gets the master area for the specified area
Area GetMasterArea(Area area)

Parameters

area Area
The area for which to get it's master area

Returns

Area
The master area of the specified area

GetMasterArea(int)

Gets the master area for the area with the specified id
Area GetMasterArea(int areaId)

Parameters

areaId int
The id of the area for which to get its master area

Returns

Area
The master area for the area with the specified id

GetMasterAreas()

Gets all master areas
IList<Area> GetMasterAreas()

Returns

IList<Area>
A list of all areas but language areas

GetNewSortValue(int)

Get the next available sort value for an area associated with the specified master area
int GetNewSortValue(int masterAreaId)

Parameters

masterAreaId int
The id of the master area

Returns

int
An integer representing the next available sort value

SaveArea(Area)

Saves the specified area
Area SaveArea(Area area)

Parameters

area Area
The area to save

Returns

Area
The newly saved area
To top