FileDocCategorySizeDatePackage
Disposition.javaAPI DocApache James 2.3.15185Fri Jan 12 12:56:34 GMT 2007org.apache.james.util.mail.mdn

Disposition

public class Disposition extends Object
Class Disposition encapsulating disposition information as defined by RFC 2298.

Fields Summary
private DispositionActionMode
fieldActionMode
private DispositionSendingMode
fieldSendingMode
private DispositionType
fieldDispositionType
private DispositionModifier[]
fieldDispositionModifiers
Constructors Summary
private Disposition()
Default Construcor

        super();
    
public Disposition(DispositionActionMode actionMode, DispositionSendingMode sendingMode, DispositionType type)
Constructor.

param
actionMode
param
sendingMode
param
type

        this();
        setActionMode(actionMode);
        setSendingMode(sendingMode);
        setDispositionType(type);
    
public Disposition(DispositionActionMode actionMode, DispositionSendingMode sendingMode, DispositionType type, DispositionModifier[] modifiers)
Constructor.

param
actionMode
param
sendingMode
param
type
param
modifiers

        this(actionMode, sendingMode, type);
        setDispositionModifiers(modifiers);
    
Methods Summary
protected DispositionActionModegetActionMode()
Answer the Disposition Mode.

return
Returns the dispostionMode.

        return fieldActionMode;
    
protected DispositionModifier[]getDispositionModifiers()
Answer the Disposition Modifiers.

return
Returns the dispostionModifiers.

        return fieldDispositionModifiers;
    
protected DispositionTypegetDispositionType()
Answer the Disposition Type.

return
Returns the dispostionType.

        return fieldDispositionType;
    
protected DispositionSendingModegetSendingMode()
Answer the Sending Mode.

return
Returns the sendingMode.

        return fieldSendingMode;
    
protected voidsetActionMode(DispositionActionMode dispostionMode)
Set the Disposition Mode.

param
dispostionMode The dispostionMode to set.

        fieldActionMode = dispostionMode;
    
protected voidsetDispositionModifiers(DispositionModifier[] dispostionModifiers)
Set the Disposition Modifiers.

param
dispostionModifiers The dispostionModifiers to set.

        fieldDispositionModifiers = dispostionModifiers;
    
protected voidsetDispositionType(DispositionType dispostionType)
Set the Disposition Type.

param
dispostionType The dispostionType to set.

        fieldDispositionType = dispostionType;
    
protected voidsetSendingMode(DispositionSendingMode sendingMode)
Set the Sending Mode.

param
sendingMode The sendingMode to set.

        fieldSendingMode = sendingMode;
    
public java.lang.StringtoString()

see
java.lang.Object#toString()

        StringBuffer buffer = new StringBuffer(64);
        buffer.append("Disposition: ");
        buffer.append(getActionMode() == null ? "" : getActionMode().toString());
        buffer.append('/");
        buffer.append(getSendingMode() == null ? "" : getSendingMode().toString());
        buffer.append(';");
        buffer.append(getDispositionType() == null ? "" : getDispositionType().toString());
        if (null != getDispositionModifiers()
                && getDispositionModifiers().length > 0)
        {
            buffer.append('/");
            for (int i = 0; i < getDispositionModifiers().length; i++)
            {
                if (i > 0)
                    buffer.append(',");
                buffer.append(getDispositionModifiers()[i]);
            }
        }
        return buffer.toString();