Package org.cyclos.security.system
Class CustomScriptServiceSecurity
- 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<CustomScriptDTO,CustomScript,CustomScriptData,ScriptType>
-
- org.cyclos.security.system.CustomScriptServiceSecurity
-
- All Implemented Interfaces:
CRUDService<CustomScriptDTO,CustomScriptData,ScriptType>,CRUDWithConfirmationPasswordService<CustomScriptDTO,CustomScriptData,ScriptType>,Service,CustomScriptService
@Security public class CustomScriptServiceSecurity extends ConfigurationEntityCRUDServiceSecurity<CustomScriptDTO,CustomScript,CustomScriptData,ScriptType> implements CustomScriptService
Security layer forCustomScript
-
-
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
-
-
Constructor Summary
Constructors Constructor Description CustomScriptServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreateNew(ScriptType type)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notprotected booleandoHasManageAccess(CustomScript entity)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(CustomScript entity)Should be implemented in order to return whether the caller is allowed to view the given entity.SerializableInputStreamgetCodeForDebug(CustomScriptVO script)Returns a ZIP file containing the code for debugging the given scriptprotected CRUDServiceLocal<CustomScript,CustomScriptDTO,CustomScriptData,ScriptType>getImplementation()Should be implemented in order to return the actual implementation of the serviceRunScriptDatagetRunData()Returns data to run arbitrary scriptsScriptResultrun(RunScriptParams params)Runs an arbitrary script, returning the resultPage<CustomScriptVO>search(CustomScriptQuery params)Lists all available custom scripts-
Methods inherited from class org.cyclos.security.ConfigurationEntityCRUDServiceSecurity
isAccessible
-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, onBeforeSave, 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
-
doHasViewAccess
public boolean doHasViewAccess(CustomScript 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<CustomScriptDTO,CustomScript,CustomScriptData,ScriptType>
-
getCodeForDebug
public SerializableInputStream getCodeForDebug(CustomScriptVO script) throws FrameworkException
Description copied from interface:CustomScriptServiceReturns a ZIP file containing the code for debugging the given script- Specified by:
getCodeForDebugin interfaceCustomScriptService- Throws:
FrameworkException
-
getRunData
public RunScriptData getRunData() throws FrameworkException
Description copied from interface:CustomScriptServiceReturns data to run arbitrary scripts- Specified by:
getRunDatain interfaceCustomScriptService- Throws:
FrameworkException
-
run
public ScriptResult run(RunScriptParams params) throws FrameworkException
Description copied from interface:CustomScriptServiceRuns an arbitrary script, returning the result- Specified by:
runin interfaceCustomScriptService- Throws:
FrameworkException
-
search
public Page<CustomScriptVO> search(CustomScriptQuery params) throws FrameworkException
Description copied from interface:CustomScriptServiceLists all available custom scripts- Specified by:
searchin interfaceCustomScriptService- Throws:
FrameworkException
-
checkCreateNew
protected void checkCreateNew(ScriptType type)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<CustomScriptDTO,CustomScript,CustomScriptData,ScriptType>
-
doHasManageAccess
protected boolean doHasManageAccess(CustomScript 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<CustomScriptDTO,CustomScript,CustomScriptData,ScriptType>
-
getImplementation
protected CRUDServiceLocal<CustomScript,CustomScriptDTO,CustomScriptData,ScriptType> getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<CustomScriptDTO,CustomScript,CustomScriptData,ScriptType>
-
-