org.springframework.extensions.webscripts
Class PathImpl

java.lang.Object
  extended by org.springframework.extensions.webscripts.PathImpl
All Implemented Interfaces:
Path

public class PathImpl
extends Object
implements Path

Basic implementation of a Web Script Path Used for package & url trees.

Author:
davidc

Constructor Summary
PathImpl(String path)
          Construct
 
Method Summary
 void addScript(WebScript script)
          Associate Web Script with Path
static String concatPath(String path1, String path2)
          Helper to concatenate paths
 PathImpl createChildPath(String path)
          Create a Child Path
 Path[] getChildren()
          Gets the child paths
 String getName()
          Gets the name of the path (last path segment)
 Path getParent()
          Gets the parent path
 String getPath()
          Gets the full path
 WebScript[] getScripts()
          Gets Web Scripts associated with this path
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathImpl

public PathImpl(String path)
Construct

Parameters:
path -
Method Detail

concatPath

public static String concatPath(String path1,
                                String path2)
Helper to concatenate paths

Parameters:
path1 -
path2 -
Returns:
concatenated path

createChildPath

public PathImpl createChildPath(String path)
Create a Child Path

Parameters:
path - child path name
Returns:
child path

addScript

public void addScript(WebScript script)
Associate Web Script with Path

Parameters:
script -

getChildren

public Path[] getChildren()
Description copied from interface: Path
Gets the child paths

Specified by:
getChildren in interface Path
Returns:
child paths

getScripts

public WebScript[] getScripts()
Description copied from interface: Path
Gets Web Scripts associated with this path

Specified by:
getScripts in interface Path
Returns:
web scripts

getName

public String getName()
Description copied from interface: Path
Gets the name of the path (last path segment)

Specified by:
getName in interface Path
Returns:
name

getParent

public Path getParent()
Description copied from interface: Path
Gets the parent path

Specified by:
getParent in interface Path
Returns:
path

getPath

public String getPath()
Description copied from interface: Path
Gets the full path

Specified by:
getPath in interface Path
Returns:
path

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 SpringSource, Inc. All Rights Reserved.