net.sourceforge.blogentis.slide
Class SlideService

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
          extended byorg.apache.turbine.services.TurbineBaseService
              extended bynet.sourceforge.blogentis.slide.SlideService
All Implemented Interfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service

public class SlideService
extends org.apache.turbine.services.TurbineBaseService

Author:
abas

Field Summary
static java.lang.String BLOG_NAMESPACE
           
static java.lang.String SERVICE_NAME
           
static java.lang.String SLIDE_TOKEN_NAME
           
 
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Constructor Summary
SlideService()
           
 
Method Summary
 void createCollection(org.apache.slide.common.NamespaceAccessToken nat, org.apache.slide.common.SlideToken token, Blog b, java.lang.String coll)
           
 void createCollection(org.apache.turbine.util.RunData data, Blog b, java.lang.String path)
           
 void deleteObject(org.apache.turbine.util.RunData data, Blog b, java.lang.String path)
          Delete a file or directory from the slide store.
 void endRequest()
           
 org.apache.slide.common.NamespaceAccessToken getAccessToken()
           
 java.util.Set getAllChildren(org.apache.turbine.util.RunData data, Blog b, java.lang.String path, FileResourceFilter filter)
           
 SlideFileResource getFileIfExists(org.apache.turbine.util.RunData data, Blog blog, java.lang.String path)
           
static SlideService getInstance()
           
 java.security.Principal getPrincipal(org.apache.turbine.util.RunData data)
           
 java.lang.String getSlidePath(Blog blog, java.lang.String path, boolean isInternal)
          Map a (Blog,Path) pair to a Slide URI.
 org.apache.slide.common.SlideToken getSlideToken(org.apache.turbine.util.RunData data)
           
 void init()
           
 boolean makeCollection(Blog b, java.lang.String path)
           
 boolean saveFile(Blog b, SlideMemoryFile smf)
           
 void shutdown()
           
 void startRequest()
           
 
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, init
 
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
 
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, setInitableBroker
 

Field Detail

SLIDE_TOKEN_NAME

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

SERVICE_NAME

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

BLOG_NAMESPACE

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

SlideService

public SlideService()
Method Detail

init

public void init()
          throws org.apache.turbine.services.InitializationException
Throws:
org.apache.turbine.services.InitializationException

startRequest

public void startRequest()

endRequest

public void endRequest()

shutdown

public void shutdown()

getInstance

public static SlideService getInstance()

getPrincipal

public java.security.Principal getPrincipal(org.apache.turbine.util.RunData data)

getSlideToken

public org.apache.slide.common.SlideToken getSlideToken(org.apache.turbine.util.RunData data)

getFileIfExists

public SlideFileResource getFileIfExists(org.apache.turbine.util.RunData data,
                                         Blog blog,
                                         java.lang.String path)

getSlidePath

public java.lang.String getSlidePath(Blog blog,
                                     java.lang.String path,
                                     boolean isInternal)
Map a (Blog,Path) pair to a Slide URI.

Parameters:
blog - the blog that this path refers to.
path - the original path;
isInternal - if true, returns the path directly mapping to a slide Node, if false returns the path as seen from an URI.
Returns:
the Slide URI that the path is mapped to.

getAccessToken

public org.apache.slide.common.NamespaceAccessToken getAccessToken()
Returns:
Returns the accessToken.

deleteObject

public void deleteObject(org.apache.turbine.util.RunData data,
                         Blog b,
                         java.lang.String path)
                  throws org.apache.slide.macro.DeleteMacroException
Delete a file or directory from the slide store.

Parameters:
data - the RunData for the current request.
b - the Blog this file belongs to.
path - the file to delete
Throws:
org.apache.slide.macro.DeleteMacroException - if the deletion failed.

getAllChildren

public java.util.Set getAllChildren(org.apache.turbine.util.RunData data,
                                    Blog b,
                                    java.lang.String path,
                                    FileResourceFilter filter)

createCollection

public void createCollection(org.apache.turbine.util.RunData data,
                             Blog b,
                             java.lang.String path)
                      throws java.lang.Exception
Throws:
java.lang.Exception

createCollection

public void createCollection(org.apache.slide.common.NamespaceAccessToken nat,
                             org.apache.slide.common.SlideToken token,
                             Blog b,
                             java.lang.String coll)

saveFile

public boolean saveFile(Blog b,
                        SlideMemoryFile smf)

makeCollection

public boolean makeCollection(Blog b,
                              java.lang.String path)


Copyright © 2003-2004 SourceForge.net. All Rights Reserved.