Class FolderViewWidgetTransform

  • All Implemented Interfaces:
    AppTransform, LayoutTransform, Transform

    public class FolderViewWidgetTransform
    extends FolderViewTransform
    This class provides additional methods related to folder browsing used to populate a Folder Browsing service. Many of these methods will disappear once the layout file enhancements are implemented.
    Since:
    MicroStrategy Web 9.0.0
    • Field Detail

      • FP_INCLUDE_ANCESTOR_INFO

        public final java.lang.String FP_INCLUDE_ANCESTOR_INFO
        Constant specifying the name of the formal parameter for defining the folder widget to include ancestor information for this folder. true means to include. false means to exlude.
        See Also:
        Constant Field Values
      • includeAncestorInfo

        public FormalParameter includeAncestorInfo
        Indicates the identifier to use to determine whether the ancestor information of folder should be included in folder widget. The default value is true.
      • FP_INCLUDE_OWNER_INFO

        public final java.lang.String FP_INCLUDE_OWNER_INFO
        Constant specifying the name of the formal parameter for defining the folder widget to include owner information for the item in this folder. true means to include. false means to exlude.
        See Also:
        Constant Field Values
      • includeOwnerInfo

        public FormalParameter includeOwnerInfo
        Indicates the identifier to use to determine whether the owner information of folder item should be included in folder widget. The default value is true.
      • FP_INCLUDE_TIME_INFO

        public final java.lang.String FP_INCLUDE_TIME_INFO
        Constant specifying the name of the formal parameter for defining the folder widget to include time information for the item in this folder. true means to include. false means to exlude.
        See Also:
        Constant Field Values
      • includeTimeInfo

        public FormalParameter includeTimeInfo
        Indicates the identifier to use to determine whether the time information of folder item should be included in folder widget. The default value is true.
      • FP_INCLUDE_FOLDER_INFO

        public final java.lang.String FP_INCLUDE_FOLDER_INFO
        Constant specifying the name of the formal parameter for defining the folder widget to include 'folder' property for in this folder. true means to include. false means to exlude.
        See Also:
        Constant Field Values
      • includeFolderInfo

        public FormalParameter includeFolderInfo
        Indicates the identifier to use to determine whether the time information of folder item should be included in folder widget. The default value is true.
      • FP_ATT_FORMS

        public final java.lang.String FP_ATT_FORMS
        Constant specifying the name of the formal parameter for how to include the forms information for the attribute object in the folder. refer to EnumWebDisplayedForms. When the value is -1, that means no forms to include.
        See Also:
        Constant Field Values
      • FP_SORTED_ITEMS

        public final java.lang.String FP_SORTED_ITEMS
        Constant specifying the name of the formal parameter for whether to render the items in a sorted manner or not
        See Also:
        Constant Field Values
      • sortedItems

        public FormalParameter sortedItems
        Indicates whether to render the items in a sorted order or not If the value is true, then the items will be rendered as sorted; if false then unsorted.
      • inTreeStructure

        public FormalParameter inTreeStructure
        Indicates whether to render the items in tree structures.
      • FP_SHOW_OBJECT_TAGS

        public static final java.lang.String FP_SHOW_OBJECT_TAGS
        See Also:
        Constant Field Values
    • Constructor Detail

      • FolderViewWidgetTransform

        public FolderViewWidgetTransform()
    • Method Detail

      • renderShell

        public void renderShell​(MarkupOutput out)
        Overrides the default "shell" created when the transform is invoked. Ideally, it would be better if we could initialize this transform with a field that indicates whether the HTML shell is created or not. In this way, subclasses can merely override this property (perhaps in their constructor) and affect how the renderShell method is invoked. Alternatively, the renderShell can be structured as a Template method to allow subclasses to easily override those methods that they do not want called.
        Overrides:
        renderShell in class AbstractAppTransform
        Parameters:
        out - The MarkupOutput representing the generated content.
      • getFolderSize

        public int getFolderSize()
        Returns the size of the folder, regardless of the incremental fetch settings.
        Returns:
        The total number of children in this folder.
      • getMainFolderTreeLocation

        public java.lang.String getMainFolderTreeLocation()
      • getAncestors

        public java.util.List getAncestors()
        Returns a flattened enumeration of ancestors.
        Returns:
        An Enumeration of FlattenedTreeNode objects.
      • hasAncestor

        public boolean hasAncestor()
      • buildAncestorTree

        public static FolderViewWidgetTransform.Tree buildAncestorTree​(FolderBean fBean,
                                                                       WebFolder searchRoot)
        Build Ancestor tree for a given folder
        Parameters:
        fBean - The bean to represent the folder, which this method will try to generate its ancestor tree
        searchRoot - The root folder of the search object, if the folder represented by fBean is a search result. This parameter will be null, if fBean is not a search result.
        Returns:
        Returns FolderViewWidgetTransform.Tree to represent the ancestor tree
      • trimAncetors

        public static void trimAncetors​(SimpleList ancestors)
      • getSearchXML

        public java.lang.String getSearchXML()
      • getSearchFlags

        public java.lang.String getSearchFlags()
      • getSearchDataSources

        public java.lang.String getSearchDataSources()
      • getSearchTypes

        public java.lang.String getSearchTypes()
      • getFolderWidget

        public Block getFolderWidget​(java.lang.String styleName)
      • includeAncestorInfo

        public boolean includeAncestorInfo()
      • includeTimeInfo

        public boolean includeTimeInfo()
      • includeOwnerInfo

        public boolean includeOwnerInfo()
      • includeFolderInfo

        public boolean includeFolderInfo()
      • inTreeStructure

        public boolean inTreeStructure()
      • getAttForms

        public java.util.List getAttForms​(WebAttribute att)
        returns the attribute forms for the attribute
        Parameters:
        att -
      • getItemsList

        public java.util.List getItemsList()
      • getBlockCount

        public int getBlockCount()
      • getBlockBegin

        public int getBlockBegin()
      • getSearchMatchCase

        public boolean getSearchMatchCase()
      • getSelf

        public java.lang.Object getSelf​(java.lang.Object obj)
        Returns the input argument as return value. This method is used in layout when one base value needs to assign to another base value. For example, we have base "obj", then when the type of "obj" is a certain value, we would like base "obj2" equals to "obj". Then in layout we can have . After this, obj2 points to the same object as "obj" points to.
        Parameters:
        obj - object to return
        Returns:
        Returns the input argument.
      • isNull

        public boolean isNull​(java.lang.Object obj)
        Returns whether the input argument is null.
        Parameters:
        obj - The object to check again null
        Returns:
        true if the input is null, otherwise false is returned.
      • isShowObjectTags

        public boolean isShowObjectTags()