Oracle Java Wireless Client

com.sun.ams
Interface SuiteSettings


public interface SuiteSettings

Interface to suite settings. Settings are grouped into logically related groups.


Method Summary
 java.lang.String checkForError()
          Checks if a given settings contain a mutually exclusive combination of setting values.
 java.lang.String checkForWarning()
          Checks if a given settings contain a potentially dangerous combination of setting values.
 SuiteSettingsGroup getGroup(int idx)
          Gets settings group with specified zero-based index.
 int getGroupsCount()
          Gets number of settings groups.
 void save()
          Saves suite settings.
 

Method Detail

getGroupsCount

int getGroupsCount()
Gets number of settings groups.

Returns:
number of settings groups

getGroup

SuiteSettingsGroup getGroup(int idx)
Gets settings group with specified zero-based index.

Parameters:
idx - zero-based index of settings group
Returns:
SuiteSettingsGroup representing settings group

checkForError

java.lang.String checkForError()
Checks if a given settings contain a mutually exclusive combination of setting values. If so, return an error message, else - null. Only first error will be reported. Settings containing mutually exclusive combinarions can not be saved.

Returns:
error message or null if there are no errors.

checkForWarning

java.lang.String checkForWarning()
Checks if a given settings contain a potentially dangerous combination of setting values. If so, return a warning message, else - null.

Returns:
warning message or null if there are no warnings.

save

void save()
          throws java.lang.IllegalArgumentException
Saves suite settings. Before saving settings check if these are valid using checkSettingsForError. Setings won't be saved if there are errors. Also settings should be checked for warnings. If there are warnings thouse must be shown to the user to be midp 2.0 spec compliant. If settings saved successfully then notification SuiteStoreListener.notifySuiteSettingsChanged(SuiteInfo suite) is called for all registered listeners.

Throws:
java.lang.IllegalArgumentException - if settings contain errors.

Oracle Java Wireless Client

Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.