pl.mbdev.openstage
Class IppHidden

java.lang.Object
  extended by pl.mbdev.openstage.Xml
      extended by pl.mbdev.openstage.IppHidden

public class IppHidden
extends Xml

Can store key-value pairs that are sent to the server when an IppCommand of type IppCommand.Type.SELECT is used. Hidden fields are invisible for an OpenStage user. They belong to IppScreen object, therefore must be added directly to a screen.

 Copyright 2011 Mateusz Bysiek,
     mb@mbdev.pl, http://mbdev.pl/
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 

Author:
Mateusz Bysiek

Nested Class Summary
static class IppHidden.Type
          Defines possible types of values.
 
Field Summary
private  java.lang.String key
          Key from the key-value pair.
private  IppHidden.Type type
          Value from IppHidden.Type.
 
Constructor Summary
IppHidden(IppHidden.Type type)
          Creates hidden field with default 'Key' and 'Value', for type PHONENUMBER or IPADDRESS.
IppHidden(IppHidden.Type type, java.lang.String key)
          Constructs new hidden field without custom value, but with custom key for phone number or ip address.
IppHidden(IppHidden.Type type, java.lang.String key, java.lang.String value)
          Constructs fully customisable hidden field.
 
Method Summary
protected  java.lang.StringBuffer attributesToXmlString()
          Should be overridden by classes that have some attributes.
 
Methods inherited from class pl.mbdev.openstage.Xml
add, add, addAndReturn, attributeToXml, firstAttributesToXmlString, getContents, getLogicalRoot, getParent, getSubNode, getSubNodeIndex, getSubNodes, getXmlHeader, isEmpty, logicalAdd, sendTo, setContents, setParent, subObjectsCount, subObjectsToXmlString, toXmlString, wrapWithIppItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private final IppHidden.Type type
Value from IppHidden.Type.


key

private final java.lang.String key
Key from the key-value pair.

Constructor Detail

IppHidden

IppHidden(IppHidden.Type type)
Creates hidden field with default 'Key' and 'Value', for type PHONENUMBER or IPADDRESS.

Parameters:
type - any value from IppHidden.Type, but not VALUE

IppHidden

public IppHidden(IppHidden.Type type,
                 java.lang.String key)
Constructs new hidden field without custom value, but with custom key for phone number or ip address.

Parameters:
type - any value from IppHidden.Type, but not VALUE
key - key from key-value pair

IppHidden

public IppHidden(IppHidden.Type type,
                 java.lang.String key,
                 java.lang.String value)
Constructs fully customisable hidden field.

Parameters:
type - any value from IppHidden.Type
key - key from key-value pair
value - custom (hidden) value, used only when type is set to IppHidden.Type.VALUE
Method Detail

attributesToXmlString

protected java.lang.StringBuffer attributesToXmlString()
Description copied from class: Xml
Should be overridden by classes that have some attributes.

Overrides:
attributesToXmlString in class Xml
Returns:
XML-text containing all attributes of the object