}else if(parentObject instanceof Module){ moduleName = ((Module)parentObject).getName(); applicationName = ((Application)((Module)parentObject).getParent()).getName();
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); } }
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); } }
public static PoolInfo getPoolInfo(ResourcePool resource){ if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){ Application application = (Application)resource.getParent().getParent(); return new PoolInfo(resource.getName(), 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 PoolInfo(resource.getName(), application.getName(), module.getName()); }else{ return new PoolInfo(resource.getName()); } }
public static ResourceInfo getResourceInfo(BindableResource resource){ if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){ Application application = (Application)resource.getParent().getParent(); return new ResourceInfo(resource.getJndiName(), 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(resource.getJndiName(), application.getName(), module.getName()); }else{ return new ResourceInfo(resource.getJndiName()); } }
public static ResourceInfo getResourceInfo(BindableResource resource){ if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){ Application application = (Application)resource.getParent().getParent(); return new ResourceInfo(resource.getJndiName(), 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(resource.getJndiName(), application.getName(), module.getName()); }else{ return new ResourceInfo(resource.getJndiName()); } }
public static PoolInfo getPoolInfo(ResourcePool resource){ if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){ Application application = (Application)resource.getParent().getParent(); return new PoolInfo(resource.getName(), 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 PoolInfo(resource.getName(), application.getName(), module.getName()); }else{ return new PoolInfo(resource.getName()); } }