C# 클래스 N2.Integrity.IntegrityManager

상속: IIntegrityManager
파일 보기 프로젝트 열기: Earthware/n2cms 1 사용 예제들

공개 메소드들

메소드 설명
CanCopy ( ContentItem source, ContentItem destination ) : bool

Check if an item can be copied to a destination.

CanDelete ( ContentItem item ) : bool

Check the current state of an item to see if it ca be deleted.

CanMove ( ContentItem source, ContentItem destination ) : bool

Check if an item can be moved to a destination.

CanSave ( ContentItem item ) : bool

Check the current state of an item to see if it ca be saved.

GetCopyException ( ContentItem source, ContentItem destination ) : Exception

Check if an item can be copied.

GetCreateException ( ContentItem item, ContentItem parent ) : Exception

Check if an item can be created.

GetDeleteException ( ContentItem item ) : Exception

Check if an item can be deleted.

GetMoveException ( ContentItem source, ContentItem destination ) : Exception

Checks if an item can be moved to a destination.

GetSaveException ( ContentItem item ) : Exception

Check if an item can be saved.

IntegrityManager ( Definitions definitions, IItemFinder finder, Web urlParser ) : System

Creates a new instance of the IntegrityManager.

IsDestinationBelowSource ( ContentItem source, ContentItem destination ) : bool

Checks that the destination isn't below the source.

IsLocallyUnique ( string name, ContentItem item ) : bool

Find out if an item name is occupied.

IsNameOccupiedOnDestination ( ContentItem source, ContentItem destination, bool excludeMyself = true ) : bool

Checks that destination have no child item with the same name.

IsTypeAllowedBelowDestination ( ContentItem source, ContentItem destination ) : bool

Check that the source item type is allowed below the destination. Throws an exception if the item isn't allowed.

비공개 메소드들

메소드 설명
GetItemsWithSameName ( string name, ContentItem parentItem ) : IEnumerable

메소드 상세

CanCopy() 공개 메소드

Check if an item can be copied to a destination.
public CanCopy ( ContentItem source, ContentItem destination ) : bool
source ContentItem The item to copy.
destination ContentItem The destination below which the item should be copied to.
리턴 bool

CanDelete() 공개 메소드

Check the current state of an item to see if it ca be deleted.
public CanDelete ( ContentItem item ) : bool
item ContentItem The item that should be deleted.
리턴 bool

CanMove() 공개 메소드

Check if an item can be moved to a destination.
public CanMove ( ContentItem source, ContentItem destination ) : bool
source ContentItem The item to move.
destination ContentItem The destination below which the item should be moved to.
리턴 bool

CanSave() 공개 메소드

Check the current state of an item to see if it ca be saved.
public CanSave ( ContentItem item ) : bool
item ContentItem The item that should be saved.
리턴 bool

GetCopyException() 공개 메소드

Check if an item can be copied.
public GetCopyException ( ContentItem source, ContentItem destination ) : Exception
source ContentItem
destination ContentItem
리턴 Exception

GetCreateException() 공개 메소드

Check if an item can be created.
public GetCreateException ( ContentItem item, ContentItem parent ) : Exception
item ContentItem
parent ContentItem
리턴 Exception

GetDeleteException() 공개 메소드

Check if an item can be deleted.
public GetDeleteException ( ContentItem item ) : Exception
item ContentItem
리턴 Exception

GetMoveException() 공개 메소드

Checks if an item can be moved to a destination.
public GetMoveException ( ContentItem source, ContentItem destination ) : Exception
source ContentItem The item that is to be moved.
destination ContentItem The destination onto which the item is to be moved.
리턴 Exception

GetSaveException() 공개 메소드

Check if an item can be saved.
public GetSaveException ( ContentItem item ) : Exception
item ContentItem
리턴 Exception

IntegrityManager() 공개 메소드

Creates a new instance of the IntegrityManager.
public IntegrityManager ( Definitions definitions, IItemFinder finder, Web urlParser ) : System
definitions Definitions The definition manager.
finder IItemFinder
urlParser Web
리턴 System

IsDestinationBelowSource() 공개 메소드

Checks that the destination isn't below the source.
public IsDestinationBelowSource ( ContentItem source, ContentItem destination ) : bool
source ContentItem
destination ContentItem
리턴 bool

IsLocallyUnique() 공개 메소드

Find out if an item name is occupied.
public IsLocallyUnique ( string name, ContentItem item ) : bool
name string The name to check.
item ContentItem The item whose siblings (other items with the same parent) might be have a clashing name.
리턴 bool

IsNameOccupiedOnDestination() 공개 메소드

Checks that destination have no child item with the same name.
public IsNameOccupiedOnDestination ( ContentItem source, ContentItem destination, bool excludeMyself = true ) : bool
source ContentItem
destination ContentItem
excludeMyself bool
리턴 bool

IsTypeAllowedBelowDestination() 공개 메소드

Check that the source item type is allowed below the destination. Throws an exception if the item isn't allowed.
public IsTypeAllowedBelowDestination ( ContentItem source, ContentItem destination ) : bool
source ContentItem The child item
destination ContentItem The parent item
리턴 bool