Package org.cyclos.impl.users
Class GeneralReferenceServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<E,A,DTO,D,DP>
-
- org.cyclos.impl.users.BaseReferenceServiceImpl<GeneralReference,QGeneralReference,GeneralReferenceDTO,GeneralReferenceEntryVO,GeneralReferenceQuery,GeneralReferenceData,GeneralReferenceDataParams>
-
- org.cyclos.impl.users.GeneralReferenceServiceImpl
-
- All Implemented Interfaces:
CRUDServiceLocal<GeneralReference,GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>,GeneralReferenceServiceLocal,CRUDService<GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>,CRUDWithConfirmationPasswordService<GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>,Service,GeneralReferenceService
@Service public class GeneralReferenceServiceImpl extends BaseReferenceServiceImpl<GeneralReference,QGeneralReference,GeneralReferenceDTO,GeneralReferenceEntryVO,GeneralReferenceQuery,GeneralReferenceData,GeneralReferenceDataParams> implements GeneralReferenceServiceLocal
implementation forGeneralReferenceService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.users.BaseReferenceServiceImpl
entryVoClass, r
-
Fields inherited from class org.cyclos.impl.CRUDServiceImpl
$, ATTR_CURRENT_COPY, cacheHandler, dtoClass, entityClass, extensionPointService, idPath, internalNamePath, namePath, ownerEntityIdPath, ownerEntityPath, ownerEntityPropertyName, passwordHandler, richTextHandler, withConfirmationPassword
-
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 GeneralReferenceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeneralReferenceget(User from, User to)Returns the reference from / to the given users, or throws anEntityNotFoundExceptionif none is foundprotected GeneralReferenceDatagetData(GeneralReference ref)Returns details data for the given entityGeneralReferenceSearchDatagetSearchData(UserLocatorVO locator)Returns data used for search general references over the given userbooleanhasReferences(User user)Returns if the user has given or received any referenceGeneralReferencenewEntity(GeneralReferenceDataParams params)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterRemove(GeneralReference reference)May be overridden in order to perform custom logic after removing an entityprotected voidonAfterSave(GeneralReference reference, GeneralReference currentCopy, Object dataFromOnBeforeSave)May be overridden in order to perform custom logic after saving an entityprotected ObjectonBeforeSave(GeneralReference entity, GeneralReference currentCopy)May be overridden in order to perform custom logic before saving an entity.protected QReferenceref()voidremoveAll(User user)Removes all references of the given user (both received and given), as well as the reference historyprotected ValidatorresolveValidator(GeneralReferenceDTO dto)-
Methods inherited from class org.cyclos.impl.users.BaseReferenceServiceImpl
countReceived, crateStatisticsQuery, createSearchQuery, getReferenceLevels, getStatistics, registerNetworkMappings, search, toSearchResultEntry
-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomInternalNameValidations, addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isEntityInternalNameRequired, isNameRequired, load, logEntity, onBeforeRemove, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, subClassMappings, toDTO, toEntity, validate
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.users.GeneralReferenceService
getStatistics, search
-
Methods inherited from interface org.cyclos.impl.users.GeneralReferenceServiceLocal
countReceived, getReferenceLevels
-
-
-
-
Method Detail
-
get
public GeneralReference get(User from, User to) throws FrameworkException
Description copied from interface:GeneralReferenceServiceLocalReturns the reference from / to the given users, or throws anEntityNotFoundExceptionif none is found- Specified by:
getin interfaceGeneralReferenceServiceLocal- Throws:
FrameworkException
-
getSearchData
public GeneralReferenceSearchData getSearchData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:GeneralReferenceServiceReturns data used for search general references over the given user- Specified by:
getSearchDatain interfaceGeneralReferenceService- Throws:
FrameworkException
-
hasReferences
public boolean hasReferences(User user) throws FrameworkException
Description copied from interface:GeneralReferenceServiceLocalReturns if the user has given or received any reference- Specified by:
hasReferencesin interfaceGeneralReferenceServiceLocal- Throws:
FrameworkException
-
newEntity
public GeneralReference newEntity(GeneralReferenceDataParams params)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<GeneralReference,GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>- Specified by:
newEntityin classCRUDServiceImpl<GeneralReference,QGeneralReference,GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>
-
removeAll
public void removeAll(User user)
Description copied from interface:GeneralReferenceServiceLocalRemoves all references of the given user (both received and given), as well as the reference history- Specified by:
removeAllin interfaceGeneralReferenceServiceLocal- Overrides:
removeAllin classBaseReferenceServiceImpl<GeneralReference,QGeneralReference,GeneralReferenceDTO,GeneralReferenceEntryVO,GeneralReferenceQuery,GeneralReferenceData,GeneralReferenceDataParams>
-
getData
protected GeneralReferenceData getData(GeneralReference ref) throws FrameworkException
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<GeneralReference,QGeneralReference,GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>- Throws:
FrameworkException
-
onAfterRemove
protected void onAfterRemove(GeneralReference reference)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after removing an entity
-
onAfterSave
protected void onAfterSave(GeneralReference reference, GeneralReference currentCopy, Object dataFromOnBeforeSave)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after saving an entity- Overrides:
onAfterSavein classCRUDServiceImpl<GeneralReference,QGeneralReference,GeneralReferenceDTO,GeneralReferenceData,GeneralReferenceDataParams>
-
onBeforeSave
protected Object onBeforeSave(GeneralReference entity, GeneralReference currentCopy)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before saving an entity. Any returned value will be passed to theCRUDServiceImpl.onAfterSave(BaseEntity, BaseEntity, Object)method
-
ref
protected QReference ref()
-
resolveValidator
protected Validator resolveValidator(GeneralReferenceDTO dto)
-
-