com.plumtree.portaluiinfrastructure.tags.xml
Interface IMarkupFragment

All Known Implementing Classes:
TransformerMarkupFragment

public interface IMarkupFragment

This interface is used to access data in a markup fragment. IMPORTANT: DO NOT ADD ANY SETTERS to the IMarkupFragment interface! i.e. do NOT add a method like SetFragmentValue(...) A shallow copy of markup array is put into the portlet content cache. This means that if an actual object (i.e. MarkupFragment) that's inside the array changes in PostProcess, then what's inside the cache changes as well! So instead of having setters on a MarkupFragment, in PostProcess we create new MarkupFragments and place them into the array that will be returned to the UI. This assures that the cached markup array will not be affected by PostProcess.


Method Summary
 java.lang.Object GetFragment()
          Get the fragment.
 int GetFragmentType()
           
 java.lang.String GetStringFragment()
          Get the string fragment.
 IXMLFragment GetXMLFragment()
          Get the xml fragment.
 

Method Detail

GetFragmentType

int GetFragmentType()
Returns:
int The fragment type (should be from PT_MARKUP_FRAGMENT_TYPES).

GetStringFragment

java.lang.String GetStringFragment()
Get the string fragment. This can only be called for Fragments of type PTMarkupFragmentTypes.PT_MARKUP_FRAGMENT_TYPE_FINISHED.

Returns:
the String.
Throws:
XPFormatException - if the fragment is of the wrong type.

GetXMLFragment

IXMLFragment GetXMLFragment()
Get the xml fragment. This can only be called for Fragments of type PTMarkupFragmentTypes.PT_MARKUP_FRAGMENT_TYPE_PT_XML.

Returns:
the XML Fragment.
Throws:
XPFormatException - if the fragment is of the wrong type.

GetFragment

java.lang.Object GetFragment()
Get the fragment. This can be called for any type of Fragment.

Returns:
The underlying fragment object.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.