Package org.cyclos.impl.messaging
Class AlertServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.messaging.AlertServiceImpl
-
- All Implemented Interfaces:
AlertServiceLocal,AlertService,Service
@Service public class AlertServiceImpl extends BaseServiceImpl implements AlertServiceLocal
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description AlertServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegercountSystemAlerts(Date since)Counts system alerts generated since the given time.IntegercountUserAlerts(Date since)Count every user alert generated since the given time.SystemAlertcreate(Network network, SystemAlertType type, Object... arguments)Creates a new system alert in the given networkUserAlertcreate(User user, UserAlertType type, Object... arguments)Creates a new user alertSystemAlertcreate(SystemAlertType type, Object... arguments)Creates a new system alert in the current networkSystemAlertSearchDatagetSystemSearchData()Returns data for searching the system alerts historyUserAlertSearchDatagetUserSearchData()Returns data for searching the user alerts historyprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkObject[]resolveArguments(Alert alert)Returns the resolved values for each argument.Page<SystemAlertVO>searchSystem(SystemAlertQuery params)Searches for system alerts historyPage<UserAlertVO>searchUser(UserAlertQuery params)Searches for user alerts history-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
countSystemAlerts
public Integer countSystemAlerts(Date since)
Description copied from interface:AlertServiceLocalCounts system alerts generated since the given time. Iftimeis null, all events are counted. Only non-removed (active) alerts are considered.- Specified by:
countSystemAlertsin interfaceAlertServiceLocal
-
countUserAlerts
public Integer countUserAlerts(Date since)
Description copied from interface:AlertServiceLocalCount every user alert generated since the given time. Iftimeis null, all events are counted. Only non-removed (active) alerts are considered.- Specified by:
countUserAlertsin interfaceAlertServiceLocal
-
create
public SystemAlert create(Network network, SystemAlertType type, Object... arguments) throws FrameworkException
Description copied from interface:AlertServiceLocalCreates a new system alert in the given network- Specified by:
createin interfaceAlertServiceLocal- Throws:
FrameworkException
-
create
public SystemAlert create(SystemAlertType type, Object... arguments)
Description copied from interface:AlertServiceLocalCreates a new system alert in the current network- Specified by:
createin interfaceAlertServiceLocal
-
create
public UserAlert create(User user, UserAlertType type, Object... arguments)
Description copied from interface:AlertServiceLocalCreates a new user alert- Specified by:
createin interfaceAlertServiceLocal
-
getSystemSearchData
public SystemAlertSearchData getSystemSearchData() throws FrameworkException
Description copied from interface:AlertServiceReturns data for searching the system alerts history- Specified by:
getSystemSearchDatain interfaceAlertService- Throws:
FrameworkException
-
getUserSearchData
public UserAlertSearchData getUserSearchData() throws FrameworkException
Description copied from interface:AlertServiceReturns data for searching the user alerts history- Specified by:
getUserSearchDatain interfaceAlertService- Throws:
FrameworkException
-
resolveArguments
public Object[] resolveArguments(Alert alert)
Description copied from interface:AlertServiceLocalReturns the resolved values for each argument. The result are the arguments to be passed to the message.- Specified by:
resolveArgumentsin interfaceAlertServiceLocal
-
searchSystem
public Page<SystemAlertVO> searchSystem(SystemAlertQuery params)
Description copied from interface:AlertServiceSearches for system alerts history- Specified by:
searchSystemin interfaceAlertService
-
searchUser
public Page<UserAlertVO> searchUser(UserAlertQuery params)
Description copied from interface:AlertServiceSearches for user alerts history- Specified by:
searchUserin interfaceAlertService
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
-