Class AreaService
- Namespace
- Dynamicweb.Content
- Assembly
- Dynamicweb.dll
Provides methods for querying and persisting areas.
- Inheritance
-
Area
Service
- Implements
- Inherited Members
Methods
CanDeleteArea(Area)
Returns a value indicating if the specified area can be deleted.
Parameters
area
AreaThe 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.
ClearCache()
Resets all keys to the default value for objects stored in the object cache
ClearCache(IEnumerable<int>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<int>Keys to reset
ClearCache(int)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
intKey to reset
ClearTrashBin(int)
Deletes the area with the specified id form trashbin
Parameters
areaId
intThe id of the area to delete
CopyArea(CopyAreaInfo)
Parameters
copyAreaInfo
CopyArea Info
Returns
DeleteArea(int)
Deletes the area with the specified id
Parameters
areaId
intThe id of the area to delete
Returns
GetArea(int)
Gets the area with the specified id
Parameters
id
intThe 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
Returns
GetAreas(AreaSort)
Gets all areas sorted by the indicated property
Parameters
sortBy
AreaSort Indicates what property of the Area the resulting list of areas should be sorted by
Returns
GetAreasByDomain(string)
Get all areas that have an associated domain as specified
Parameters
domain
stringThe domain for which all associated areas should be returned
Returns
GetAreasByDomain(string, bool)
Get all areas that have an associated domain as specified
Parameters
domain
stringThe domain for which all associated areas should be returned
onlyLocked
boolIf true only areas with pages locked to the specified domain will be returned
Returns
GetDeletedAreas()
Gets the collection of deleted areas
Returns
- IEnumerable<Area>
A collection of rows
GetLanguageAreas(int)
Parameters
masterAreaId
int
Returns
GetMasterArea(Area)
Gets the master area for the specified area
Parameters
area
AreaThe 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
Parameters
areaId
intThe id of the area for which to get its master area
Returns
- Area
The master area for the area with the specified id
GetMasterAreas()
Returns
GetNewSortValue(int)
Get the next available sort value for an area associated with the specified master area
Parameters
masterAreaId
intThe id of the master area
Returns
- int
An integer representing the next available sort value
RestoreArea(int)
Restore the area with the specified id
Parameters
areaId
intThe id of the area to restore
Exceptions
SaveArea(Area)
Saves the specified area
Parameters
area
AreaThe area to save
Returns
- Area
The newly saved area