Package org.cyclos.security.system
Class NetworkServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<DTO,E,D,DP>
-
- org.cyclos.security.ConfigurationEntityCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
- org.cyclos.security.system.NetworkServiceSecurity
-
- All Implemented Interfaces:
CRUDService<NetworkDTO,NetworkData,Void>,CRUDWithConfirmationPasswordService<NetworkDTO,NetworkData,Void>,Service,NetworkService
@Security public class NetworkServiceSecurity extends ConfigurationEntityCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void> implements NetworkService
-
-
Field Summary
-
Fields inherited from class org.cyclos.security.CRUDServiceSecurity
entityClass
-
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
-
Fields inherited from interface org.cyclos.services.system.NetworkService
GLOBAL_INTERNAL_NAME
-
-
Constructor Summary
Constructors Constructor Description NetworkServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreateNew(Void params)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notLongcreateWithData(NetworkDTO network, NetworkInitialDataDTO data)Creates a new network with initial dataprotected voidcustomizeData(NetworkData data)Can be overridden in order to process the returned data object for the given entityprotected booleandoHasManageAccess(Network entity)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(Network entity)Should be implemented in order to return whether the caller is allowed to view the given entity.NetworkWithInitialDataDatagetDataForNewWithData()Returns data for creating a new network with initial dataprotected NetworkServiceLocalgetImplementation()Should be implemented in order to return the actual implementation of the serviceNetworkInitialDataDTOgetInitialData(BasicNetworkInitialDataDTO basicData)Returns an initial data pre-populated with fields according to the given initial selectionsNetworkSearchDatagetSearchData()Returns data for searching networksprotected voidonBeforeSave(NetworkDTO dto, Network entity)StringresolveNetworkUrl(NetworkVO networkVO)Returns the URL a global admin can use to access the given networkPage<NetworkVO>search(NetworkQuery query)Searches for networks according to the given criteria-
Methods inherited from class org.cyclos.security.ConfigurationEntityCRUDServiceSecurity
isAccessible
-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPassword
-
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
-
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
-
-
-
-
Method Detail
-
createWithData
public Long createWithData(NetworkDTO network, NetworkInitialDataDTO data) throws FrameworkException
Description copied from interface:NetworkServiceCreates a new network with initial data- Specified by:
createWithDatain interfaceNetworkService- Throws:
FrameworkException
-
doHasViewAccess
public boolean doHasViewAccess(Network entity)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to view the given entity.- Specified by:
doHasViewAccessin classCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
getDataForNewWithData
public NetworkWithInitialDataData getDataForNewWithData() throws FrameworkException
Description copied from interface:NetworkServiceReturns data for creating a new network with initial data- Specified by:
getDataForNewWithDatain interfaceNetworkService- Throws:
FrameworkException
-
getInitialData
public NetworkInitialDataDTO getInitialData(BasicNetworkInitialDataDTO basicData) throws FrameworkException
Description copied from interface:NetworkServiceReturns an initial data pre-populated with fields according to the given initial selections- Specified by:
getInitialDatain interfaceNetworkService- Throws:
FrameworkException
-
getSearchData
public NetworkSearchData getSearchData()
Description copied from interface:NetworkServiceReturns data for searching networks- Specified by:
getSearchDatain interfaceNetworkService
-
resolveNetworkUrl
public String resolveNetworkUrl(NetworkVO networkVO) throws FrameworkException
Description copied from interface:NetworkServiceReturns the URL a global admin can use to access the given network- Specified by:
resolveNetworkUrlin interfaceNetworkService- Throws:
FrameworkException
-
search
public Page<NetworkVO> search(NetworkQuery query)
Description copied from interface:NetworkServiceSearches for networks according to the given criteria- Specified by:
searchin interfaceNetworkService
-
checkCreateNew
protected void checkCreateNew(Void params)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
customizeData
protected void customizeData(NetworkData data)
Description copied from class:CRUDServiceSecurityCan be overridden in order to process the returned data object for the given entity- Overrides:
customizeDatain classCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
doHasManageAccess
protected boolean doHasManageAccess(Network entity)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to manage the given entity, for the given operation- Specified by:
doHasManageAccessin classCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
getImplementation
protected NetworkServiceLocal getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
onBeforeSave
protected void onBeforeSave(NetworkDTO dto, Network entity)
- Overrides:
onBeforeSavein classCRUDServiceSecurity<NetworkDTO,Network,NetworkData,Void>
-
-