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 DefaultContentTypeAvailablilityService class.
Declaration
public DefaultContentTypeAvailablilityService(ServiceAccessor<IContentTypeRepository> contentTypeRepositoryAccessor, IAvailableModelSettingsRepository modelRepository, IAvailableSettingsRepository typeSettingsRepository, GroupDefinitionRepository groupDefinitionRepository, IContentLoader contentLoader, ISynchronizedObjectInstanceCache cache)
Parameters
Type | Name | Description |
---|---|---|
ServiceAccessor<IContentTypeRepository> | contentTypeRepositoryAccessor | The content type repository accessor. |
IAvailableModelSettingsRepository | modelRepository | The model repository. |
IAvailableSettingsRepository | typeSettingsRepository | The type settings repository. |
GroupDefinitionRepository | groupDefinitionRepository | The group definition repository |
IContentLoader | contentLoader | The contentloader |
ISynchronizedObjectInstanceCache | cache | The cache dependency |
Methods
GetSetting(String)
Gets the current settings for available content types for a ContentType given by name contentTypeName
.
Declaration
public override AvailableSetting GetSetting(string contentTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName | Name of the content type. |
Returns
Type | Description |
---|---|
AvailableSetting |
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.String | parentContentTypeName | The name of the parent ContentType. |
System.String | childContentTypeName | The name of child ContentType. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
ListAvailable(IContent, Boolean, IPrincipal)
Lists all available ContentType that can be created under a content instance of content content
.
Declaration
public override IList<ContentType> ListAvailable(IContent content, bool contentFolder, IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
System.Boolean | contentFolder | If true then list all available ContentType that can be created under ContentFolder otherwise list all avalible ContentType under content type of the content |
System.Security.Principal.IPrincipal | user |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ContentType> |
Overrides
Remarks
The list is filtered due to the user
, IContentSecurable and RequiredAccessAttribute on the GroupDefinitionsAttribute
ListAvailable(String, IPrincipal)
Lists all available ContentType that can be created under a content instance of type contentTypeName
.
Declaration
public override IList<ContentType> ListAvailable(string contentTypeName, IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeName | |
System.Security.Principal.IPrincipal | user |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<ContentType> |
Overrides
Remarks
The list is filtered due to the user
, IContentSecurable but not RequiredAccessAttribute on the GroupDefinitionsAttribute