Class ContentTypeStateComponent
- java.lang.Object
-
- org.ametys.plugins.contenttypeseditor.edition.ContentTypeStateComponent
-
- All Implemented Interfaces:
Component
,Serviceable
public class ContentTypeStateComponent extends Object implements Component, Serviceable
This component allow to know state of content type in the content type editor tool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContentTypeStateComponent.ContentTypeState
States of a content type
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint
_contentTypeExtensionPoint
The content type extension point instanceprivate Set<String>
_contentTypesMarkedAsEdited
Edit content typesprivate Set<String>
_contentTypesMarkedAsNew
New content typesprivate Set<String>
_contentTypesMarkedAsSaved
Save content typesstatic String
ROLE
The Avalon role name
-
Constructor Summary
Constructors Constructor Description ContentTypeStateComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getContentTypeMarkedAsNew()
Get the new content type which are local of applicationString
getStateContentType(String id)
Get the state of content type according to its idvoid
markContentTypeAsEdited(String id, boolean isNew)
Add a content type id to the list of edit content typesvoid
markContentTypeAsSaved(String id)
Add a content type id to the list of saved content typesvoid
removeContentTypeMarkedAsEdited(String id)
Remove content type from edit listvoid
service(ServiceManager manager)
-
-
-
Field Detail
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
The content type extension point instance
-
_contentTypesMarkedAsNew
private Set<String> _contentTypesMarkedAsNew
New content types
-
_contentTypesMarkedAsSaved
private Set<String> _contentTypesMarkedAsSaved
Save content types
-
_contentTypesMarkedAsEdited
private Set<String> _contentTypesMarkedAsEdited
Edit content types
-
-
Constructor Detail
-
ContentTypeStateComponent
public ContentTypeStateComponent()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getStateContentType
public String getStateContentType(String id)
Get the state of content type according to its id- Parameters:
id
- The id of content type- Returns:
- the state of content type
-
markContentTypeAsSaved
public void markContentTypeAsSaved(String id)
Add a content type id to the list of saved content types- Parameters:
id
- The id of content type
-
markContentTypeAsEdited
public void markContentTypeAsEdited(String id, boolean isNew)
Add a content type id to the list of edit content types- Parameters:
id
- The id of content typeisNew
- True if the content type is new
-
removeContentTypeMarkedAsEdited
public void removeContentTypeMarkedAsEdited(String id)
Remove content type from edit list- Parameters:
id
- The id of content type
-
getContentTypeMarkedAsNew
public Set<String> getContentTypeMarkedAsNew()
Get the new content type which are local of application- Returns:
- The new content type
-
-