Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


oracle.stellent.wcm.core.project.structure
Class SectionTree

java.lang.Object
  extended by oracle.stellent.wcm.core.project.structure.SectionTree


public class SectionTree
extends java.lang.Object

Provide a wrapper around the project SectionType POJO optimized for querying structure


Field Summary
protected  ILog m_log
           
protected  java.util.Map<java.lang.String,SectionNode> m_sectionMap
           
protected  java.util.Map<java.lang.String,java.lang.String> m_sectionPathToId
           
static java.lang.String ROOT_SECTION_ID
           

 

Constructor Summary
SectionTree(oracle.stellent.wcm.core.project.model.RootSectionType rootSectionType)
           

 

Method Summary
 void addRecursiveSection(SectionNode section)
          Add a section and its children to the structure tree
 void addSection(SectionNode section)
          Add a section to this tree
 java.util.Collection<java.lang.String> getChildPaths(java.lang.String path)
           
 SectionNode getRootSection()
           
 oracle.stellent.wcm.core.project.model.RootSectionType getRootSectionType()
           
 SectionNode getSectionByID(java.lang.String identifier)
          Retrieve the section by identifier
 SectionNode getSectionByPath(java.lang.String path)
          Retrieve the section by path
protected  java.util.Map<java.lang.String,SectionNode> getSectionMap()
           
protected  java.util.Map<java.lang.String,java.lang.String> getSectionPathToId()
           
 java.util.List<SectionNode> getSectionsAtLevel(int level)
          Retrieve all the sections at a given level, 0 representing just the Home section
static boolean isLocalFile(java.lang.String file)
          Determine if the file name is a local file
protected  java.lang.String resolvePathToId(java.lang.String path)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ROOT_SECTION_ID

public static final java.lang.String ROOT_SECTION_ID
See Also:
Constant Field Values

m_log

protected ILog m_log

m_sectionMap

protected java.util.Map<java.lang.String,SectionNode> m_sectionMap

m_sectionPathToId

protected java.util.Map<java.lang.String,java.lang.String> m_sectionPathToId

Constructor Detail

SectionTree

public SectionTree(oracle.stellent.wcm.core.project.model.RootSectionType rootSectionType)

Method Detail

getRootSectionType

public oracle.stellent.wcm.core.project.model.RootSectionType getRootSectionType()

addSection

public void addSection(SectionNode section)
Add a section to this tree
Parameters:
section - the section

addRecursiveSection

public void addRecursiveSection(SectionNode section)
Add a section and its children to the structure tree
Parameters:
section - the section

isLocalFile

public static boolean isLocalFile(java.lang.String file)
Determine if the file name is a local file
Parameters:
file - the file name or content ID
Returns:
true if this points to a local file

getSectionByPath

public SectionNode getSectionByPath(java.lang.String path)
Retrieve the section by path
Parameters:
path - the section path
Returns:
the section or null if it does not exist

getSectionByID

public SectionNode getSectionByID(java.lang.String identifier)
Retrieve the section by identifier
Parameters:
identifier - the ID
Returns:
the section or null if it does not exist

getChildPaths

public java.util.Collection<java.lang.String> getChildPaths(java.lang.String path)
Parameters:
path - the parent path (or '/' for root)
Returns:
full paths for all immediate children or empty collection if no children

getRootSection

public SectionNode getRootSection()
Returns:
the root section

getSectionsAtLevel

public java.util.List<SectionNode> getSectionsAtLevel(int level)
Retrieve all the sections at a given level, 0 representing just the Home section
Parameters:
level - the level
Returns:
a list of sections or an empty list if that level is not found

getSectionMap

protected java.util.Map<java.lang.String,SectionNode> getSectionMap()
Returns:
the mapping of Section ID to Section Node

getSectionPathToId

protected java.util.Map<java.lang.String,java.lang.String> getSectionPathToId()
Returns:
the mapping of section path to Section ID

resolvePathToId

protected java.lang.String resolvePathToId(java.lang.String path)
Parameters:
path - the path
Returns:
the ID representing the path or null if not found

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.