com.flexive.war.javascript
Class BriefcaseEditor

java.lang.Object
  extended by com.flexive.war.javascript.BriefcaseEditor
All Implemented Interfaces:
java.io.Serializable

public class BriefcaseEditor
extends java.lang.Object
implements java.io.Serializable

JSON/RPC beans for the briefcase navigation page.

Version:
$Rev: 2906 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
BriefcaseEditor()
           
 
Method Summary
 java.lang.String add(long id, long[] itemIds)
          Add the given items to the given briefcase ID.
 java.lang.String create(java.lang.String name)
          Creates a new private briefcase with the given name.
 java.lang.String move(long fromId, long toId, long[] itemIds)
          Moves items between two briefcases.
 java.lang.String remove(long id)
          Delete the briefcase with the given ID.
 java.lang.String removeItems(long id, long[] itemIds)
          Remove the given items from the briefcase with the given ID.
 java.lang.String rename(long id, java.lang.String name)
          Rename a briefcase.
 java.lang.String renderBriefcases()
          Renders all briefcases of the calling user.
 java.lang.String share(long id, long aclId)
          Share a briefcase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BriefcaseEditor

public BriefcaseEditor()
Method Detail

renderBriefcases

public java.lang.String renderBriefcases()
                                  throws java.lang.Exception
Renders all briefcases of the calling user.

Returns:
all briefcases of the calling user (in JSON format).
Throws:
java.lang.Exception - on server-side errors

create

public java.lang.String create(java.lang.String name)
                        throws java.lang.Exception
Creates a new private briefcase with the given name.

Parameters:
name - the briefcase name
Returns:
the briefcase information object (id, name, size, aclId)
Throws:
java.lang.Exception - on server-side errors

remove

public java.lang.String remove(long id)
                        throws java.lang.Exception
Delete the briefcase with the given ID.

Parameters:
id - the briefcase ID
Returns:
nothing
Throws:
java.lang.Exception - if the briefcase could not be deleted

removeItems

public java.lang.String removeItems(long id,
                                    long[] itemIds)
                             throws java.lang.Exception
Remove the given items from the briefcase with the given ID.

Parameters:
id - the briefcase ID
itemIds - the item ids
Returns:
nothing
Throws:
java.lang.Exception - if the briefcase could not be deleted

add

public java.lang.String add(long id,
                            long[] itemIds)
                     throws java.lang.Exception
Add the given items to the given briefcase ID.

Parameters:
id - the briefcase id
itemIds - the item id(s)
Returns:
the briefcase information object (id, name, size, aclId)
Throws:
java.lang.Exception - if the briefcase could not be deleted

rename

public java.lang.String rename(long id,
                               java.lang.String name)
                        throws java.lang.Exception
Rename a briefcase.

Parameters:
id - the briefcase ID
name - the new briefcase name
Returns:
nothing
Throws:
java.lang.Exception - if the briefcase could not be renamed

move

public java.lang.String move(long fromId,
                             long toId,
                             long[] itemIds)
                      throws java.lang.Exception
Moves items between two briefcases.

Parameters:
fromId - the source briefcase ID
toId - the target briefcase ID
itemIds - the ID(s) of the items to be moved
Returns:
the briefcase information as source and destination
Throws:
java.lang.Exception - on errors
Since:
3.1

share

public java.lang.String share(long id,
                              long aclId)
                       throws java.lang.Exception
Share a briefcase.

Parameters:
id - the briefcase ID
aclId - the ACL id. Set to -1 to "un-share" the briefcase.
Returns:
nothing
Throws:
java.lang.Exception - if the briefcase could not be shared