}
public static ResourceInfo getGenericResourceInfo(Resource resource, String resourceName){
if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){
Application application = (Application)resource.getParent().getParent();
return new ResourceInfo(resourceName, application.getName());
}else if(resource.getParent() != null && resource.getParent().getParent() instanceof Module){
Module module = (Module)resource.getParent().getParent();
Application application = (Application)module.getParent();
return new ResourceInfo(resourceName, application.getName(), module.getName());
}else{
return new ResourceInfo(resourceName);
}
}