|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.portal.coplets.basket.BasketManagerImpl
public class BasketManagerImpl
This is the implementation of the basket manager
Nested Class Summary | |
---|---|
protected static class |
BasketManagerImpl.BatchInfo
|
static class |
BasketManagerImpl.Job
|
Nested classes/interfaces inherited from interface org.apache.cocoon.portal.coplets.basket.BasketManager |
---|
BasketManager.ActionInfo |
Field Summary | |
---|---|
protected List |
basketActions
All actions for a basket |
protected String |
basketClassName
The class name of the basket |
protected List |
batches
All batches |
protected List |
briefcaseActions
All actions for a briefcase |
protected String |
briefcaseClassName
The class name of the briefcase |
protected Context |
context
The component context |
protected String |
directory
The configuration for storing baskets |
protected String |
folderClassName
The class name of the folder |
protected ServiceManager |
manager
The service manager |
protected JobScheduler |
scheduler
Scheduler |
Fields inherited from interface org.apache.cocoon.portal.coplets.basket.BasketManager |
---|
ALL_BRIEFCASES_KEY, BASKET_KEY, BRIEFCASE_KEY, FOLDER_KEY, ROLE |
Constructor Summary | |
---|---|
BasketManagerImpl()
|
Method Summary | |
---|---|
void |
addBatch(ContentItem item,
int frequencyInDays,
BasketManager.ActionInfo action)
|
void |
contextualize(Context context)
|
protected void |
deleteContentStore(String type,
String userId)
Delete the content store for a user |
void |
dispose()
|
Basket |
getBasket()
Return the basket of the current user |
BasketManager.ActionInfo |
getBasketAction(String name)
Get the info |
List |
getBasketActions()
Return all configured actions for a basket - this is a list of BasketManager.ActionInfo s. |
Briefcase |
getBriefcase()
Return the briefcase of the current user |
BasketManager.ActionInfo |
getBriefcaseAction(String name)
Get the info |
List |
getBriefcaseActions()
Return all configured actions for a briefcase - this is a list of BasketManager.ActionInfo s. |
List |
getBriefcaseDescriptions()
Return all briefcases. |
Folder |
getFolder()
Return the folder of the current user |
protected String |
getUser()
Get the current user |
void |
inform(ContentStoreEvent event,
PortalService service)
|
void |
initialize()
|
protected List |
loadBriefcases()
Get briefcases of all users |
protected ContentStore |
loadContentStore(String type)
Load a content store |
protected ContentStore |
loadContentStore(String type,
String userId)
Load the content store for a single user |
void |
parameterize(Parameters parameters)
|
protected void |
processAddItemEvent(AddItemEvent event)
This method processes adding one item to a content store |
protected void |
processCleanBriefcaseEvent(CleanBriefcaseEvent event,
Session session)
Cleaning a briefcase or all |
protected void |
processRemoveItemEvent(RemoveItemEvent event)
This method processes removing one item from a content store |
protected void |
processShowBasketEvent(ShowBasketEvent event,
Session session)
Show the selected basket |
protected void |
processShowItemEvent(ShowItemEvent event)
Show one item of the basket |
protected void |
processUploadItemEvent(UploadItemEvent event)
Process an upload and add the item to the content store |
protected void |
saveContentStore(ContentStore store)
Save the content store if it is a briefcase or a folder |
protected void |
saveContentStore(String type,
ContentStore store)
Save the content store for a single user |
protected BasketManagerImpl.BatchInfo |
searchBatchInfo(ContentItem item,
BasketManager.ActionInfo info)
|
void |
service(ServiceManager manager)
|
void |
update(ContentStore store)
Update/save the content store |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ServiceManager manager
protected Context context
protected String directory
protected String basketClassName
protected String briefcaseClassName
protected String folderClassName
protected List basketActions
protected List briefcaseActions
protected List batches
protected JobScheduler scheduler
Constructor Detail |
---|
public BasketManagerImpl()
Method Detail |
---|
public void parameterize(Parameters parameters) throws ParameterException
parameterize
in interface Parameterizable
ParameterException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void dispose()
dispose
in interface Disposable
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void inform(ContentStoreEvent event, PortalService service)
Receiver
protected void processUploadItemEvent(UploadItemEvent event)
event
- The event triggering the actionprotected void processShowItemEvent(ShowItemEvent event)
event
- The event triggering the actionprotected void processShowBasketEvent(ShowBasketEvent event, Session session)
protected void processCleanBriefcaseEvent(CleanBriefcaseEvent event, Session session)
event
- The triggering eventsession
- The sessionprotected void processRemoveItemEvent(RemoveItemEvent event)
event
- The event triggering the actionprotected void processAddItemEvent(AddItemEvent event)
event
- The event triggering the actionprotected void saveContentStore(ContentStore store)
protected ContentStore loadContentStore(String type, String userId)
type
- The type of the content store (briefcase or folder)
protected ContentStore loadContentStore(String type)
type
- The type of the content store (briefcase or folder)protected void deleteContentStore(String type, String userId)
protected void saveContentStore(String type, ContentStore store)
protected List loadBriefcases()
public Basket getBasket()
BasketManager
getBasket
in interface BasketManager
public Briefcase getBriefcase()
BasketManager
getBriefcase
in interface BasketManager
public Folder getFolder()
BasketManager
getFolder
in interface BasketManager
public List getBriefcaseDescriptions()
BasketManager
ContentStoreDescription
objects.
getBriefcaseDescriptions
in interface BasketManager
protected String getUser()
public List getBasketActions()
BasketManager
BasketManager.ActionInfo
s.
getBasketActions
in interface BasketManager
public List getBriefcaseActions()
BasketManager
BasketManager.ActionInfo
s.
getBriefcaseActions
in interface BasketManager
public void addBatch(ContentItem item, int frequencyInDays, BasketManager.ActionInfo action)
addBatch
in interface BasketManager
protected BasketManagerImpl.BatchInfo searchBatchInfo(ContentItem item, BasketManager.ActionInfo info)
public BasketManager.ActionInfo getBasketAction(String name)
BasketManager
getBasketAction
in interface BasketManager
public BasketManager.ActionInfo getBriefcaseAction(String name)
BasketManager
getBriefcaseAction
in interface BasketManager
public void update(ContentStore store)
BasketManager
update
in interface BasketManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |