Package org.cyclos.impl
Class AbstractServerComponent
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- Direct Known Subclasses:
AbstractGlobalServerComponent,AbstractNetworkedServerComponent
public abstract class AbstractServerComponent extends Object
Common class from which all services and handlers implementations will extend
-
-
Field Summary
Fields Modifier and Type Field Description protected AccountHandleraccountHandlerprotected ConfigurationHandlerconfigurationHandlerprotected DataTranslationHandlerdataTranslationHandlerprotected NotificationHandlernotificationHandlerprotected ProfileFieldHandlerprofileFieldHandlerprotected TransactionHandlertransactionHandlerprotected TranslationHandlertranslationHandler
-
Constructor Summary
Constructors Constructor Description AbstractServerComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <E> EdataTranslationProxy(E input)Returns a proxy for data translation for the given object, if it is an instance ofProcessableForDataTranslation.protected com.querydsl.jpa.impl.JPADeleteClausedelete(com.querydsl.core.types.EntityPath<?> entity)protected voiddetach(IEntity entity)protected <E extends IEntity>
Efind(Class<E> entityClass, Long id)protected voidflush()protected DBQuery<?>from(com.querydsl.core.types.EntityPath<?>... from)protected ApplicationContextgetApplicationContext()protected abstract BaseEntityManagerHandlergetBaseEntityManagerHandler()protected FormatterImplgetFormatter()protected FormatterImplgetFormatter(BasicUser user)protected FormatterImplgetFormatter(ConfigurationAccessor configuration)protected org.apache.logging.log4j.LoggergetLogger()Returns a logger for this beanprotected StringgetRemoteAddress()protected SessionDatagetSessionData()protected MailContentProducer.MailContentBuildermailContentBuilder()protected Stringmessage(Language language, MessageKey key, Object... arguments)protected Stringmessage(MessageFormat messageFormat, Language language, MessageKey key, Object... arguments)protected voidpersist(IEntity entity)protected <T> longprocessBatch(Iterable<T> iterable, Consumer<T> closure)SeeQueryHelper#processBatch(CloseableIterator, Consumer, BaseEntityManagerHandler)protected <T> longprocessBatch(Iterator<T> iterator, Consumer<T> closure)SeeQueryHelper#processBatch(CloseableIterator, Consumer, BaseEntityManagerHandler)protected voidrefresh(IEntity entity)protected voidremove(IEntity entity)protected <E extends SimpleEntity>
DBQuery<E>selectFrom(com.querydsl.core.types.EntityPath<E> from)protected DBQuery<?>subQuery(com.querydsl.core.types.EntityPath<?>... from)protected com.querydsl.jpa.impl.JPAUpdateClauseupdate(com.querydsl.core.types.EntityPath<?> entity)
-
-
-
Field Detail
-
transactionHandler
@Autowired @Lazy protected TransactionHandler transactionHandler
-
translationHandler
@Autowired @Lazy protected TranslationHandler translationHandler
-
dataTranslationHandler
@Autowired @Lazy protected DataTranslationHandler dataTranslationHandler
-
configurationHandler
@Autowired @Lazy protected ConfigurationHandler configurationHandler
-
accountHandler
@Autowired @Lazy protected AccountHandler accountHandler
-
notificationHandler
@Autowired @Lazy protected NotificationHandler notificationHandler
-
profileFieldHandler
@Autowired @Lazy protected ProfileFieldHandler profileFieldHandler
-
-
Method Detail
-
dataTranslationProxy
protected <E> E dataTranslationProxy(E input)
Returns a proxy for data translation for the given object, if it is an instance ofProcessableForDataTranslation. Also handles collections, maps and iterators. If neither of those, returns the input as is.
-
delete
protected com.querydsl.jpa.impl.JPADeleteClause delete(com.querydsl.core.types.EntityPath<?> entity)
-
detach
protected void detach(IEntity entity)
- See Also:
BaseEntityManagerHandler.detach(IEntity)
-
find
protected <E extends IEntity> E find(Class<E> entityClass, Long id) throws EntityNotFoundException
- Throws:
EntityNotFoundException- See Also:
BaseEntityManagerHandler.find(Class, Long)
-
flush
protected void flush()
- See Also:
BaseEntityManagerHandler.flush()
-
from
protected DBQuery<?> from(com.querydsl.core.types.EntityPath<?>... from)
-
getApplicationContext
protected ApplicationContext getApplicationContext()
-
getBaseEntityManagerHandler
protected abstract BaseEntityManagerHandler getBaseEntityManagerHandler()
-
getFormatter
protected FormatterImpl getFormatter()
-
getFormatter
protected FormatterImpl getFormatter(BasicUser user)
-
getFormatter
protected FormatterImpl getFormatter(ConfigurationAccessor configuration)
-
getLogger
protected org.apache.logging.log4j.Logger getLogger()
Returns a logger for this bean
-
getRemoteAddress
protected String getRemoteAddress()
-
getSessionData
protected SessionData getSessionData()
-
mailContentBuilder
protected MailContentProducer.MailContentBuilder mailContentBuilder()
-
message
protected String message(Language language, MessageKey key, Object... arguments)
-
message
protected String message(MessageFormat messageFormat, Language language, MessageKey key, Object... arguments)
-
persist
protected void persist(IEntity entity)
-
processBatch
protected <T> long processBatch(Iterable<T> iterable, Consumer<T> closure)
SeeQueryHelper#processBatch(CloseableIterator, Consumer, BaseEntityManagerHandler)
-
processBatch
protected <T> long processBatch(Iterator<T> iterator, Consumer<T> closure)
SeeQueryHelper#processBatch(CloseableIterator, Consumer, BaseEntityManagerHandler)
-
refresh
protected void refresh(IEntity entity)
-
remove
protected void remove(IEntity entity)
- See Also:
BaseEntityManagerHandler.remove(IEntity)
-
selectFrom
protected <E extends SimpleEntity> DBQuery<E> selectFrom(com.querydsl.core.types.EntityPath<E> from)
-
subQuery
protected DBQuery<?> subQuery(com.querydsl.core.types.EntityPath<?>... from)
-
update
protected com.querydsl.jpa.impl.JPAUpdateClause update(com.querydsl.core.types.EntityPath<?> entity)
-
-