org.gcube.informationsystem.publisher.utils
Class ValidationUtils

java.lang.Object
  extended by org.gcube.informationsystem.publisher.utils.ValidationUtils

public class ValidationUtils
extends Object


Constructor Summary
ValidationUtils()
           
 
Method Summary
static
<T extends org.gcube.common.resources.gcore.Resource>
void
addEnclosingScopesOnResource(T resource, String scope)
          If scope is a VRE scope and the VO and INFRA scopes are not present in the resource, this method add these scopes to the resource
static
<T extends org.gcube.common.resources.gcore.Resource>
boolean
anotherBrotherVREOrVOOnResource(T resource, String scope)
           
static
<T extends org.gcube.common.resources.gcore.Resource>
boolean
anotherInfraScopeOnResource(T resource, String scope)
           
static
<T extends org.gcube.common.resources.gcore.Resource>
boolean
anotherSonVREOnResource(T resource, String scope)
           
static boolean isChildScope(String fatherScope, String sonScope)
           
static
<T extends org.gcube.common.resources.gcore.Resource>
boolean
isCompatibleScopeForRemove(T resource, String scope)
           
static
<R extends org.gcube.common.resources.gcore.Resource>
boolean
isPresent(R resource, String currentScope)
           
static void valid(String name, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationUtils

public ValidationUtils()
Method Detail

valid

public static void valid(String name,
                         Object object)

isPresent

public static <R extends org.gcube.common.resources.gcore.Resource> boolean isPresent(R resource,
                                                                                      String currentScope)

addEnclosingScopesOnResource

public static <T extends org.gcube.common.resources.gcore.Resource> void addEnclosingScopesOnResource(T resource,
                                                                                                      String scope)
If scope is a VRE scope and the VO and INFRA scopes are not present in the resource, this method add these scopes to the resource

Parameters:
resource - the resource
scope - a scope

isCompatibleScopeForRemove

public static <T extends org.gcube.common.resources.gcore.Resource> boolean isCompatibleScopeForRemove(T resource,
                                                                                                       String scope)

anotherBrotherVREOrVOOnResource

public static <T extends org.gcube.common.resources.gcore.Resource> boolean anotherBrotherVREOrVOOnResource(T resource,
                                                                                                            String scope)

anotherSonVREOnResource

public static <T extends org.gcube.common.resources.gcore.Resource> boolean anotherSonVREOnResource(T resource,
                                                                                                    String scope)

isChildScope

public static boolean isChildScope(String fatherScope,
                                   String sonScope)

anotherInfraScopeOnResource

public static <T extends org.gcube.common.resources.gcore.Resource> boolean anotherInfraScopeOnResource(T resource,
                                                                                                        String scope)


Copyright © 2013. All Rights Reserved.