Package com.axelor.dms.db.repo
Class DMSPermissionRepository
- java.lang.Object
-
- com.axelor.db.JpaRepository<DMSPermission>
-
- com.axelor.dms.db.repo.DMSPermissionRepository
-
- All Implemented Interfaces:
Repository<DMSPermission>
public class DMSPermissionRepository extends JpaRepository<DMSPermission>
-
-
Field Summary
-
Fields inherited from class com.axelor.db.JpaRepository
modelClass
-
-
Constructor Summary
Constructors Constructor Description DMSPermissionRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidremove(DMSPermission entity)Remove the given entity.DMSPermissionsave(DMSPermission entity)Save the given entity.Map<String,Object>validate(Map<String,Object> json, Map<String,Object> context)Checks that the current user is allowed to manage the permissions of the file the given permission belongs to.
-
-
-
Method Detail
-
validate
public Map<String,Object> validate(Map<String,Object> json, Map<String,Object> context)
Checks that the current user is allowed to manage the permissions of the file the given permission belongs to.- Specified by:
validatein interfaceRepository<DMSPermission>- Overrides:
validatein classJpaRepository<DMSPermission>- Parameters:
json- the permission values to validatecontext- the context- Returns:
- validated json map
- Throws:
org.apache.shiro.authz.UnauthorizedException- if the current user can't share the file
-
save
public DMSPermission save(DMSPermission entity)
Description copied from interface:RepositorySave the given entity.Depending on the implementation, it may return same entity or a copy of it. For example JPA implementation may return a copy if the given entity can't be managed.
- Specified by:
savein interfaceRepository<DMSPermission>- Overrides:
savein classJpaRepository<DMSPermission>- Parameters:
entity- the entity object to save- Returns:
- an instance of the entity with saved state
-
remove
public void remove(DMSPermission entity)
Description copied from interface:RepositoryRemove the given entity.- Specified by:
removein interfaceRepository<DMSPermission>- Overrides:
removein classJpaRepository<DMSPermission>- Parameters:
entity- the entity object
-
-