public class

CustomizationInfo

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.CustomizationInfo

Class Overview

This class represents the customization information within a Customization folder. It provides methods to identify if a file is customized, if a resource (i.e. a file within the classpath) is customized, and a ClassLoader that loads only those classes/resources inside its folder.

Summary

Public Constructors
CustomizationInfo(String name, String rootFolderPath)
Base Constructor.
Public Methods
URL findResource(String resourceName)
Returns the URL for a given resource.
ClassLoader getClassLoader()
Returns a ClassLoader that loads classes/resources only within this customization WEB-INF/classes subfolder, and jar files inside WEB-INF/lib subfolder.
String getCustomPath(String appRelativePath)
Returns the path that the given file would have within this customization folder.
String getName()
The name of this customization instance.
String getPath()
The absolute path to the root folder of this customization.
boolean isFileCustomized(String appRelativePath)
Returns true if a file with the given relative path exists inside this customization.
boolean isResourceCustomized(String resourceName)
Returns true if a file with the given name exists inside this customization's WEB-INF/classes folder or within one of the jar files inside its WEB-INF/lib folder.
String toString()
Protected Methods
String[] getJarFiles()
Returns an array with the names of all jar files inside the WEB-INF/lib subfolder.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CustomizationInfo (String name, String rootFolderPath)

Base Constructor. Creates a new instance.

Parameters
name The name to assign to the new instance. Mainly for information purpose.
rootFolderPath The root folder where the files of the customization are to be found.

Public Methods

public URL findResource (String resourceName)

Returns the URL for a given resource. If the resource is not found, it returns null.

public ClassLoader getClassLoader ()

Returns a ClassLoader that loads classes/resources only within this customization WEB-INF/classes subfolder, and jar files inside WEB-INF/lib subfolder.

public String getCustomPath (String appRelativePath)

Returns the path that the given file would have within this customization folder. This method will return the path relative to the application's root folder, without checking if the specified path exists or is valid. appRelativePath is always assumed to be relative to the application's root folder, for example: "/jsp/mstrWeb.jsp"

public String getName ()

The name of this customization instance. Mainly for information purpose.

public String getPath ()

The absolute path to the root folder of this customization.

public boolean isFileCustomized (String appRelativePath)

Returns true if a file with the given relative path exists inside this customization. appRelativePath is always assumed to be relative to the application's root folder, for example: "/jsp/mstrWeb.jsp"

public boolean isResourceCustomized (String resourceName)

Returns true if a file with the given name exists inside this customization's WEB-INF/classes folder or within one of the jar files inside its WEB-INF/lib folder.

public String toString ()

Protected Methods

protected String[] getJarFiles ()

Returns an array with the names of all jar files inside the WEB-INF/lib subfolder.