public final class ResourceManager extends ResourceCache
For example:
import oracle.lite.resource.*;
ResourceManager.initialize ("jdbc:oracle:thin:@mobile_server:1521:orcl",
"mobileadmin", "manager);
ResourceManager rm = ResourceManager.getInstance();
rm.destroy(); // Cleanup
| Modifier and Type | Method and Description |
|---|---|
static void |
destroy()
Cleanup ResourceManager by closing all open JDBC connections and
releasing cached objects.
|
Application |
getApplication(java.lang.String name)
Retrieve a specific Application object given a application id.
|
Device |
getDevice(java.lang.String devId)
Retrieve a specific device object given a device id.
|
Device |
getDeviceByUdid(java.lang.String udid)
Retrieve a specific iOS device object given a udid.
|
java.util.Vector |
getDevices()
Retrieve all devices from the repository.
|
static boolean |
getFlushOnCommit() |
Group |
getGroup(java.lang.String name)
Retrieve a Group object from the repository.
|
static ResourceManager |
getInstance()
Retrieve the lone instance of
ResourceManager class. |
Language |
getLanguage(java.lang.String lang)
Retrieve language object given an abbreviated language code.
|
java.util.Vector |
getLanguages()
Retrieve all supported languages
|
Platform |
getMatchingPlatform(java.lang.String type)
Get best matching platform given a device type.
|
java.util.Enumeration |
getObsoletedPlatforms()
Get the enumerated list of obsoleted plaforms.
|
Platform |
getPlatform(java.lang.String id)
Retrieve a specific Device Platform object.
|
Platform |
getPlatformByName(java.lang.String name)
Retrieve a specific Device Platform object given a platform name.
|
Platform |
getPlatformByNameAndLanguage(java.lang.String name,
java.lang.String lang)
Retrieve a specific Platform object given a name and language code.
|
Platform |
getPlatformByType(java.lang.String type)
Retrieve a specific Device Platform object given a platform type.
|
java.util.Enumeration |
getPlatforms()
Retrieve a all device platform objects from the repository.
|
java.util.Vector |
getPlatforms(int state)
Get all Platform object after sorting them in ascending order.
|
Provider |
getProvider(java.lang.String id)
Retrieve a specific Provider given its ID.
|
java.util.Enumeration |
getProviders(java.lang.String type)
Retrieve all registered providers of the given 'type'.
|
Role |
getRole(java.lang.String name)
Retrieve a Role object from the repository.
|
java.lang.String |
getUpgradePlatformType(java.lang.String identifier)
Get the upgradeable Type for the given platform Name/Type.
|
User |
getUser(java.lang.String name)
Retrieve a specific user object from the repository.
|
User |
getUserById(java.lang.String id)
Retrieve a specific user object from repository given a user id.
|
java.util.Vector |
getUsers()
Retrieves all User objects from the Mobile Server repository.
|
java.util.Vector |
getUsers(java.lang.String filter)
Retrieve all User objects from the repository after applying a filter.
|
static void |
initialize(java.sql.Connection conn)
Initialize Mobile Server repository
ResourceManager |
static void |
initialize(java.lang.String connStr)
Initialize Mobile Server repository
ResourceManager |
static void |
initialize(java.lang.String url,
java.lang.String uid,
java.lang.String pwd)
Initialize Mobile Server repository
ResourceManager |
static void |
setFlushOnCommit(boolean flag) |
addToCache, clearCache, commit, createStatement, elements, get, getAutoCommit, getConnection, getConnectionInfo, getFromCache, isEmpty, objects, print, put, put, remove, removeFromCache, setAutoCommit, synchronizepublic static void destroy()
ResourceManager.public Application getApplication(java.lang.String name) throws ResourceException
name - Application nameoracle.lite.resource.Application instanceResourceExceptionpublic Device getDevice(java.lang.String devId) throws ResourceException
devId - Device Idoracle.lite.resource.Device objectResourceExceptionpublic Device getDeviceByUdid(java.lang.String udid) throws ResourceException
udid - iOS Device udidoracle.lite.resource.Device objectResourceExceptionpublic java.util.Vector getDevices()
throws ResourceException
java.util.Vector objectResourceExceptionpublic static boolean getFlushOnCommit()
public Group getGroup(java.lang.String name) throws ResourceException
name - Group nameResourceExceptionpublic static ResourceManager getInstance()
ResourceManager class.ResourceManager instancepublic Language getLanguage(java.lang.String lang) throws ResourceException
lang - Language abbreviation (E.g. US, JA).oracle.lite.resource.Language objectoracle.lite.resource.ResourceExceptionResourceExceptionpublic java.util.Vector getLanguages()
java.util.Vector containig all supprted Languagespublic Platform getMatchingPlatform(java.lang.String type) throws ResourceException
type - Device type.null if one could not found.ResourceExceptionpublic java.util.Enumeration getObsoletedPlatforms()
throws ResourceException
ResourceExceptionpublic Platform getPlatform(java.lang.String id) throws ResourceException
id - Platform Idoracle.lite.resource.Platform objectResourceExceptionpublic Platform getPlatformByName(java.lang.String name) throws ResourceException
name - Device platform nameoracle.lite.resource.Platform objectResourceExceptionpublic Platform getPlatformByNameAndLanguage(java.lang.String name, java.lang.String lang) throws ResourceException
name - Device platform name (partial name)lang - Language codeoracle.lite.resource.Platform objectResourceExceptionpublic Platform getPlatformByType(java.lang.String type) throws ResourceException
type - Device platform typeoracle.lite.resource.Platform objectResourceExceptionpublic java.util.Enumeration getPlatforms()
throws ResourceException
java.util.Enumeration objectResourceExceptionpublic java.util.Vector getPlatforms(int state)
throws ResourceException
state - 0 All enabled Platforms.
1 All disabled Platforms
2 All PlatformsResourceExceptionpublic Provider getProvider(java.lang.String id) throws ResourceException
id - Provider Id.oracle.lite.resource.Provider instanceoracle.lite.resource.ResourceExceptionResourceExceptionpublic java.util.Enumeration getProviders(java.lang.String type)
throws ResourceException
null, this method will return all Provider objects.type - Provider Type (E.g. 'NETWORK', 'MESSAGE' etc).ResourceExceptionpublic Role getRole(java.lang.String name) throws ResourceException
name - Role nameResourceExceptionpublic java.lang.String getUpgradePlatformType(java.lang.String identifier)
public User getUser(java.lang.String name) throws ResourceException
name - User Name.oracle.lite.resource.User objectResourceExceptionpublic User getUserById(java.lang.String id) throws ResourceException
id - User's internal id.oracle.lite.resource.User instanceResourceExceptionpublic java.util.Vector getUsers()
throws ResourceException
java.util.Vector object containing User objectsResourceExceptionpublic java.util.Vector getUsers(java.lang.String filter)
throws ResourceException
filter - Search stringjava.util.Vector object containing User objectsoracle.lite.resource.ResourceExceptionResourceExceptionpublic static void initialize(java.sql.Connection conn)
throws java.lang.Exception
ResourceManagerconn - JDBC Connection objectlava.lang.Exceptionjava.lang.Exceptionpublic static void initialize(java.lang.String connStr)
throws java.lang.Exception
ResourceManagerconnStr - Connection string (lava.lang.Exceptionjava.lang.Exceptionpublic static void initialize(java.lang.String url,
java.lang.String uid,
java.lang.String pwd)
throws java.lang.Exception
ResourceManagerurl - JDBC urluid - JDBC User Namepwd - JDBC User's passwordlava.lang.Exceptionjava.lang.Exceptionpublic static void setFlushOnCommit(boolean flag)