Class PModePayloadProfile
java.lang.Object
com.helger.phase4.model.pmode.leg.PModePayloadProfile
- All Implemented Interfaces:
com.helger.commons.name.IHasName,com.helger.commons.state.IMandatoryIndicator,Serializable
@NotThreadSafe
@MustImplementEqualsAndHashcode
public class PModePayloadProfile
extends Object
implements com.helger.commons.name.IHasName, com.helger.commons.state.IMandatoryIndicator, Serializable
A payload part is a data structure that consists of five properties: name (or
Content-ID) that is the part identifier, and can be used as an index in the
notation PayloadProfile[]; MIME data type (
text/xml,
application/pdf, etc.); name of the applicable XML Schema file
if the MIME data type is text/xml; maximum size in kilobytes; and a Boolean
value indicating whether the part is expected or optional, within the User
message. The message payload(s) must match this profile.- Author:
- Philip Helger
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPModePayloadProfile(String sName, com.helger.commons.mime.IMimeType aMimeType, String sXSDFilename, Integer aMaxSizeKB, com.helger.commons.state.EMandatory eMandatory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal Integerfinal com.helger.commons.mime.IMimeTypefinal StringgetName()The PMode payload profile name.final StringinthashCode()final booleanfinal booleanfinal booleanfinal booleanfinal com.helger.commons.state.EChangesetMandatory(boolean bMandatory) Set the payload mandatory or optional.final com.helger.commons.state.EChangesetMandatory(com.helger.commons.state.EMandatory eMandatory) Set the payload mandatory or optional.final com.helger.commons.state.EChangesetMaxSizeKB(int nMaxSizeKB) Set the maximum size in kilobytes.final com.helger.commons.state.EChangesetMaxSizeKB(Integer aMaxSizeKB) Set the maximum size in kilobytes.final com.helger.commons.state.EChangesetMimeType(com.helger.commons.mime.IMimeType aMimeType) Set the MIME type.final com.helger.commons.state.EChangeSet the name.final com.helger.commons.state.EChangesetXSDFilename(String sXSDFilename) Set the XML Schema filename.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.state.IMandatoryIndicator
and, or
-
Field Details
-
DEFAULT_MANDATORY
public static final boolean DEFAULT_MANDATORY- See Also:
-
-
Constructor Details
-
PModePayloadProfile
public PModePayloadProfile() -
PModePayloadProfile
-
-
Method Details
-
getName
The PMode payload profile name.- Specified by:
getNamein interfacecom.helger.commons.name.IHasName
-
setName
Set the name.- Parameters:
sName- The new name. May neither benullnor empty.- Returns:
EChange- Since:
- 0.12.0
-
getMimeType
- Returns:
- The MIME type. Never
null.
-
setMimeType
@Nonnull public final com.helger.commons.state.EChange setMimeType(@Nonnull com.helger.commons.mime.IMimeType aMimeType) Set the MIME type.- Parameters:
aMimeType- The new MIME type. May not benull.- Returns:
EChange- Since:
- 0.12.0
-
getXSDFilename
- Returns:
- The name of the XML Schema filename to apply. May be
null.
-
hasXSDFilename
public final boolean hasXSDFilename()- Returns:
trueif an XML Schema filename is present,falseif not.
-
setXSDFilename
@Nonnull public final com.helger.commons.state.EChange setXSDFilename(@Nullable String sXSDFilename) Set the XML Schema filename.- Parameters:
sXSDFilename- The new XML Schema filename. May benull.- Returns:
EChange- Since:
- 0.12.0
-
getMaxSizeKB
- Returns:
- The maximum size in kilobyte or
null.
-
hasMaxSizeKB
public final boolean hasMaxSizeKB()- Returns:
trueif a maximum size in kilobyte is present,falseif not.
-
setMaxSizeKB
Set the maximum size in kilobytes.- Parameters:
aMaxSizeKB- The maximum size in kilobytes. May benull.- Returns:
EChange- Since:
- 0.12.0
-
setMaxSizeKB
Set the maximum size in kilobytes.- Parameters:
nMaxSizeKB- The maximum size in kilobytes.- Returns:
EChange- Since:
- 0.12.0
-
isMandatory
public final boolean isMandatory()- Specified by:
isMandatoryin interfacecom.helger.commons.state.IMandatoryIndicator- Returns:
trueif the part is mandatory,falseif it is optional.
-
isOptional
public final boolean isOptional()- Specified by:
isOptionalin interfacecom.helger.commons.state.IMandatoryIndicator- Returns:
trueif the part 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 payload mandatory or optional.- Parameters:
eMandatory- Payload mandatory state. May not benull.- Returns:
EChange- Since:
- 0.12.0
-
setMandatory
Set the payload mandatory or optional.- Parameters:
bMandatory-truefor mandatory,falsefor optional.- Returns:
EChange- Since:
- 0.12.0
-
equals
-
hashCode
public int hashCode() -
toString
-