Class PModeProperty
java.lang.Object
com.helger.phase4.model.pmode.leg.PModeProperty
- All Implemented Interfaces:
com.helger.commons.name.IHasName,com.helger.commons.state.IMandatoryIndicator,com.helger.commons.text.IHasDescription,Serializable
@NotThreadSafe
@MustImplementEqualsAndHashcode
public class PModeProperty
extends Object
implements com.helger.commons.name.IHasName, com.helger.commons.text.IHasDescription, com.helger.commons.state.IMandatoryIndicator, Serializable
A property is a data structure that consists of four values: the property
name, which can be used as an identifier of the property (e.g. a required
property named "messagetype" can be noted as:
Properties[messagetype].required="true"); the property
description; the property data type; and a Boolean value, indicating whether
the property is expected or optional, within the User message. This parameter
controls the contents of the element
eb:Messaging/eb:UserMessage/eb:MessageProperties.- Author:
- Philip Helger
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPModeProperty(String sName, String sDescription, String sDataType, com.helger.commons.state.EMandatory eMandatory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal Stringfinal StringThe PMode property description.final StringgetName()The PMode property name.inthashCode()final booleanfinal booleanfinal com.helger.commons.state.EChangesetDataType(String sDataType) Set the property data type.final com.helger.commons.state.EChangesetDescription(String sDescription) Set the description.final com.helger.commons.state.EChangesetMandatory(boolean bMandatory) Set the property mandatory or optional.final com.helger.commons.state.EChangesetMandatory(com.helger.commons.state.EMandatory eMandatory) Set the property mandatory or optional.final com.helger.commons.state.EChangeSet the property name.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.text.IHasDescription
hasDescriptionMethods inherited from interface com.helger.commons.state.IMandatoryIndicator
and, or
-
Field Details
-
DATA_TYPE_STRING
- See Also:
-
DEFAULT_MANDATORY
public static final boolean DEFAULT_MANDATORY- See Also:
-
-
Constructor Details
-
PModeProperty
public PModeProperty() -
PModeProperty
-
-
Method Details
-
getName
The PMode property name.- Specified by:
getNamein interfacecom.helger.commons.name.IHasName
-
setName
Set the property name.- Parameters:
sName- Property name. May neither benullnor empty.- Returns:
EChange- Since:
- 0.12.0
-
getDescription
The PMode property description.- Specified by:
getDescriptionin interfacecom.helger.commons.text.IHasDescription
-
setDescription
@Nonnull public final com.helger.commons.state.EChange setDescription(@Nullable String sDescription) Set the description.- Parameters:
sDescription- The description. May benull.- Returns:
EChange
-
getDataType
- Returns:
- The PMode property data type. May neither be
nullnor empty.
-
setDataType
@Nonnull public final com.helger.commons.state.EChange setDataType(@Nonnull @Nonempty String sDataType) Set the property data type.- Parameters:
sDataType- Property data type. May neither benullnor empty.- Returns:
EChange- Since:
- 0.12.0
-
isMandatory
public final boolean isMandatory()- Specified by:
isMandatoryin interfacecom.helger.commons.state.IMandatoryIndicator- Returns:
trueif the PMode property is mandatory,falseif it is optional.
-
isOptional
public final boolean isOptional()- Specified by:
isOptionalin interfacecom.helger.commons.state.IMandatoryIndicator- Returns:
trueif the PMode property is optional,falseif it is mandatory.
-
setMandatory
@Nonnull public final com.helger.commons.state.EChange setMandatory(@Nonnull com.helger.commons.state.EMandatory eMandatory) Set the property mandatory or optional.- Parameters:
eMandatory- Property mandatory state. May not benull.- Returns:
EChange- Since:
- 0.12.0
-
setMandatory
Set the property mandatory or optional.- Parameters:
bMandatory-truefor mandatory,falsefor optional.- Returns:
EChange- Since:
- 0.12.0
-
equals
-
hashCode
public int hashCode() -
toString
-