@Security public class PinServiceSecurity extends BaseServiceSecurity implements PinService
PinService| Constructor and Description |
|---|
PinServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(BasicUser user,
UserPinsData data) |
UserPinsData |
getData(UserLocatorVO locator)
Returns data regarding pins for the given user (null resolves to the logged user).
|
PinData |
getEditData(PinLocatorVO locator)
Returns data for editing a pin.
|
PasswordInputDTO |
getPasswordInputForCreate()
Return the password input required to create a pin for the logged user.
|
java.util.List<PinVO> |
list(UserLocatorVO locator)
Returns the list of device pins for the given user (null resolves to the logged user).
|
PinDetailedVO |
locate(PinLocatorVO locator)
Locates a device pin, either by id or principal.
|
void |
remove(PinLocatorVO locator,
CurrentCredentialsForPinManage currentCredentials)
Removes the given pin.
|
protected org.cyclos.impl.access.EntityCheck<?> |
resolveEntityCheck()
Must be implemented in order to return the
EntityCheck managed by this security component, or null if
none |
void |
save(PinDTO dto)
Updates a given device pin for the logged user.
|
CreatePinDTO |
set(SetPinParams params)
Creates a new pin or modify an existing for the logged user and associates it to the current principal type and
password type.
|
ValidationResult |
validate(@NotNull java.lang.String value)
Validates a value to be used as a pin for the logged user and the current channel.
|
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initializecanManage, 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, toDate, toDateTime, validatedelete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, updatepublic void apply(BasicUser user, UserPinsData data)
public UserPinsData getData(UserLocatorVO locator) throws FrameworkException
PinServicegetData in interface PinServiceFrameworkExceptionpublic PinData getEditData(PinLocatorVO locator) throws FrameworkException
PinServicegetEditData in interface PinServicelocator - Optional if authenticated with a pin. Otherwise it must not be null.FrameworkExceptionpublic PasswordInputDTO getPasswordInputForCreate() throws FrameworkException
PinServicegetPasswordInputForCreate in interface PinServiceFrameworkExceptionpublic java.util.List<PinVO> list(UserLocatorVO locator) throws FrameworkException
PinServicePermission.USER_PINS_VIEW permission.list in interface PinServiceFrameworkExceptionpublic PinDetailedVO locate(PinLocatorVO locator)
PinServicePermission.USER_PINS_VIEW permission must be grantedlocate in interface PinServicelocator - Optional if authenticated with a pin. Otherwise it must not be null.public void remove(PinLocatorVO locator, CurrentCredentialsForPinManage currentCredentials) throws FrameworkException
PinServicePermission.USER_PINS_MANAGE permission must be
granted. For the pin owner the action must be confirmed with the current login password for the current channel
or the current pin.
Only one of these is mandatory to be given.remove in interface PinServicelocator - Optional if authenticated with a pin. Otherwise it must not be null.FrameworkExceptionpublic void save(PinDTO dto) throws FrameworkException
PinServiceValidationExceptionsave in interface PinServiceFrameworkExceptionpublic CreatePinDTO set(SetPinParams params) throws FrameworkException
PinServiceset in interface PinServiceFrameworkExceptionpublic ValidationResult validate(@NotNull @NotNull java.lang.String value) throws FrameworkException
PinServicevalidate in interface PinServiceFrameworkExceptionprotected org.cyclos.impl.access.EntityCheck<?> resolveEntityCheck()
BaseServiceSecurityEntityCheck managed by this security component, or null if
noneresolveEntityCheck in class BaseServiceSecurity