
org.summerb.approaches.jdbccrud.api.EasyCrudPerRowAuthStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of summerb Show documentation
Show all versions of summerb Show documentation
summerb - is a set of building blocks for real-world java-based web apps
package org.summerb.approaches.jdbccrud.api;
import org.summerb.approaches.security.api.exceptions.NotAuthorizedException;
/**
* Strategy for authorizing operations on per-row basis.
*
* Normally injected into {@link EasyCrudService} via {@link EasyCrudWireTap},
* but also can be used separately.
*
* In case you do not need that detailed authorization rows you can use
* {@link EasyCrudTableAuthStrategy}
*
* @author sergey.karpushin
*
*/
public interface EasyCrudPerRowAuthStrategy {
void assertAuthorizedToCreate(TDto dto) throws NotAuthorizedException;
void assertAuthorizedToUpdate(TDto existingVersion, TDto newVersion) throws NotAuthorizedException;
void assertAuthorizedToRead(TDto dto) throws NotAuthorizedException;
void assertAuthorizedToDelete(TDto dto) throws NotAuthorizedException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy