Class PModePayloadProfile
java.lang.Object
com.helger.phase4.model.pmode.leg.PModePayloadProfile
- All Implemented Interfaces:
com.helger.base.name.IHasName,com.helger.base.state.IMandatoryIndicator,Serializable
@NotThreadSafe
@MustImplementEqualsAndHashcode
public class PModePayloadProfile
extends Object
implements com.helger.base.name.IHasName, com.helger.base.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.mime.IMimeType aMimeType, String sXSDFilename, Integer aMaxSizeKB, com.helger.base.state.EMandatory eMandatory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal Integerfinal com.helger.mime.IMimeTypefinal StringgetName()The PMode payload profile name.final StringinthashCode()final booleanfinal booleanfinal booleanfinal booleanfinal com.helger.base.state.EChangesetMandatory(boolean bMandatory) Set the payload mandatory or optional.final com.helger.base.state.EChangesetMandatory(com.helger.base.state.EMandatory eMandatory) Set the payload mandatory or optional.final com.helger.base.state.EChangesetMaxSizeKB(int nMaxSizeKB) Set the maximum size in kilobytes.final com.helger.base.state.EChangesetMaxSizeKB(Integer aMaxSizeKB) Set the maximum size in kilobytes.final com.helger.base.state.EChangesetMimeType(com.helger.mime.IMimeType aMimeType) Set the MIME type.final com.helger.base.state.EChangeSet the name.final com.helger.base.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.base.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.base.name.IHasName
-
setName
Set the name.- Parameters:
sName- The new name. May neither benullnor empty.- Returns:
EChange- Since:
- 0.12.0
-
getMimeType
@Nonnull public final com.helger.mime.IMimeType getMimeType()- Returns:
- The MIME type. Never
null.
-
setMimeType
@Nonnull public final com.helger.base.state.EChange setMimeType(@Nonnull com.helger.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
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
@Nonnull public final com.helger.base.state.EChange setMaxSizeKB(int nMaxSizeKB) 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.base.state.IMandatoryIndicator- Returns:
trueif the part is mandatory,falseif it is optional.
-
isOptional
public final boolean isOptional()- Specified by:
isOptionalin interfacecom.helger.base.state.IMandatoryIndicator- Returns:
trueif the part is optional,falseif it is mandatory.
-
setMandatory
@Nonnull public final com.helger.base.state.EChange setMandatory(@Nonnull com.helger.base.state.EMandatory eMandatory) Set the payload mandatory or optional.- Parameters:
eMandatory- Payload mandatory state. May not benull.- Returns:
EChange- Since:
- 0.12.0
-
setMandatory
@Nonnull public final com.helger.base.state.EChange setMandatory(boolean bMandatory) Set the payload mandatory or optional.- Parameters:
bMandatory-truefor mandatory,falsefor optional.- Returns:
EChange- Since:
- 0.12.0
-
equals
-
hashCode
public int hashCode() -
toString
-