Class OptionModelStub
java.lang.Object
de.mid.innovator.m2msdk.model.option.OptionModelStub
- All Implemented Interfaces:
OptionModelInterface,Serializable,Remote
Stub class living on client side and always forwarding the calls to the
server.
- Version:
- 10.1.1
- Author:
- jmback
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd valid values for an existing option.booleanexistsOption(String key) Checks if option with key exists in this option model or in any imported option model.booleangetBooleanOption(String key) Get the value of a boolean option.org.jdom2.DocumentGet content of option model as a document.Get key for existing option from this option model or top option model.Get name for existing option in this option model or in any imported option model.getNames()Get names for all existing (non-internal) options of this model and imported models.Get the value of an option from this option model or from any imported option model.getStringOption(String key) Get the value of a string option from this option model or from any imported option model.booleanHas option model content changed since last save or load?importOption(org.jdom2.Document doc) Import the option model given as document into this option model and return the imported option model.voidinitialize(org.jdom2.Document text) Initialize option model from the XML text.voidremoveOption(String iKey) Remove the option with this key from the option model.voidsetDescription(String iKey, String sDescription) Set the description of the option with the given key.voidsetInternal(String iKey, boolean bInternal) Set the option with the given key to be internalvoidCreate a new option or modify the properties of an option.
-
Constructor Details
-
OptionModelStub
-
-
Method Details
-
existsOption
Description copied from interface:OptionModelInterfaceChecks if option with key exists in this option model or in any imported option model.- Specified by:
existsOptionin interfaceOptionModelInterface- Parameters:
key-- Returns:
- true if the option exists
- Throws:
M2MExceptionRemoteException
-
getBooleanOption
Description copied from interface:OptionModelInterfaceGet the value of a boolean option.- Specified by:
getBooleanOptionin interfaceOptionModelInterface- Parameters:
key- key of the option- Returns:
- value value of the option, if the option has been set
- Throws:
RemoteExceptionM2MException
-
getNames
Description copied from interface:OptionModelInterfaceGet names for all existing (non-internal) options of this model and imported models.- Specified by:
getNamesin interfaceOptionModelInterface- Returns:
- List of names.
- Throws:
M2MExceptionRemoteException
-
getKey
Description copied from interface:OptionModelInterfaceGet key for existing option from this option model or top option model.- Specified by:
getKeyin interfaceOptionModelInterface- Parameters:
iKey- string key of option- Returns:
- option key
- Throws:
M2MExceptionRemoteException
-
getOption
Description copied from interface:OptionModelInterfaceGet the value of an option from this option model or from any imported option model.- Specified by:
getOptionin interfaceOptionModelInterface- Parameters:
key- key of the option- Returns:
- value value of the option, if the option has been set
- Throws:
M2MExceptionRemoteException
-
getStringOption
Description copied from interface:OptionModelInterfaceGet the value of a string option from this option model or from any imported option model.- Specified by:
getStringOptionin interfaceOptionModelInterface- Parameters:
key- key of the option- Returns:
- value
- Throws:
M2MExceptionRemoteException
-
initialize
Description copied from interface:OptionModelInterfaceInitialize option model from the XML text.- Specified by:
initializein interfaceOptionModelInterface- Parameters:
text- XML text containing the configuration of a option model.- Throws:
M2MExceptionRemoteException
-
getDocument
Description copied from interface:OptionModelInterfaceGet content of option model as a document. Only non-internal options are saved. Only the options in this option model are saved, not from the imported. Important side effect: The option model is marked as unchanged because it is assumed that the reading into a document is used to save the model.- Specified by:
getDocumentin interfaceOptionModelInterface- Returns:
- XML document containing the content of the option model
- Throws:
M2MExceptionRemoteException
-
setOption
Description copied from interface:OptionModelInterfaceCreate a new option or modify the properties of an option.- Specified by:
setOptionin interfaceOptionModelInterface- Parameters:
key- Key of optionvalue- Value of option- Throws:
M2MExceptionRemoteException
-
addValues
Description copied from interface:OptionModelInterfaceAdd valid values for an existing option.- Specified by:
addValuesin interfaceOptionModelInterface- Parameters:
iKey- key of optionlistValue- list of allowed values for the option, empty list means all values are allowed- Throws:
M2MExceptionRemoteException
-
hasChanged
Description copied from interface:OptionModelInterfaceHas option model content changed since last save or load?- Specified by:
hasChangedin interfaceOptionModelInterface- Returns:
- true, if the content of the model has changed.
- Throws:
M2MExceptionRemoteException
-
importOption
public OptionModelInterface importOption(org.jdom2.Document doc) throws M2MException, RemoteException Description copied from interface:OptionModelInterfaceImport the option model given as document into this option model and return the imported option model. If there is already an imported model, reload it from document. If no document is given, simply return the imported option model. If there is an option model, then any later read access to an option will be forwarded to the imported model,if the option is not in the option model.- Specified by:
importOptionin interfaceOptionModelInterface- Parameters:
doc- document describing the imported option model, maybe null to not import a new model but to only get the imported model- Returns:
- imported option model
- Throws:
M2MExceptionRemoteException
-
removeOption
Description copied from interface:OptionModelInterfaceRemove the option with this key from the option model.- Specified by:
removeOptionin interfaceOptionModelInterface- Parameters:
iKey- key of option- Throws:
M2MExceptionRemoteException
-
getName
Description copied from interface:OptionModelInterfaceGet name for existing option in this option model or in any imported option model.- Specified by:
getNamein interfaceOptionModelInterface- Parameters:
iKey- string key of option- Returns:
- option name
- Throws:
M2MExceptionRemoteException
-
setInternal
Description copied from interface:OptionModelInterfaceSet the option with the given key to be internal- Specified by:
setInternalin interfaceOptionModelInterface- Parameters:
iKey- key of optionbInternal- true means internal. An option already set to internal cannot be set external again.- Throws:
M2MExceptionRemoteException
-
setDescription
Description copied from interface:OptionModelInterfaceSet the description of the option with the given key.- Specified by:
setDescriptionin interfaceOptionModelInterface- Parameters:
iKey- key of optionsDescription- new description- Throws:
M2MExceptionRemoteException
-