public class ApplicationManager
extends java.lang.Object
ApplicationMeta), the business entities (BusinessEntityMeta),
the data structure objects (headers and items - StructureMeta) and
fields of the data structures (FieldMeta).IDataManager.getInstance().
Example: IDataManager applicationDataManager = ApplicationManager.getInstance().getDataManager();
| Modifier and Type | Method and Description |
|---|---|
void |
activateApplication(java.lang.String appId) |
void |
closeDB() |
void |
deactivateApplication(java.lang.String appId) |
static void |
destroy() |
void |
dropDatabase() |
java.lang.String |
getAppBuild() |
java.lang.String |
getApplicationId()
Provides the application id.
|
com.unvired.model.ApplicationMeta |
getApplicationMeta()
Returns the
ApplicationMeta. |
com.unvired.model.ApplicationMeta |
getApplicationMeta(java.lang.String appName) |
java.lang.String |
getApplicationName()
Provides the application name.
|
com.unvired.model.BusinessEntityMeta[] |
getBusinessEntitiesMeta()
Return an array of business entities in the application -
BusinessEntityMeta. |
com.unvired.model.BusinessEntityMeta |
getBusinessEntityMeta(java.lang.String beName)
Return the business entity with the given name -
BusinessEntityMeta. |
IDataManager |
getDataManager()
Provides access to the applications data manager to perform database
operations.
|
com.unvired.model.FieldMeta |
getFieldMeta(java.lang.String structureName,
java.lang.String fieldName)
Return the field details of the given structure and field -
FieldMeta. |
com.unvired.model.FieldMeta[] |
getFieldsMeta(java.lang.String structureName)
Return the details of all the fields belonging to a given structure name
-
FieldMeta. |
java.lang.String[] |
getGIDFields(java.lang.String structureName)
Returns the global identifier fields for the give structure name.
|
com.unvired.model.StructureMeta |
getHeaderStructureMeta(java.lang.String beName)
Return the header structure details for the given business entity name -
StructureMeta. |
static ApplicationManager |
getInstance()
Gets the single instance of ApplicationManager.
|
com.unvired.model.StructureMeta |
getStructureMeta(java.lang.String structureName)
Return the structure details for the given structure name -
StructureMeta. |
com.unvired.model.StructureMeta |
getStructureMeta(java.lang.String beName,
java.lang.String structureName)
Return the structure details for the given business entity and structure
name -
StructureMeta. |
com.unvired.model.StructureMeta[] |
getStructureMetas(java.lang.String beName)
Return the structure details of all the structures belonging to a given
business entity -
StructureMeta. |
void |
initialize(java.lang.String appName,
java.lang.String key,
int version) |
boolean |
isActive() |
boolean |
isAttachmentSupported(java.lang.String beName)
Check if attachment supported for BE
|
boolean |
isInDemoMode()
Check if the application is used in demo mode
|
static boolean |
isRunnable(Activity currentActivity,
java.lang.Class applicationStartActivityClass) |
void |
reset() |
void |
setAppBuild(java.lang.String appBuildNo) |
public static ApplicationManager getInstance()
public static boolean isRunnable(Activity currentActivity,
java.lang.Class applicationStartActivityClass)
public static void destroy()
public void setAppBuild(java.lang.String appBuildNo)
public java.lang.String getAppBuild()
public void initialize(java.lang.String appName,
java.lang.String key,
int version)
throws DBException
DBExceptionpublic IDataManager getDataManager() throws DBException
DBException - Throws a DBException when the values cannot be
fetched from the database.public void activateApplication(java.lang.String appId)
throws DBException
DBExceptionpublic void deactivateApplication(java.lang.String appId)
throws DBException
DBExceptionpublic boolean isActive()
throws DBException
DBExceptionpublic java.lang.String getApplicationName()
public java.lang.String getApplicationId()
public boolean isInDemoMode()
throws DBException
DBException - DBExcaption if database error occurspublic com.unvired.model.ApplicationMeta getApplicationMeta()
throws DBException
ApplicationMeta. Application meta provides
information about the application.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.ApplicationMeta getApplicationMeta(java.lang.String appName)
throws DBException
DBExceptionpublic com.unvired.model.BusinessEntityMeta[] getBusinessEntitiesMeta()
throws DBException
BusinessEntityMeta.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.BusinessEntityMeta getBusinessEntityMeta(java.lang.String beName)
throws DBException
BusinessEntityMeta.beName - of the business entity whose details are required.DBException - Throws a DBException when the data cannot be fetched
from the database.public boolean isAttachmentSupported(java.lang.String beName)
throws DBException,
ApplicationException
beName - Name of the business entity to which the attachment belongs.DBException - DBException if database error occursApplicationExceptionpublic com.unvired.model.StructureMeta getHeaderStructureMeta(java.lang.String beName)
throws DBException
StructureMeta.beName - Name of the business entity to which the structure belongs.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.StructureMeta getStructureMeta(java.lang.String beName,
java.lang.String structureName)
throws DBException
StructureMeta.beName - Name of the business entity to which the structure belongs.structureName - Name of the structure whose details are required.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.StructureMeta getStructureMeta(java.lang.String structureName)
throws DBException
StructureMeta.structureName - Name of the structure whose details are required.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.StructureMeta[] getStructureMetas(java.lang.String beName)
throws DBException
StructureMeta.beName - of the business entity to which the required structure
belongs.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.FieldMeta[] getFieldsMeta(java.lang.String structureName)
throws DBException
FieldMeta.structureName - Name of the structure to which the field belongs.DBException - Throws a DBException when the data cannot be fetched
from the database.public com.unvired.model.FieldMeta getFieldMeta(java.lang.String structureName,
java.lang.String fieldName)
throws DBException
FieldMeta.structureName - Structure name to which the required field belongsfieldName - Field name whose details is requiredDBException - Throws a DBException when the data cannot be fetched
from the database.public java.lang.String[] getGIDFields(java.lang.String structureName)
throws DBException
structureName - Name of the structure for which the global identifier fields
are required.DBException - Throws a DBException when the data cannot be fetched
from the database.public void closeDB()
throws DBException
DBExceptionpublic void dropDatabase()
throws DBException
DBExceptionpublic void reset()
throws DBException
DBExceptionCopyright © 2017 Unvired Inc. All Rights Reserved.