Class DefaultContentTypeAvailablilityService
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class DefaultContentTypeAvailablilityService : ContentTypeAvailabilityService
Constructors
DefaultContentTypeAvailablilityService(ServiceAccessor<IContentTypeRepository>, IAvailableModelSettingsRepository, IAvailableSettingsRepository, GroupDefinitionRepository, IContentLoader, ISynchronizedObjectInstanceCache)
Initializes a new instance of the Default
Declaration
public DefaultContentTypeAvailablilityService(ServiceAccessor<IContentTypeRepository> contentTypeRepositoryAccessor, IAvailableModelSettingsRepository modelRepository, IAvailableSettingsRepository typeSettingsRepository, GroupDefinitionRepository groupDefinitionRepository, IContentLoader contentLoader, ISynchronizedObjectInstanceCache cache)
Parameters
Type | Name | Description |
---|---|---|
Service |
contentTypeRepositoryAccessor | The content type repository accessor. |
IAvailable |
modelRepository | The model repository. |
IAvailable |
typeSettingsRepository | The type settings repository. |
Group |
groupDefinitionRepository | The group definition repository |
IContent |
contentLoader | The contentloader |
ISynchronized |
cache | The cache dependency |
Methods
GetSetting(String)
Gets the current settings for available content types for a ContentcontentTypeName
.
Declaration
public override AvailableSetting GetSetting(string contentTypeName)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentTypeName | Name of the content type. |
Returns
Type | Description |
---|---|
Available |
Overrides
IsAllowed(String, String)
Determines whether a IContent of the ContentType named childContentTypeName
is allowed to be created under a Content of
the ContentType named parentContentTypeName
.
Declaration
public override bool IsAllowed(string parentContentTypeName, string childContentTypeName)
Parameters
Type | Name | Description |
---|---|---|
System. |
parentContentTypeName | The name of the parent ContentType. |
System. |
childContentTypeName | The name of child ContentType. |
Returns
Type | Description |
---|---|
System. |
|
Overrides
ListAvailable(IContent, Boolean, IPrincipal)
Lists all available Contentcontent
.
Declaration
public override IList<ContentType> ListAvailable(IContent content, bool contentFolder, IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
System. |
contentFolder | If true then list all available Content |
System. |
user |
Returns
Type | Description |
---|---|
System. |
Overrides
Remarks
The list is filtered due to the user
, IContent
ListAvailable(String, IPrincipal)
Lists all available ContentcontentTypeName
.
Declaration
public override IList<ContentType> ListAvailable(string contentTypeName, IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentTypeName | |
System. |
user |
Returns
Type | Description |
---|---|
System. |
Overrides
Remarks
The list is filtered due to the user
, IContent