public class GetCommonMetadataSetAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
protected ContentTypesHelper |
_contentTypesHelper
The content types Helper
|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type EP
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver
|
manager
EMPTY_MAP
Constructor and Description |
---|
GetCommonMetadataSetAction() |
Modifier and Type | Method and Description |
---|---|
private Map<String,Map<String,Object>> |
_metadataSetIntersection(Map<String,Map<String,Object>> commonMetadataSetsInfo,
List<Map<String,Object>> metadataSetsInfo) |
private List<Map<String,Object>> |
_metadataSetUnion(Set<String> cTypes,
boolean includeInternal) |
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
protected Set<String> |
getAllAvailablesContentTypes(Request request,
boolean publicOnly)
Get all the available content types
|
protected Collection<Map<String,Object>> |
getCommonMetadataSetsInfo(Map<String,Set<String>> cTypesByContent,
Collection<String> cTypeIds,
boolean isEdition,
boolean includeInternal)
Retrieves the common metadata labels by name
|
protected Set<String> |
getContentTypes(Request request)
Get the content types id to search for
|
protected Map<String,Set<String>> |
getContentTypesFromContents(Request request)
Get the content types id to search for (by content id)
|
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected ContentTypeExtensionPoint _cTypeEP
protected ContentTypesHelper _contentTypesHelper
protected AmetysObjectResolver _resolver
public GetCommonMetadataSetAction()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
protected Collection<Map<String,Object>> getCommonMetadataSetsInfo(Map<String,Set<String>> cTypesByContent, Collection<String> cTypeIds, boolean isEdition, boolean includeInternal)
cTypesByContent
- the content type ids by contentcTypeIds
- the content type ids (not coming from contents)isEdition
- Is the metadata set for edition ?includeInternal
- include internal metadata sets ?private List<Map<String,Object>> _metadataSetUnion(Set<String> cTypes, boolean includeInternal)
private Map<String,Map<String,Object>> _metadataSetIntersection(Map<String,Map<String,Object>> commonMetadataSetsInfo, List<Map<String,Object>> metadataSetsInfo)
protected Set<String> getContentTypes(Request request)
request
- the requestprotected Map<String,Set<String>> getContentTypesFromContents(Request request)
request
- the requestprotected Set<String> getAllAvailablesContentTypes(Request request, boolean publicOnly)
request
- the requestpublicOnly
- Only the non private content types will be returned