|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.api.API
jet.api.CatalogAPI
jet.api.MultipliedCatalogAPI
public class MultipliedCatalogAPI
The CatalogAPI class allows an application to create and manipulate JReport catalog objects. By building a CatalogAPI instance in a Java program, users can edit a catalog by methods provided by API.
JReport catalog and its objects are stored in a tree
structure. An instance of CatalogAPI can
retrieve each object in the catalog by its handle. The handle
of the catalog object is named by its qualified and unique instance
name. Besides the handle, some catalog objects
also have resource names, such as query, table, table column,
and formula. And the resource name of table, field(formula,parameter)
also be called mapping name. The mapping name maps the real name of
a database object to JReport catalog's name.
The following are the objects that a JReport catalog can hold:
A CatalogAPI instance can be generated by a
Designer instance.
Below is an example of the use of the CatalogAPI.
MultipliedDesigner dr = null;
try
{
String path = %install root%/JReport/demo/reports/SampleReports/;
String catName = "SampleReports.cat";
DesignerUserInfo userInfo=new DesignerUserInfo("UID", "license key");
dr = new MultipliedDesigner(path, catName,Designer.CAT,userInfo);
MultipliedCatalogAPI cat = dr.getCatalogAPI();
}
catch(Exception e)
{
;
}
finally
{
dr.exit();
}
| Field Summary |
|---|
| Fields inherited from class jet.api.API |
|---|
CAT, CENTIMETER, COLOR, DOUBLE, ENUM, FLOAT, INCH, LONG, PIXEL, REFERENCE, RPT, SELFRPT, TEXTRPT, UNKNOWN, XMLCAT, XMLRPT |
| Constructor Summary | |
|---|---|
MultipliedCatalogAPI(java.lang.String path,
java.lang.String name,
java.lang.String suffix)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getBLNodeQualifyDisplayName(java.lang.String handle)
Gets BusinessLogic node's qualified display name. |
java.lang.String |
getHandle(java.lang.String resourceName,
int type)
Gets the handle of an object according to the object's resource name and object type, which can identify the object in the catalog. |
java.lang.String |
getHandle(java.lang.String dataSourceName,
java.lang.String resourceName,
int type)
Gets the handle of an object according to the object's resource name and object type in the specified data source in JReport catalog, which can identify the object in the catalog. |
ObjectInfo |
getObjectInfo(java.lang.String handle)
Gets resource entity's information of an object in the catalog. |
ObjectInfo |
getObjectInfo(java.lang.String resourceName,
int type)
Gets resource entity's information of an object in catalog. |
ObjectInfo |
getObjectInfo(java.lang.String dataSourceName,
java.lang.String resourceName,
int type)
Gets resource entity's information of an object in the catalog. |
void |
rename(java.lang.String resourceName,
java.lang.String newName,
int type)
Renames the specified object. |
void |
rename(java.lang.String dataSourceName,
java.lang.String resourceName,
java.lang.String newName,
int type)
Renames the resource name of the specified object. |
boolean |
save()
Saves an open catalog. |
boolean |
saveAs(java.lang.String path,
java.lang.String name)
Saves an open catalog as a new catalog file. |
| Methods inherited from class jet.api.API |
|---|
clearError, clearMsg, clearWarning, closeLog, containPropName, getBool, getChildren, getClassType, getColor, getDouble, getError, getFloat, getHandles, getHandles, getHandles, getHandles, getInstanceName, getInt, getLong, getParent, getPropNames, getPropType, getQualifyName, getString, getStringArray, getUnit, getWarning, set, set, set, set, set, set, set, setLog, setLog, setLog, setReference, setUnit, writeLog, writeLog |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultipliedCatalogAPI(java.lang.String path,
java.lang.String name,
java.lang.String suffix)
throws jet.jetc.ReadFailureException,
jet.universe.exception.UniverseFileException
path - The catalog file's path. It is the full path of the file.name - The catalog file's name.suffix - The suffix of the catalog file's name.
jet.jetc.ReadFailureException
jet.universe.exception.UniverseFileException| Method Detail |
|---|
public boolean save()
throws jet.jetc.WriteFailureException,
jet.universe.exception.FMLFileException
save in class CatalogAPItrue if the catalog object is saved successfully;
false otherwise.
jet.jetc.WriteFailureException - if the catalog fails to save
the catalog file.
jet.universe.exception.FMLFileException - if the catalog fails to compile
the java class of the formula in the catalog.
public boolean saveAs(java.lang.String path,
java.lang.String name)
saveAs in class CatalogAPIpath - The file path of the new catalog file. It is the full path of the file.name - The file name of the new catalog file.
true if the catalog file is saved successfully;
false otherwise.
public java.lang.String getHandle(java.lang.String resourceName,
int type)
getHandle in class CatalogAPIresourceName - Indicates the resource name of the object in the catalog.type - indicates the type of the object by constant object type value.
The CatalogAPI class provides a number of convenient constants
that you can use to specify catalog objects. For example,
CatalogAPI.CONNECTIONCatalogAPI.TABLECatalogAPI.VIEWCatalogAPI.QUERYCatalogAPI.PROCEDURECatalogAPI.FILESQLCatalogAPI.UDSCatalogAPI.FORMULACatalogAPI.SUMMARYCatalogAPI.PARAMETERCatalogAPI.WHEREPORTIONCatalogAPI.UNIFIEDBUSINESSVIEWCatalogAPI.BUSINESSLOGIC_CATEGORYCatalogAPI.BUSINESSLOGIC_DIMENSIONCatalogAPI.BUSINESSLOGIC_MEASURECatalogAPI.BUSINESSLOGIC_FILTERCatalogAPI.BUSINESSLOGIC_DETAILINFOCatalogAPI.BUSINESSLOGIC_HIERARCHYCatalogAPI.BUSINESSLOGIC_HIERARCHYCONTAINER#ONDEMAND_QUER- #XML_CONNECTION
- {@link #BUSINESSVIEW_GROUP}
- {@link #BUSINESSVIEW_AGGREGATION}
- {@link #BUSINESSVIEW_DETAIL}
getHandle(String, String, int)
public java.lang.String getHandle(java.lang.String dataSourceName,
java.lang.String resourceName,
int type)
getHandle in class CatalogAPIdataSourceName - Indicates the resource name of the data source to get
the object's handle. If it is null or "", it means it is the default data source
in the catalog.resourceName - Indicates the resource name of the object in the specified
data source.type - Indicates the type of the object by constant object type value.
The CatalogAPI class provides a number of convenient constants
that you can use to specify catalog objects. For example,
CatalogAPI.CONNECTIONCatalogAPI.TABLECatalogAPI.VIEWCatalogAPI.QUERYCatalogAPI.PROCEDURECatalogAPI.FILESQLCatalogAPI.UDSCatalogAPI.FORMULACatalogAPI.SUMMARYCatalogAPI.PARAMETERCatalogAPI.WHEREPORTIONCatalogAPI.BUSINESSLOGIC- The businesslogic of JReport also named Business/Report Cube.CatalogAPI.BUSINESSLOGIC_CATEGORYCatalogAPI.BUSINESSLOGIC_DIMENSIONCatalogAPI.BUSINESSLOGIC_MEASURECatalogAPI.BUSINESSLOGIC_FILTERCatalogAPI.BUSINESSLOGIC_DETAILINFOCatalogAPI.BUSINESSLOGIC_HIERARCHYCatalogAPI.BUSINESSLOGIC_HIERARCHYCONTAINER#ONDEMAND_QUER- #XML_CONNECTION
- {@link #BUSINESSVIEW_GROUP}
- {@link #BUSINESSVIEW_AGGREGATION}
- {@link #BUSINESSVIEW_DETAIL}
null if there is no matching object, otherwise returns a String specifying
the handle of the object.
public void rename(java.lang.String resourceName,
java.lang.String newName,
int type)
rename in class CatalogAPIresourceName - Resource name(mapping name) of the object.newName - New resource name of the object.type - Indicates the type of the object by constant object type value.
The CatalogAPI class provides a number of convenient constants
that you can use to specify catalog objects. For example,
CatalogAPI.CONNECTIONCatalogAPI.TABLECatalogAPI.VIEWCatalogAPI.QUERYCatalogAPI.PROCEDURECatalogAPI.FILESQLCatalogAPI.UDSCatalogAPI.FORMULACatalogAPI.SUMMARYCatalogAPI.PARAMETERCatalogAPI.WHEREPORTION#ONDEMAND_QUER- {@link #XML_CONNECTION
public void rename(java.lang.String dataSourceName,
java.lang.String resourceName,
java.lang.String newName,
int type)
rename in class CatalogAPIdataSourceName - Indicates the resource name of the data source in the catalog.resourceName - Resource name(mapping name) of the object.newName - New resource name of the object.type - Indicates the type of the object by constant object type value.
The CatalogAPI class provides a number of convenient constants
that you can use to specify catalog objects. For example,
CatalogAPI.CONNECTIONCatalogAPI.TABLECatalogAPI.VIEWCatalogAPI.QUERYCatalogAPI.PROCEDURECatalogAPI.FILESQLCatalogAPI.UDSCatalogAPI.FORMULACatalogAPI.SUMMARYCatalogAPI.PARAMETERCatalogAPI.WHEREPORTION#ONDEMAND_QUER- {@link #XML_CONNECTION
public ObjectInfo getObjectInfo(java.lang.String resourceName,
int type)
getObjectInfo in class CatalogAPIresourceName - resource name of the entity.type - Indicates the type of the object by constant object type value.
The CatalogAPI class provides a number of convenient constants
that you can use to specify catalog objects. For example,
CatalogAPI.CONNECTIONCatalogAPI.TABLECatalogAPI.VIEWCatalogAPI.QUERYCatalogAPI.PROCEDURECatalogAPI.FILESQLCatalogAPI.UDSCatalogAPI.FORMULACatalogAPI.SUMMARYCatalogAPI.PARAMETERCatalogAPI.WHEREPORTIONCatalogAPI.BUSINESSLOGIC- The businesslogic of JReport also named Business/Report Cube.#ONDEMAND_QUER- {@link #XML_CONNECTION
public ObjectInfo getObjectInfo(java.lang.String dataSourceName,
java.lang.String resourceName,
int type)
getObjectInfo in class CatalogAPIdataSourceName - Indicates the resource name of the data source in the catalog.resourceName - resource name of the entity.type - Indicates the type of the object by constant object type value.
The CatalogAPI class provides a number of convenient constants
that you can use to specify catalog objects. For example,
CatalogAPI.CONNECTIONCatalogAPI.TABLECatalogAPI.VIEWCatalogAPI.QUERYCatalogAPI.PROCEDURECatalogAPI.FILESQLCatalogAPI.UDSCatalogAPI.FORMULACatalogAPI.SUMMARYCatalogAPI.PARAMETERCatalogAPI.WHEREPORTIONCatalogAPI.BUSINESSLOGIC- The businesslogic of JReport also named Business/Report Cube.CatalogAPI.BUSINESSLOGIC_CATEGORYCatalogAPI.BUSINESSLOGIC_DIMENSIONCatalogAPI.BUSINESSLOGIC_MEASURECatalogAPI.BUSINESSLOGIC_FILTERCatalogAPI.BUSINESSLOGIC_DETAILINFOCatalogAPI.BUSINESSLOGIC_HIERARCHYCatalogAPI.BUSINESSLOGIC_HIERARCHYCONTAINER#ONDEMAND_QUER- #XML_CONNECTION
- {@link #BUSINESSVIEW_GROUP}
- {@link #BUSINESSVIEW_AGGREGATION}
- {@link #BUSINESSVIEW_DETAIL}
public ObjectInfo getObjectInfo(java.lang.String handle)
getObjectInfo in class CatalogAPIhandle - The handle of the resource entity.
public java.lang.String getBLNodeQualifyDisplayName(java.lang.String handle)
handle - The handle of the Business Logic object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||