de.jtec.beads
Interface Canvas

All Known Implementing Classes:
FileCanvas

public interface Canvas

canvas provides access to content repository

Version:
$Revision:$
Author:
k.pribluda

Method Summary
 java.util.List<java.io.File> beads(java.io.File name)
          list beads directly under specified path
 java.util.List<java.io.File> directories(java.io.File name)
          list silbing directories
 boolean exists(java.io.File name)
          check existence of bead or directory
 boolean exists(java.lang.String name)
          check existence of bead or directrory
 Bead getBead(java.io.File name)
          retrieve bead by file name relative to root
 Bead getBead(java.lang.String name)
          retrieve bead by its name if possible
 java.io.File getRoot()
          root of the canvas
 boolean isBead(java.io.File name)
          check existence of bead
 boolean isBead(java.lang.String name)
          check existence of bead
 boolean isDirectory(java.io.File name)
          chekc existence of directory
 boolean isDirectory(java.lang.String name)
          check existence of directory
 void removeBead(Bead bead)
          remove bead in question
 void removeBead(java.io.File name)
          remove bead designated by file
 void removeBead(java.lang.String name)
          remove bead designated by relative file name
 void saveBead(Bead bead)
          save bead.
 

Method Detail

getBead

Bead getBead(java.lang.String name)
             throws java.io.IOException
retrieve bead by its name if possible

Parameters:
name - name of bead to be retrieved
Returns:
bead or null
Throws:
java.io.IOException

getBead

Bead getBead(java.io.File name)
             throws java.io.IOException
retrieve bead by file name relative to root

Parameters:
name -
Returns:
bead or null
Throws:
java.io.IOException

getRoot

java.io.File getRoot()
root of the canvas

Returns:

saveBead

void saveBead(Bead bead)
              throws java.io.IOException
save bead. name shall be already set

Parameters:
bead -
Throws:
java.io.IOException

removeBead

void removeBead(Bead bead)
                throws java.io.IOException
remove bead in question

Parameters:
bead -
Throws:
java.io.IOException

removeBead

void removeBead(java.io.File name)
                throws java.io.IOException
remove bead designated by file

Parameters:
name -
Throws:
java.io.IOException

removeBead

void removeBead(java.lang.String name)
                throws java.io.IOException
remove bead designated by relative file name

Parameters:
name -
Throws:
java.io.IOException

isBead

boolean isBead(java.lang.String name)
               throws java.io.IOException
check existence of bead

Parameters:
name -
Returns:
Throws:
java.io.IOException

isDirectory

boolean isDirectory(java.lang.String name)
                    throws java.io.IOException
check existence of directory

Parameters:
name -
Returns:
Throws:
java.io.IOException

exists

boolean exists(java.lang.String name)
               throws java.io.IOException
check existence of bead or directrory

Parameters:
name -
Returns:
Throws:
java.io.IOException

isBead

boolean isBead(java.io.File name)
               throws java.io.IOException
check existence of bead

Parameters:
name -
Returns:
Throws:
java.io.IOException

isDirectory

boolean isDirectory(java.io.File name)
                    throws java.io.IOException
chekc existence of directory

Parameters:
name -
Returns:
Throws:
java.io.IOException

exists

boolean exists(java.io.File name)
               throws java.io.IOException
check existence of bead or directory

Parameters:
name -
Returns:
Throws:
java.io.IOException

beads

java.util.List<java.io.File> beads(java.io.File name)
                                   throws java.io.IOException
list beads directly under specified path

Parameters:
name - name of directory in canvas
Returns:
Throws:
java.io.IOException - if specified path does not exist or not a directory

directories

java.util.List<java.io.File> directories(java.io.File name)
                                         throws java.io.IOException
list silbing directories

Parameters:
name - of directory in canvas
Returns:
list of directories relative to specified path
Throws:
java.io.IOException - is specified path does not exist or is not a directory


Copyright © 2007 J-Tec-Team. All Rights Reserved.