Package org.cyclos.security.users
Class BrokeringServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.users.BrokeringServiceSecurity
-
- All Implemented Interfaces:
Service,BrokeringService
@Security public class BrokeringServiceSecurity extends BaseServiceSecurity implements BrokeringService
Security forBrokeringService
-
-
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 BrokeringServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongaddBroker(UserLocatorVO userLocator, UserLocatorVO brokerLocator, boolean mainBroker)Adds a broker for the given user, optionally setting the broker as mainAddBrokerDatagetAddBrokerData(UserLocatorVO locator)Returns data for adding a broker to the given userBrokeringWithUserVOgetByUserAndBroker(@NotNull UserLocatorVO userLocator, @NotNull UserLocatorVO brokerLocator)Returns details of a brokering relation by user and broker, only if the broker is currently the user's brokerBrokeringDatagetData(UserLocatorVO userLocator)Returns data for a user brokeringsvoidremoveBroker(UserLocatorVO userLocator, UserLocatorVO brokerLocator)Removes the given broker from the user brokeringsprotected EntityCheck<?>resolveEntityCheck()Must be implemented in order to return theEntityCheckmanaged by this security component, or null if nonevoidsetMainBroker(UserLocatorVO userLocator, UserLocatorVO brokerLocator)Assigns the given brokering as main-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
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
-
addBroker
public Long addBroker(UserLocatorVO userLocator, UserLocatorVO brokerLocator, boolean mainBroker) throws FrameworkException, IllegalActionException
Description copied from interface:BrokeringServiceAdds a broker for the given user, optionally setting the broker as main- Specified by:
addBrokerin interfaceBrokeringService- Throws:
IllegalActionException- When the given broker is either inactive or is not a brokerFrameworkException
-
getAddBrokerData
public AddBrokerData getAddBrokerData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:BrokeringServiceReturns data for adding a broker to the given user- Specified by:
getAddBrokerDatain interfaceBrokeringService- Throws:
FrameworkException
-
getByUserAndBroker
public BrokeringWithUserVO getByUserAndBroker(@NotNull @NotNull UserLocatorVO userLocator, @NotNull @NotNull UserLocatorVO brokerLocator) throws FrameworkException
Description copied from interface:BrokeringServiceReturns details of a brokering relation by user and broker, only if the broker is currently the user's broker- Specified by:
getByUserAndBrokerin interfaceBrokeringService- Throws:
FrameworkException
-
getData
public BrokeringData getData(UserLocatorVO userLocator) throws FrameworkException
Description copied from interface:BrokeringServiceReturns data for a user brokerings- Specified by:
getDatain interfaceBrokeringService- Throws:
FrameworkException
-
removeBroker
public void removeBroker(UserLocatorVO userLocator, UserLocatorVO brokerLocator) throws IllegalActionException
Description copied from interface:BrokeringServiceRemoves the given broker from the user brokerings- Specified by:
removeBrokerin interfaceBrokeringService- Throws:
IllegalActionException- When the given broker is not a broker of the given user
-
setMainBroker
public void setMainBroker(UserLocatorVO userLocator, UserLocatorVO brokerLocator) throws FrameworkException, IllegalActionException
Description copied from interface:BrokeringServiceAssigns the given brokering as main- Specified by:
setMainBrokerin interfaceBrokeringService- Throws:
IllegalActionException- When the given broker is not a broker of the given userFrameworkException
-
resolveEntityCheck
protected EntityCheck<?> resolveEntityCheck()
Description copied from class:BaseServiceSecurityMust be implemented in order to return theEntityCheckmanaged by this security component, or null if none- Specified by:
resolveEntityCheckin classBaseServiceSecurity
-
-