Commit e17d7588 authored by Matija Obreza's avatar Matija Obreza
Browse files

Added missing Javadoc

parent 87ca0951
...@@ -15,17 +15,13 @@ ...@@ -15,17 +15,13 @@
*/ */
package org.genesys.blocks.auditlog.test; package org.genesys.blocks.auditlog.test;
import java.util.Arrays;
import org.genesys.blocks.security.component.AclAssignerAspect; import org.genesys.blocks.security.component.AclAssignerAspect;
import org.genesys.blocks.security.service.CustomAclService; import org.genesys.blocks.security.service.CustomAclService;
import org.genesys.blocks.security.service.impl.CustomAclServiceImpl; import org.genesys.blocks.security.service.impl.CustomAclServiceImpl;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCache;
import org.springframework.cache.support.NoOpCacheManager; import org.springframework.cache.support.NoOpCacheManager;
import org.springframework.cache.support.SimpleCacheManager;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
......
...@@ -269,7 +269,7 @@ public abstract class SuperModelFilter<T extends SuperModelFilter<T, R>, R> { ...@@ -269,7 +269,7 @@ public abstract class SuperModelFilter<T extends SuperModelFilter<T, R>, R> {
* *
* @param <Q> any SuperModelFilter subtype * @param <Q> any SuperModelFilter subtype
* @param filter the filter * @param filter the filter
* @return * @return the normalized valid filter
*/ */
public static <Q extends SuperModelFilter<?, ?>> Q normalize(final Q filter) { public static <Q extends SuperModelFilter<?, ?>> Q normalize(final Q filter) {
Set<String> toClear = new HashSet<>(); Set<String> toClear = new HashSet<>();
...@@ -317,6 +317,7 @@ public abstract class SuperModelFilter<T extends SuperModelFilter<T, R>, R> { ...@@ -317,6 +317,7 @@ public abstract class SuperModelFilter<T extends SuperModelFilter<T, R>, R> {
return parsed; return parsed;
} }
@SuppressWarnings("unchecked")
@Override @Override
public JsonDeserializer<?> createContextual(DeserializationContext deserializationContext, BeanProperty beanProperty) throws JsonMappingException { public JsonDeserializer<?> createContextual(DeserializationContext deserializationContext, BeanProperty beanProperty) throws JsonMappingException {
final JavaType type; final JavaType type;
......
...@@ -37,6 +37,7 @@ public interface OAuthClientDetailsService extends ClientDetailsService { ...@@ -37,6 +37,7 @@ public interface OAuthClientDetailsService extends ClientDetailsService {
/** /**
* List client details. * List client details.
* *
* @param pageable the pageable
* @return page with Client details * @return page with Client details
*/ */
Page<OAuthClient> listClientDetails(Pageable pageable); Page<OAuthClient> listClientDetails(Pageable pageable);
......
...@@ -59,6 +59,13 @@ public class SecurityContextUtil { ...@@ -59,6 +59,13 @@ public class SecurityContextUtil {
return (permissionEvaluator = updateBean(PermissionEvaluator.class)) != null; return (permissionEvaluator = updateBean(PermissionEvaluator.class)) != null;
} }
/**
* Update bean.
*
* @param <T> the generic type
* @param clazz the clazz
* @return the t
*/
static final <T> T updateBean(Class<T> clazz) { static final <T> T updateBean(Class<T> clazz) {
ApplicationContext context = CurrentApplicationContext.getContext(); ApplicationContext context = CurrentApplicationContext.getContext();
if (context != null) { if (context != null) {
...@@ -175,11 +182,11 @@ public class SecurityContextUtil { ...@@ -175,11 +182,11 @@ public class SecurityContextUtil {
} }
/** /**
* Check if ROLE_EVERYONE has permission on target object * Check if ROLE_EVERYONE has permission on target object.
* *
* @param targetDomainObject * @param targetDomainObject the target domain object
* @param permission * @param permission the permission
* @return * @return true, if successful
*/ */
public static boolean anyoneHasPermission(Object targetDomainObject, Object permission) { public static boolean anyoneHasPermission(Object targetDomainObject, Object permission) {
if (permissionEvaluator == null) { if (permissionEvaluator == null) {
......
...@@ -455,9 +455,9 @@ public abstract class BasicUser<R extends GrantedAuthority> extends AclSid imple ...@@ -455,9 +455,9 @@ public abstract class BasicUser<R extends GrantedAuthority> extends AclSid imple
} }
/** /**
* Additional authorities * Set additional authorities at runtime.
* *
* @param authorities * @param authorities the new runtime authorities
*/ */
public void setRuntimeAuthorities(Set<String> authorities) { public void setRuntimeAuthorities(Set<String> authorities) {
this.runtimeAuthorities = authorities; this.runtimeAuthorities = authorities;
......
...@@ -70,7 +70,10 @@ public interface CustomAclService extends JsonSidConverter.SidProvider { ...@@ -70,7 +70,10 @@ public interface CustomAclService extends JsonSidConverter.SidProvider {
AclSid ensureAuthoritySid(String authority); AclSid ensureAuthoritySid(String authority);
/** /**
* Removes the sid of the specified authority * Removes the sid of the specified authority.
*
* @param authorityName the authority name
* @return the acl sid
*/ */
AclSid removeAuthoritySid(String authorityName); AclSid removeAuthoritySid(String authorityName);
...@@ -82,34 +85,36 @@ public interface CustomAclService extends JsonSidConverter.SidProvider { ...@@ -82,34 +85,36 @@ public interface CustomAclService extends JsonSidConverter.SidProvider {
List<AclSid> listAuthoritySids(); List<AclSid> listAuthoritySids();
/** /**
* Adds the creator permissions or updates permission inheritance * Adds the creator permissions or updates permission inheritance.
* *
* @param entity the target * @param entity the target
*/ */
void createOrUpdatePermissions(AclAwareModel entity); void createOrUpdatePermissions(AclAwareModel entity);
/** /**
* Updates inheriting status of object identity * Updates inheriting status of object identity.
* *
* @param objectIdIdentity the id of object identity * @param objectIdIdentity the id of object identity
* @param entriesInheriting the inheriting status * @param entriesInheriting the inheriting status
* @return the acl object identity
*/ */
AclObjectIdentity updateInheriting(long objectIdIdentity, boolean entriesInheriting); AclObjectIdentity updateInheriting(long objectIdIdentity, boolean entriesInheriting);
/** /**
* Updates parent object of object identity * Updates parent object of object identity.
* *
* @param objectIdIdentity the id of object identity * @param objectIdIdentity the id of object identity
* @param parentObjectId the id of parent object identity * @param parentObjectId the id of parent object identity
* @return the acl object identity
*/ */
AclObjectIdentity updateParentObject(long objectIdIdentity, long parentObjectId); AclObjectIdentity updateParentObject(long objectIdIdentity, long parentObjectId);
/** /**
* Set ACL parent object for inherited permissions * Set ACL parent object for inherited permissions.
* *
* @param target the target ACL object on which to change ACL * @param target the target ACL object on which to change ACL
* @param parent the parent ACL object * @param parent the parent ACL object
* @return * @return the acl object identity
*/ */
AclObjectIdentity setAclParent(AclAwareModel target, AclAwareModel parent); AclObjectIdentity setAclParent(AclAwareModel target, AclAwareModel parent);
...@@ -198,7 +203,7 @@ public interface CustomAclService extends JsonSidConverter.SidProvider { ...@@ -198,7 +203,7 @@ public interface CustomAclService extends JsonSidConverter.SidProvider {
AclObjectIdentity setPermissions(AclObjectIdentity objectIdentity, AclSid sid, final Permissions permissions); AclObjectIdentity setPermissions(AclObjectIdentity objectIdentity, AclSid sid, final Permissions permissions);
/** /**
* Removes the permissions for SID on ACL OID * Removes the permissions for SID on ACL OID.
* *
* @param objectIdentity the object identity * @param objectIdentity the object identity
* @param aclSid the acl sid * @param aclSid the acl sid
...@@ -283,7 +288,7 @@ public interface CustomAclService extends JsonSidConverter.SidProvider { ...@@ -283,7 +288,7 @@ public interface CustomAclService extends JsonSidConverter.SidProvider {
String getSidName(long id); String getSidName(long id);
/** /**
* Load object identity extended information * Load object identity extended information.
* *
* @param objectIdentity the object identity * @param objectIdentity the object identity
* @return the acl object identity ext * @return the acl object identity ext
...@@ -294,11 +299,20 @@ public interface CustomAclService extends JsonSidConverter.SidProvider { ...@@ -294,11 +299,20 @@ public interface CustomAclService extends JsonSidConverter.SidProvider {
* Wraps {@link AclObjectIdentity} and adds list of inherited permissions. * Wraps {@link AclObjectIdentity} and adds list of inherited permissions.
*/ */
public static class AclObjectIdentityExt { public static class AclObjectIdentityExt {
/** The original. */
@JsonUnwrapped @JsonUnwrapped
public AclObjectIdentity original; public AclObjectIdentity original;
/** The inherited. */
@JsonSerialize(converter = AclEntriesToPermissions.class) @JsonSerialize(converter = AclEntriesToPermissions.class)
public List<AclEntry> inherited = new ArrayList<>(); public List<AclEntry> inherited = new ArrayList<>();
/**
* Instantiates a new acl object identity ext.
*
* @param source the source
*/
public AclObjectIdentityExt(AclObjectIdentity source) { public AclObjectIdentityExt(AclObjectIdentity source) {
this.original = source; this.original = source;
} }
......
...@@ -161,9 +161,9 @@ public abstract class BasicUserServiceImpl<R extends GrantedAuthority, T extends ...@@ -161,9 +161,9 @@ public abstract class BasicUserServiceImpl<R extends GrantedAuthority, T extends
} }
/** /**
* Allow the application to register additional authorities * Allow the application to register additional authorities.
* *
* @param user * @param user the user
* @return the same object * @return the same object
*/ */
protected abstract Set<String> getRuntimeAuthorities(T user); protected abstract Set<String> getRuntimeAuthorities(T user);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment