Milyn-Smooks Version 0.4

org.milyn.delivery.http
Class HeaderAction

java.lang.Object
  extended byorg.milyn.delivery.http.HeaderAction
All Implemented Interfaces:
ContentDeliveryUnit

public class HeaderAction
extends java.lang.Object
implements ContentDeliveryUnit

The HeaderAction class performs a HTTP header operation on the content delivery response.

Author:
tfennelly

Field Summary
static int ACTION_ADD
          Add action param value def.
static int ACTION_REMOVE
          Remove action param value def.
 
Constructor Summary
HeaderAction(CDRDef cdrDef)
          Public constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getAction()
          Get the header action.
 java.lang.String getDetailDescription()
          Get a detail (more verbose) description of the Content Delivery Unit and what it does.
 java.lang.String getHeaderName()
          Get the name of the header which is the target of this action.
 java.lang.String getHeaderValue()
          Get the header value for this action if the action is ACTION_ADD.
 java.lang.String getShortDescription()
          Get a short description of the Content Delivery Unit and what it does.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION_ADD

public static final int ACTION_ADD
Add action param value def.

See Also:
Constant Field Values

ACTION_REMOVE

public static final int ACTION_REMOVE
Remove action param value def.

See Also:
Constant Field Values
Constructor Detail

HeaderAction

public HeaderAction(CDRDef cdrDef)
Public constructor.

Parameters:
cdrDef - action cdres instance.
Method Detail

getAction

public int getAction()
Get the header action.

Returns:
ACTION_ADD or ACTION_REMOVE.

getHeaderName

public java.lang.String getHeaderName()
Get the name of the header which is the target of this action.

Returns:
The headerName.

getHeaderValue

public java.lang.String getHeaderValue()
Get the header value for this action if the action is ACTION_ADD.

Returns:
The header value for this action if the action is ACTION_ADD.
Throws:
java.lang.IllegalStateException - Call to getHeaderValue() when the action is not ACTION_ADD.

equals

public boolean equals(java.lang.Object obj)

toString

public java.lang.String toString()

getShortDescription

public java.lang.String getShortDescription()
Description copied from interface: ContentDeliveryUnit
Get a short description of the Content Delivery Unit and what it does.

This description will be used as the short description text in UI tools.
Example: "Unclose EMPTY Element"

Note: Implementations of this method should declare this string statically.

Specified by:
getShortDescription in interface ContentDeliveryUnit
Returns:
Short description String.
See Also:
ContentDeliveryUnit.getDetailDescription()

getDetailDescription

public java.lang.String getDetailDescription()
Description copied from interface: ContentDeliveryUnit
Get a detail (more verbose) description of the Content Delivery Unit and what it does.

This description will be used as the detail description text in UI tools.
Example: "Replace element with an unclosed (badly formed!) equivalent if the element contains no content i.e. is empty. This is required by some older useragents."

Note: Implementations of this method should declare this string statically.

Specified by:
getDetailDescription in interface ContentDeliveryUnit
Returns:
Detail description String.
See Also:
ContentDeliveryUnit.getShortDescription()

Milyn-Smooks Version 0.4