Class EntityCatalogServiceImpl

java.lang.Object
fr.becpg.repo.entity.catalog.EntityCatalogServiceImpl
All Implemented Interfaces:
EntityCatalogService

@Service("entityCatalogService") public class EntityCatalogServiceImpl extends Object implements EntityCatalogService

EntityCatalogService class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • logger

      public static final org.apache.commons.logging.Log logger
      Constant logger
    • namespaceService

      @Autowired private org.alfresco.service.namespace.NamespaceService namespaceService
    • nodeService

      @Autowired private org.alfresco.service.cmr.repository.NodeService nodeService
    • beCPGCacheService

      @Autowired private BeCPGCacheService beCPGCacheService
    • fileFolderService

      @Autowired private org.alfresco.service.cmr.model.FileFolderService fileFolderService
    • contentService

      @Autowired private org.alfresco.service.cmr.repository.ContentService contentService
    • repository

      @Autowired private org.alfresco.repo.model.Repository repository
    • dictionaryService

      @Autowired private EntityDictionaryService dictionaryService
    • mlNodeService

      @Autowired @Qualifier("mlAwareNodeService") private org.alfresco.service.cmr.repository.NodeService mlNodeService
    • associationService

      @Autowired private AssociationService associationService
    • expressionService

      @Autowired private ExpressionService expressionService
    • alfrescoRepository

      @Autowired private AlfrescoRepository<RepositoryEntity> alfrescoRepository
    • observers

      @Autowired private EntityCatalogObserver[] observers
    • policyBehaviourFilter

      @Autowired private org.alfresco.repo.policy.BehaviourFilter policyBehaviourFilter
  • Constructor Details

    • EntityCatalogServiceImpl

      public EntityCatalogServiceImpl()
  • Method Details

    • getCatalogsDef

      private List<org.json.JSONArray> getCatalogsDef()

      getCatalogsDef.

      Returns:
      a List object.
    • getCatalogFolderNodeRef

      private org.alfresco.service.cmr.repository.NodeRef getCatalogFolderNodeRef()
    • updateAuditedField

      public void updateAuditedField(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, Set<org.alfresco.service.namespace.QName> diffQnames, Set<org.alfresco.service.cmr.repository.NodeRef> listNodeRefs)

      updateAuditedField.

      updateAuditedField.

      Specified by:
      updateAuditedField in interface EntityCatalogService
      Parameters:
      entityNodeRef - a NodeRef object
      diffQnames - a Set object
      listNodeRefs - a Set object
    • checkHasChange

      private org.alfresco.service.namespace.QName checkHasChange(Set<org.alfresco.service.namespace.QName> auditedFields, Set<org.alfresco.service.namespace.QName> diffQnames, Set<org.alfresco.service.cmr.repository.NodeRef> listNodeRefs)
    • isMatchFilter

      private boolean isMatchFilter(org.json.JSONObject catalog, org.alfresco.service.cmr.repository.NodeRef entityNodeRef) throws org.json.JSONException
      Throws:
      org.json.JSONException
    • isMatchFilter

      private boolean isMatchFilter(String catalogId, org.json.JSONObject catalog, RepositoryEntity entity) throws org.json.JSONException
      Throws:
      org.json.JSONException
    • testCondition

      private boolean testCondition(String condition, RepositoryEntity entity)
    • isMatchEntityType

      public boolean isMatchEntityType(org.json.JSONObject catalog, org.alfresco.service.namespace.QName productType, org.alfresco.service.namespace.NamespaceService namespaceService) throws org.json.JSONException

      isMatchEntityType.

      Parameters:
      catalog - a JSONObject object.
      productType - a QName object.
      namespaceService - a NamespaceService object.
      Returns:
      a boolean.
      Throws:
      org.json.JSONException - if any.
    • getLocales

      public Set<String> getLocales(List<String> reportLocales, org.json.JSONObject catalog) throws org.json.JSONException

      getLocales.

      Parameters:
      reportLocales - a List object.
      catalog - a JSONObject object.
      Returns:
      a Set object.
      Throws:
      org.json.JSONException - if any.
    • getAuditedFields

      public Set<org.alfresco.service.namespace.QName> getAuditedFields(org.json.JSONObject catalog, org.alfresco.service.namespace.NamespaceService namespaceService) throws org.json.JSONException

      getAuditedFields.

      Parameters:
      catalog - a JSONObject object.
      namespaceService - a NamespaceService object.
      Returns:
      a Set object.
      Throws:
      org.json.JSONException - if any.
    • formulateCatalogs

      public org.json.JSONArray formulateCatalogs(RepositoryEntity formulatedEntity, List<String> locales) throws org.json.JSONException

      formulateCatalogs.

      formulateCatalogs.

      Specified by:
      formulateCatalogs in interface EntityCatalogService
      Parameters:
      formulatedEntity - a RepositoryEntity object
      locales - a List object
      Returns:
      a JSONArray object
      Throws:
      org.json.JSONException - if any.
    • formulateCatalog

      public org.json.JSONArray formulateCatalog(String catalogId, org.alfresco.service.cmr.repository.NodeRef entityNodeRef, List<String> locales) throws org.json.JSONException

      formulateCatalog.

      Specified by:
      formulateCatalog in interface EntityCatalogService
      Parameters:
      catalogId - a String object
      entityNodeRef - a NodeRef object
      locales - a List object
      Returns:
      a JSONArray object
      Throws:
      org.json.JSONException - if any.
    • formulateCatalog

      public org.json.JSONArray formulateCatalog(String catalogId, RepositoryEntity formulatedEntity, List<String> locales) throws org.json.JSONException

      formulateCatalog.

      Throws:
      org.json.JSONException
    • extractNonUniqueFields

      private org.json.JSONArray extractNonUniqueFields(org.alfresco.service.namespace.QName entityType, org.alfresco.service.cmr.repository.NodeRef entityNodeRef, org.json.JSONArray uniqueFields, org.json.JSONObject i18nMessages) throws org.json.JSONException
      Throws:
      org.json.JSONException
    • toJsonArray

      private org.json.JSONArray toJsonArray(List<org.alfresco.service.cmr.repository.NodeRef> propDuplicates)
    • getPropertyDuplicates

      private List<org.alfresco.service.cmr.repository.NodeRef> getPropertyDuplicates(org.alfresco.service.cmr.repository.NodeRef productNodeRef, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.namespace.QName propQName, String value)
    • extractMissingFields

      private org.json.JSONArray extractMissingFields(RepositoryEntity formulatedEntity, org.alfresco.service.namespace.QName entityType, Map<org.alfresco.service.namespace.QName,Serializable> properties, org.json.JSONArray reqFields, org.json.JSONObject i18nMessages, String lang, boolean isFirstLang) throws org.json.JSONException
      Throws:
      org.json.JSONException
    • mlTextIsPresent

      private boolean mlTextIsPresent(org.alfresco.service.namespace.QName fieldQname, org.alfresco.service.cmr.repository.NodeRef entityNodeRef, String lang, String curLang, Map<org.alfresco.service.namespace.QName,Serializable> properties)
    • getFieldDisplayName

      private String getFieldDisplayName(org.alfresco.service.namespace.QName nodeType, org.alfresco.service.cmr.dictionary.ClassAttributeDefinition classDef, String messageKey)

      getFieldDisplayName.

      Parameters:
      classDef - a ClassAttributeDefinition object.
      messageKey - a String object.
      Returns:
      a String object.
    • formatQnameString

      private org.alfresco.service.cmr.dictionary.ClassAttributeDefinition formatQnameString(String qNameString)