Package fr.becpg.repo.notification.impl
Class NotificationRuleServiceImpl
java.lang.Object
fr.becpg.repo.notification.impl.NotificationRuleServiceImpl
- All Implemented Interfaces:
NotificationRuleService
@Service("notificationRuleService")
public class NotificationRuleServiceImpl
extends Object
implements NotificationRuleService
NotificationRuleServiceImpl class.
- Version:
- $Id: $Id
- Author:
- rabah
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributeExtractorServiceprivate org.alfresco.service.cmr.security.AuthorityServiceprivate BatchQueueServiceprivate static final Stringprivate EntityDictionaryServiceprivate static final Stringprivate static final Stringprivate org.alfresco.service.cmr.download.DownloadServiceprivate static final Stringprivate ExportSearchServiceprivate org.alfresco.service.cmr.model.FileFolderServiceprivate static final Stringprivate static final Stringprivate static final org.apache.commons.logging.Logprivate BeCPGMailServiceprivate org.alfresco.service.namespace.NamespaceServiceprivate static final Stringprivate static final Stringprivate org.alfresco.service.cmr.repository.NodeServiceprivate static final Stringprivate org.alfresco.service.cmr.security.PermissionServiceprivate org.alfresco.service.cmr.security.PersonServiceprivate ReportTplServiceprivate RepoServiceprivate org.alfresco.service.cmr.repository.ScriptServiceprivate SearchRuleServiceprivate org.alfresco.service.ServiceRegistryprivate static final Stringprivate org.alfresco.service.transaction.TransactionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildBaseModel(NotificationRuleListDataItem notification, Map<String, Object> templateArgs) buildEntities(List<org.alfresco.service.cmr.repository.NodeRef> items, NotificationRuleListDataItem notification) private SearchRuleFilterbuildSearchFilter(NotificationRuleListDataItem notification) buildTemplateArgs(NotificationRuleListDataItem notification, SearchRuleFilter filter) private Consumer<org.alfresco.service.cmr.repository.NodeRef>createMailSender(NotificationRuleListDataItem notification, Map<String, Object> templateArgs, Map<org.alfresco.service.cmr.repository.NodeRef, Object> entities, SearchRuleFilter searchFilter, SearchRuleResult searchResult) private booleanemailAdminNotificationDisabled(String username) private voidexecuteScript(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) private voidexecuteScriptAll(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) private voidexecuteScriptEach(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) private voidexecuteScriptIfExists(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) extractAuthoritiesFromGroup(org.alfresco.service.cmr.repository.NodeRef authority) private List<org.alfresco.service.cmr.repository.NodeRef>private voidinitializeNotification(NotificationRuleListDataItem notification) private booleanisAllowed(NotificationRuleListDataItem notification) private booleanisEmptyResult(NotificationRuleListDataItem notification, SearchRuleResult result, SearchRuleFilter filter) private voidlogNoObjects(NotificationRuleListDataItem notification, SearchRuleFilter filter) private voidprocessReportTemplates(NotificationRuleListDataItem notification, SearchRuleResult searchResult, Consumer<org.alfresco.service.cmr.repository.NodeRef> mailSender) private voidsendMail(NotificationRuleListDataItem notification, Map<String, Object> templateArgs, SearchRuleFilter searchFilter, SearchRuleResult searchResult, org.alfresco.service.cmr.repository.NodeRef downloadNode, String userName, List<Object> userEntities) voidsendNotifications.private booleanshouldSkip(NotificationRuleListDataItem notification) private org.alfresco.service.cmr.repository.NodeRefwaitAndSaveDownload(org.alfresco.service.cmr.repository.NodeRef downloadNode, NotificationRuleListDataItem notification, org.alfresco.service.cmr.repository.NodeRef exportFolder, org.alfresco.service.cmr.repository.NodeRef reportTpl)
-
Field Details
-
logger
private static final org.apache.commons.logging.Log logger -
DATE_FIELD
- See Also:
-
NODE_TYPE
- See Also:
-
NODE
- See Also:
-
ITEM
- See Also:
-
ITEMS
- See Also:
-
NOTIFICATION
- See Also:
-
TARGET_PATH
- See Also:
-
ENTITYV2_SUBTYPE
- See Also:
-
DISPLAY_PATH
- See Also:
-
DISPLAY_NAME
- See Also:
-
nodeService
@Autowired private org.alfresco.service.cmr.repository.NodeService nodeService -
mailService
-
serviceRegistry
@Autowired @Qualifier("ServiceRegistry") private org.alfresco.service.ServiceRegistry serviceRegistry -
namespaceService
@Autowired private org.alfresco.service.namespace.NamespaceService namespaceService -
authorityService
@Autowired private org.alfresco.service.cmr.security.AuthorityService authorityService -
permissionService
@Autowired private org.alfresco.service.cmr.security.PermissionService permissionService -
dictionaryService
-
searchRuleService
-
scriptService
@Autowired private org.alfresco.service.cmr.repository.ScriptService scriptService -
batchQueueService
-
alfrescoRepository
-
reportTplService
-
exportSearchService
-
downloadService
@Autowired private org.alfresco.service.cmr.download.DownloadService downloadService -
repoService
-
transactionService
@Autowired private org.alfresco.service.transaction.TransactionService transactionService -
fileFolderService
@Autowired private org.alfresco.service.cmr.model.FileFolderService fileFolderService -
personService
@Autowired private org.alfresco.service.cmr.security.PersonService personService -
attributeExtractorService
-
-
Constructor Details
-
NotificationRuleServiceImpl
public NotificationRuleServiceImpl()
-
-
Method Details
-
sendNotifications
public void sendNotifications()sendNotifications.
- Specified by:
sendNotificationsin interfaceNotificationRuleService
-
shouldSkip
-
initializeNotification
-
buildSearchFilter
-
isEmptyResult
private boolean isEmptyResult(NotificationRuleListDataItem notification, SearchRuleResult result, SearchRuleFilter filter) -
logNoObjects
-
buildTemplateArgs
private Map<String,Object> buildTemplateArgs(NotificationRuleListDataItem notification, SearchRuleFilter filter) -
buildEntities
private Map<org.alfresco.service.cmr.repository.NodeRef,Object> buildEntities(List<org.alfresco.service.cmr.repository.NodeRef> items, NotificationRuleListDataItem notification) -
createMailSender
private Consumer<org.alfresco.service.cmr.repository.NodeRef> createMailSender(NotificationRuleListDataItem notification, Map<String, Object> templateArgs, Map<org.alfresco.service.cmr.repository.NodeRef, Object> entities, SearchRuleFilter searchFilter, SearchRuleResult searchResult) -
sendMail
private void sendMail(NotificationRuleListDataItem notification, Map<String, Object> templateArgs, SearchRuleFilter searchFilter, SearchRuleResult searchResult, org.alfresco.service.cmr.repository.NodeRef downloadNode, String userName, List<Object> userEntities) -
processReportTemplates
private void processReportTemplates(NotificationRuleListDataItem notification, SearchRuleResult searchResult, Consumer<org.alfresco.service.cmr.repository.NodeRef> mailSender) -
waitAndSaveDownload
private org.alfresco.service.cmr.repository.NodeRef waitAndSaveDownload(org.alfresco.service.cmr.repository.NodeRef downloadNode, NotificationRuleListDataItem notification, org.alfresco.service.cmr.repository.NodeRef exportFolder, org.alfresco.service.cmr.repository.NodeRef reportTpl) throws InterruptedException - Throws:
InterruptedException
-
executeScriptIfExists
private void executeScriptIfExists(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) -
emailAdminNotificationDisabled
-
executeScript
private void executeScript(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) -
executeScriptEach
private void executeScriptEach(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) -
executeScriptAll
private void executeScriptAll(NotificationRuleListDataItem notification, List<org.alfresco.service.cmr.repository.NodeRef> items, Map<String, Object> templateArgs) -
buildBaseModel
-
extractAuthoritiesFromGroup
-
getAllNotificationRule
-
isAllowed
-