Java Doc for MIDletSuiteStorage.java in  » 6.0-JDK-Modules » j2me » com » sun » midp » midletsuite » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.midp.midletsuite 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.midp.midletsuite.MIDletSuiteStorage

MIDletSuiteStorage
public class MIDletSuiteStorage (Code)
This class manages the persistent data for MIDlet suites.

Each installed package is uniquely identified by a unique ID. Only suites installed or updated using this API appear in the list of known suites.





Method Summary
native public  intcreateSuiteID()
     Returns a unique identifier of MIDlet suite.
native public  voiddisable(int id)
     Disables a suite given its suite ID.

The method does not stop the suite if is in use.

native public  voidenable(int id)
     Enables a suite given its suite ID.
 InstallInfogetInstallInfo(MIDletSuiteImpl midletSuite)
     Get the installation information of a suite.
public synchronized  int[]getListOfSuites()
     List all installed software packages by storage name.
public synchronized  MIDletSuiteImplgetMIDletSuite(int id, boolean update)
     Gets the MIDlet Suite from storage, and selects one midlet to be run.
public synchronized  byte[]getMIDletSuiteIcon(int suiteId, String iconName)
    
public synchronized  MIDletSuiteInfogetMIDletSuiteInfo(int id)
     Reads the basic information about the midlet suite from the storage.
native public  voidgetMIDletSuiteInfoImpl0(int id, MIDletSuiteInfo msi)
     Reads the basic information about the midlet suite from the storage.
public static  MIDletSuiteStoragegetMIDletSuiteStorage()
     Returns a reference to the singleton MIDlet suite storage object.
public static  MIDletSuiteStoragegetMIDletSuiteStorage(SecurityToken securityToken)
     Returns a reference to the singleton MIDlet suite storage object.
native public synchronized  StringgetMidletSuiteAppImagePath(int id)
     Get the path for the MONET image of the specified suite.
public synchronized  String[]getMidletSuiteClassPath(int id)
     Get the midlet suite's class path including a path to the MONET image of the specified suite and a path to the suite's jar file.
native public synchronized  StringgetMidletSuiteJarPath(int id)
     Get the class path for a suite.
static  String[]getPropertiesStrings(Properties props)
     Fill plain array with properties key/value String pairs.
native public  intgetStorageUsed(int id)
     Gets the amount of storage on the device that this suite is using.
native public static  intgetSuiteID(String vendor, String name)
     Gets the unique identifier of MIDlet suite.
public static  voidinitSecurityToken(SecurityToken token)
     Initializes the security token for this class, so it can perform actions that a normal MIDlet Suite cannot.
public  String[]listRecordStores(int suiteId)
     Returns an array of the names of record stores owned by the MIDlet suite.
native public static  intloadSuitesIcons0()
     Loads the cached icons from the permanent storage into memory.
public  voidremove(int id)
     Removes a software package given its suite ID. The content handler manager is called to remove any registrations, if any.

If the component is in use it must continue to be available to the other components that are using it.

public  voidsaveSuiteSettings(int id, byte pushInterruptSetting, int pushOptions, byte[] permissions)
     Saves any of the settings (security or others) that the user may have changed.
public synchronized  voidstoreSuite(InstallInfo installInfo, SuiteSettings suiteSettings, MIDletSuiteInfo msi, Properties jadProps, Properties jarProps)
     Stores or updates a midlet suite.
native public  voidstoreSuiteVerifyHash(int id, byte[] verifyHash)
    
native public  booleansuiteExists(int id)
     Tells if a suite exists.
native public static  StringsuiteIdToString(int suiteId)
     Java interface for midp_suiteid2pcsl_string().



Method Detail
createSuiteID
native public int createSuiteID()(Code)
Returns a unique identifier of MIDlet suite. Constructed from the combination of the values of the MIDlet-Name and MIDlet-Vendor attributes. the platform-specific storage name of the applicationgiven by vendorName and appName



disable
native public void disable(int id) throws MIDletSuiteLockedException(Code)
Disables a suite given its suite ID.

The method does not stop the suite if is in use. However any future attepts to run a MIDlet from this suite while disabled should fail.
Parameters:
  id - suite ID for the installed package
exception:
  IllegalArgumentException - if the suite cannot be found
exception:
  MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked for updating




enable
native public void enable(int id) throws MIDletSuiteLockedException(Code)
Enables a suite given its suite ID.

The method does update an suites that are currently loaded for settings or of application management purposes.
Parameters:
  id - suite ID for the installed package
exception:
  IllegalArgumentException - if the suite cannot be found
exception:
  MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked for updating




getInstallInfo
InstallInfo getInstallInfo(MIDletSuiteImpl midletSuite) throws IOException(Code)
Get the installation information of a suite.
Parameters:
  midletSuite - Suite object installation information
exception:
  IOException - if an the information cannot be read



getListOfSuites
public synchronized int[] getListOfSuites()(Code)
List all installed software packages by storage name. an array of ints of the storage names for theinstalled packages
exception:
  SecurityException - if the caller does not have permissionto see what software is installed



getMIDletSuite
public synchronized MIDletSuiteImpl getMIDletSuite(int id, boolean update) throws MIDletSuiteLockedException, MIDletSuiteCorruptedException(Code)
Gets the MIDlet Suite from storage, and selects one midlet to be run.
Parameters:
  id - the unique ID of the suite givenby the installer when it was downloaded
Parameters:
  update - true is this MIDletSuite need to be updated
exception:
  MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked; MIDletSuiteCorruptedException is thrown if the MIDletSuite iscorrupted MIDlet Suite reference



getMIDletSuiteIcon
public synchronized byte[] getMIDletSuiteIcon(int suiteId, String iconName)(Code)

Parameters:
  suiteId - unique identifier of the suite
Parameters:
  iconName - the name of the icon to retrieve



getMIDletSuiteInfo
public synchronized MIDletSuiteInfo getMIDletSuiteInfo(int id) throws IOException, IllegalArgumentException(Code)
Reads the basic information about the midlet suite from the storage.
Parameters:
  id - unique ID of the suite
exception:
  IOException - if an the information cannot be read
exception:
  IllegalArgumentException - if suiteId is invalid MIDletSuiteInfo object with the suite's attributes



getMIDletSuiteInfoImpl0
native public void getMIDletSuiteInfoImpl0(int id, MIDletSuiteInfo msi) throws IOException, IllegalArgumentException(Code)
Reads the basic information about the midlet suite from the storage.
Parameters:
  id - unique ID of the suite
Parameters:
  msi - object to fill
exception:
  IOException - if an the information cannot be read
exception:
  IllegalArgumentException - if suiteId is invalid



getMIDletSuiteStorage
public static MIDletSuiteStorage getMIDletSuiteStorage() throws SecurityException(Code)
Returns a reference to the singleton MIDlet suite storage object. the storage reference
exception:
  SecurityException - if the caller does not have permissionto install software



getMIDletSuiteStorage
public static MIDletSuiteStorage getMIDletSuiteStorage(SecurityToken securityToken) throws SecurityException(Code)
Returns a reference to the singleton MIDlet suite storage object.
Parameters:
  securityToken - security token of the calling class the storage reference
exception:
  SecurityException - if the caller does not have permissionto manage midlets



getMidletSuiteAppImagePath
native public synchronized String getMidletSuiteAppImagePath(int id)(Code)
Get the path for the MONET image of the specified suite.
Parameters:
  id - unique ID of the suite image path or null if the suite does not exist



getMidletSuiteClassPath
public synchronized String[] getMidletSuiteClassPath(int id)(Code)
Get the midlet suite's class path including a path to the MONET image of the specified suite and a path to the suite's jar file.
Parameters:
  id - unique ID of the suite class path or null if the suite does not exist



getMidletSuiteJarPath
native public synchronized String getMidletSuiteJarPath(int id)(Code)
Get the class path for a suite.
Parameters:
  id - unique ID of the suite class path or null if the suite does not exist



getPropertiesStrings
static String[] getPropertiesStrings(Properties props)(Code)
Fill plain array with properties key/value String pairs. It's needed to simplify properties using in a native code.
Parameters:
  props - properties to get Strings from array of Strings filled with property key/value pairs



getStorageUsed
native public int getStorageUsed(int id)(Code)
Gets the amount of storage on the device that this suite is using. This includes the JAD, JAR, management data, and RMS.
Parameters:
  id - ID of a MIDlet suite number of bytes of storage the suite is using



getSuiteID
native public static int getSuiteID(String vendor, String name)(Code)
Gets the unique identifier of MIDlet suite.
Parameters:
  vendor - name of the vendor that created the application, asgiven in a JAD file
Parameters:
  name - name of the suite, as given in a JAD file suite ID of the midlet suite given by vendor and nameor MIDletSuite.UNUSED_SUITE_ID if the suite does not exist



initSecurityToken
public static void initSecurityToken(SecurityToken token)(Code)
Initializes the security token for this class, so it can perform actions that a normal MIDlet Suite cannot.
Parameters:
  token - security token for this class.



listRecordStores
public String[] listRecordStores(int suiteId)(Code)
Returns an array of the names of record stores owned by the MIDlet suite. The order of RecordStore names returned is implementation dependent.
Parameters:
  suiteId - ID of the MIDlet suite that owns the record store array of the names of record stores owned by theMIDlet suite or null if the MIDlet suite does not haveany record stores



loadSuitesIcons0
native public static int loadSuitesIcons0()(Code)
Loads the cached icons from the permanent storage into memory. status code (0 if no errors)



remove
public void remove(int id) throws MIDletSuiteLockedException(Code)
Removes a software package given its suite ID. The content handler manager is called to remove any registrations, if any.

If the component is in use it must continue to be available to the other components that are using it. The resources it consumes must not be released until it is not in use.
Parameters:
  id - suite ID for the installed package
exception:
  IllegalArgumentException - if the suite cannot be found
exception:
  MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked




saveSuiteSettings
public void saveSuiteSettings(int id, byte pushInterruptSetting, int pushOptions, byte[] permissions) throws IOException(Code)
Saves any of the settings (security or others) that the user may have changed.
Parameters:
  id - ID of the suite
Parameters:
  pushInterruptSetting - push interrupt setting
Parameters:
  pushOptions - push options
Parameters:
  permissions - security permissions for the suite
exception:
  IOException - if an error happens while writing



storeSuite
public synchronized void storeSuite(InstallInfo installInfo, SuiteSettings suiteSettings, MIDletSuiteInfo msi, Properties jadProps, Properties jarProps) throws IOException, MIDletSuiteLockedException(Code)
Stores or updates a midlet suite.
Parameters:
  installInfo - structure containing the following information:
id - unique ID of the suite;jadUrl - where the JAD came from, can be null;jarUrl - where the JAR came from;jarFilename - name of the downloaded MIDlet suite jar file;suiteName - name of the suite;suiteVendor - vendor of the suite;authPath - authPath if signed, the authorization path startingwith the most trusted authority;domain - security domain of the suite;trusted - true if suite is trusted;verifyHash - may contain hash value of the suite withpreverified classes or may be NULL;

Parameters:
  suiteSettings - structure containing the following information:
permissions - permissions for the suite;pushInterruptSetting - defines if this MIDlet suite interruptother suites;pushOptions - user options for push interrupts;suiteId - unique ID of the suite, must be equal to the one givenin installInfo;boolean enabled - if true, MIDlet from this suite can be run;

Parameters:
  msi - structure containing the following information:
suiteId - unique ID of the suite, must be equal to the value givenin installInfo and suiteSettings parameters;storageId - ID of the storage where the MIDlet should be installed;numberOfMidlets - number of midlets in the suite;displayName - the suite's name to display to the user;midletToRunClassName - the midlet's class name if the suite containsonly one midlet, ignored otherwise;iconName - name of the icon for this suite.

Parameters:
  jadProps - properties defined in the application descriptor
Parameters:
  jarProps - properties of the manifest
exception:
  IOException - is thrown, if an I/O error occurs duringstoring the suite
exception:
  MIDletSuiteLockedException - is thrown, if the MIDletSuite islocked



storeSuiteVerifyHash
native public void storeSuiteVerifyHash(int id, byte[] verifyHash)(Code)
Stores hash value of the suite with preverified classes
Parameters:
  id - unique ID of the suite
Parameters:
  verifyHash - hash value of the suite with preverified classes



suiteExists
native public boolean suiteExists(int id) throws MIDletSuiteCorruptedException(Code)
Tells if a suite exists.
Parameters:
  id - ID of a suite true if a suite of the given storage namealready exists on the system
exception:
  MIDletSuiteCorruptedException - is thrown if theMIDletSuite is corrupted



suiteIdToString
native public static String suiteIdToString(int suiteId)(Code)
Java interface for midp_suiteid2pcsl_string().
Parameters:
  suiteId - unique ID of the suite string representation of the given suiteId



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.