/** * Returns a resource according with given data. * * @param resourceName the resource name. * @param resourceType the resource kind. * @return The resource described by name and type. */ public static Resource getResource(final String resourceName, final int resourceType) { switch (resourceType) { case ResourceManager.RESOURCE_TEMPLATE: return new AliadaTemplate(); case ResourceManager.RESOURCE_CONTENT: return new ContentResource(); default: throw new IllegalArgumentException("WARNIGN: Unknown resource type: " + resourceType); } }