Commit e17d7588 authored by Matija Obreza's avatar Matija Obreza

Added missing Javadoc

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