|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BriefcaseEngine
Bean handling Briefcases.
A briefcase is a object store which may be accessed with FxSQL or the API provided by this bean.
| Method Summary | |
|---|---|
void |
addItemData(long briefcaseId,
BriefcaseItemData itemData)
Add a single item data for a briefcase item |
void |
addItemData(long briefcaseId,
java.util.List<BriefcaseItemData> itemDatas)
Add multiple item datas for a briefcase |
void |
addItems(long id,
java.util.Collection<FxPK> contents)
Add the given items to the briefcase. |
void |
addItems(long id,
long[] objectIds)
Deprecated. use addItems(long, java.util.Collection) |
void |
clear(long id)
Removes all items of the given briefcase. |
long |
create(java.lang.String name,
java.lang.String description,
java.lang.Long aclId)
Creates a new empty briefcase. |
long |
create(java.lang.String name,
java.lang.String description,
java.lang.Long aclId,
LifeCycleInfo forcedLifeCycleInfo)
Create a new empty briefcase, overriding the default lifecycle info (e.g. |
long[] |
getItems(long id)
Load all item IDs stored in the given briefcase. |
java.util.List<FxReferenceMetaData<FxPK>> |
getMetaData(long briefcaseId)
Loads the metadata instance(s) associated to the briefcase items. |
FxReferenceMetaData<FxPK> |
getMetaData(long briefcaseId,
FxPK pk)
Loads the metadata instance(s) associated to given briefcase item. |
Briefcase |
load(long id)
Loads the briefcase with the given id. |
java.util.List<Briefcase> |
loadAll(boolean includeShared)
Gets a list of all briefcase for the calling user. |
void |
mergeMetaData(long id,
java.util.Collection<FxReferenceMetaData<FxPK>> metaData)
Merges the given metadata fields into the existing metadata stored in the items. |
void |
modify(long id,
java.lang.String name,
java.lang.String description,
java.lang.Long aclId)
Modifies a briefcase. |
void |
moveItems(long fromId,
long toId,
java.util.Collection<FxPK> contents)
Moves items from one briefcase to another. |
java.util.List<BriefcaseItemData> |
queryItemData(long briefcaseId,
java.lang.Long itemId,
java.lang.String metaData,
java.lang.Integer intFlag1,
java.lang.Integer intFlag2,
java.lang.Integer intFlag3,
java.lang.Long longFlag1,
java.lang.Long longFlag2,
BriefcaseItemData.SortField sortField,
BriefcaseItemData.SortOrder sortOrder)
Load matching item datas (non-null flags are queried) |
int |
queryItemDataCount(long briefcaseId,
java.lang.Long itemId,
java.lang.String metaData,
java.lang.Integer intFlag1,
java.lang.Integer intFlag2,
java.lang.Integer intFlag3,
java.lang.Long longFlag1,
java.lang.Long longFlag2)
Evaluate the count of matching item datas (non-null flags are queried) |
void |
remove(long id)
Removes the briefcase with the specified id. |
void |
removeItemData(long briefcaseId,
java.lang.Long itemId)
Remove item datas |
void |
removeItems(long id,
java.util.Collection<FxPK> contents)
Removes the given items from the briefcase. |
void |
removeItems(long id,
long[] objectIds)
Deprecated. use removeItems(long, java.util.Collection) |
void |
setItems(long id,
java.util.Collection<FxPK> contents)
Replace the current briefcase content with the given objects (i.e. |
void |
setItems(long id,
long[] objectIds)
Deprecated. use setItems(long, java.util.Collection) |
void |
setMetaData(long id,
java.util.Collection<FxReferenceMetaData<FxPK>> metaData)
Replaces the current metadata for the given items. |
void |
updateItemData(long briefcaseId,
BriefcaseItemData updateData)
Update a data item (except the position). |
void |
updateItems(long id,
java.util.Collection<FxPK> addContents,
java.util.Collection<FxPK> removeContents)
Adds/removes the given items for the briefcase. |
void |
updateItems(long id,
long[] addObjectIds,
long[] removeObjectIds)
Deprecated. use updateItems(long, java.util.Collection, java.util.Collection) |
| Method Detail |
|---|
long create(java.lang.String name,
java.lang.String description,
java.lang.Long aclId)
throws FxApplicationException
name - the name of the briefcase.description - the description (may be empty)aclId - the ACL to use if the briefcase should be shared, or null if the briefcase is
only visible for the owner.
FxApplicationException - if the create failed
long create(java.lang.String name,
java.lang.String description,
java.lang.Long aclId,
LifeCycleInfo forcedLifeCycleInfo)
throws FxApplicationException
description - the description (may be empty)aclId - the ACL to use if the briefcase should be shared, or null if the briefcase is only visible for the
owner.forcedLifeCycleInfo - the lifecycle info to store for the briefcase, or null if the default values should be used
FxApplicationException - if the create failed
java.util.List<Briefcase> loadAll(boolean includeShared)
throws FxApplicationException
includeShared - if enabled shared briefcases will be included, if disabled only
the briefcases created by the calling user will be returned
FxApplicationException - if the function fails
Briefcase load(long id)
throws FxApplicationException
id - the id
FxApplicationException - if a error occured
FxNotFoundException - if it could not be found or was not readable by the calling user.
void remove(long id)
throws FxApplicationException
id - the id
FxApplicationException - if the calling user lacks the remove permission and is not the owner,
or if a other error occured.
void modify(long id,
java.lang.String name,
java.lang.String description,
java.lang.Long aclId)
throws FxApplicationException
name - the new name of the briefcase, or null to keep the old valuedescription - the new description, or null to keep the old valueaclId - the new ACL, or -1 to remove a old acl, or null to keep the old valueid - the id of the briefcase to modify
FxApplicationException - if the modify operation failed
void clear(long id)
throws FxApplicationException
id - the briefcase ID
FxApplicationException - if the briefcase could not be cleared
@Deprecated
void addItems(long id,
long[] objectIds)
throws FxApplicationException
addItems(long, java.util.Collection)
id - the briefcase IDobjectIds - the object IDs to be added
FxApplicationException - if the items could not be added
void addItems(long id,
java.util.Collection<FxPK> contents)
throws FxApplicationException
id - the briefcase IDcontents - the content instances to be added
FxApplicationException - if the items could not be added
@Deprecated
void setItems(long id,
long[] objectIds)
throws FxApplicationException
setItems(long, java.util.Collection)
id - the briefcase IDobjectIds - the new briefcase content
FxApplicationException - if the content could not be replaced
void setItems(long id,
java.util.Collection<FxPK> contents)
throws FxApplicationException
id - the briefcase IDcontents - the new briefcase content
FxApplicationException - if the content could not be replaced
@Deprecated
void updateItems(long id,
long[] addObjectIds,
long[] removeObjectIds)
throws FxApplicationException
updateItems(long, java.util.Collection, java.util.Collection)
id - the briefcase IDaddObjectIds - items to be addedremoveObjectIds - items to be removed
FxApplicationException - if the briefcase could not be updated
void updateItems(long id,
java.util.Collection<FxPK> addContents,
java.util.Collection<FxPK> removeContents)
throws FxApplicationException
id - the briefcase IDaddContents - items to be addedremoveContents - items to be removed
FxApplicationException - if the briefcase could not be updated
void setMetaData(long id,
java.util.Collection<FxReferenceMetaData<FxPK>> metaData)
throws FxApplicationException
Since metadata on a briefcase is typically shared by more than one application (or plugin),
this method should be used carefully. For everyday purposes, mergeMetaData(long, java.util.Collection)
is considered to be a better alternative.
id - the briefcase IDmetaData - the metadata updates (item IDs are stored in the metadata instances themselves)
FxApplicationException - if the metadata could not be updated
void mergeMetaData(long id,
java.util.Collection<FxReferenceMetaData<FxPK>> metaData)
throws FxApplicationException
This method should be used whenever it is not necessary to control the entire metadata associated to a briefcase item, since it provides transactional safety for concurrent modifications of briefcase items.
id - the briefcase IDmetaData - the metadata updates (item IDs are stored in the metadata instances themselves)
FxApplicationException - if the metadata could not be updated
java.util.List<FxReferenceMetaData<FxPK>> getMetaData(long briefcaseId)
throws FxApplicationException
briefcaseId - the briefcase ID
FxApplicationException - if the metadata could not be retrieved
FxReferenceMetaData<FxPK> getMetaData(long briefcaseId,
FxPK pk)
throws FxApplicationException
briefcaseId - the briefcase IDpk - the item PK
FxApplicationException - if the metadata could not be retrieved
@Deprecated
void removeItems(long id,
long[] objectIds)
throws FxApplicationException
removeItems(long, java.util.Collection)
id - the briefcase IDobjectIds - the objects to be removed
FxApplicationException - if the items could not be removed
void removeItems(long id,
java.util.Collection<FxPK> contents)
throws FxApplicationException
id - the briefcase IDcontents - the objects to be removed
FxApplicationException - if the items could not be removed
long[] getItems(long id)
throws FxApplicationException
id - the briefcase ID
FxApplicationException - if the items could not be loaded
void moveItems(long fromId,
long toId,
java.util.Collection<FxPK> contents)
throws FxApplicationException
fromId - the source briefcase IDtoId - the target briefcase IDcontents - the items to be moved
FxApplicationException
void addItemData(long briefcaseId,
BriefcaseItemData itemData)
throws FxApplicationException
briefcaseId - id of the briefcaseitemData - item data
FxApplicationException - on errors
void addItemData(long briefcaseId,
java.util.List<BriefcaseItemData> itemDatas)
throws FxApplicationException
briefcaseId - id of the briefcaseitemDatas - item datas
FxApplicationException - on errors
void removeItemData(long briefcaseId,
java.lang.Long itemId)
throws FxApplicationException
briefcaseId - id of the briefcaseitemId - item id or if null for all items
FxApplicationException - on errors
java.util.List<BriefcaseItemData> queryItemData(long briefcaseId,
java.lang.Long itemId,
java.lang.String metaData,
java.lang.Integer intFlag1,
java.lang.Integer intFlag2,
java.lang.Integer intFlag3,
java.lang.Long longFlag1,
java.lang.Long longFlag2,
BriefcaseItemData.SortField sortField,
BriefcaseItemData.SortOrder sortOrder)
throws FxApplicationException
briefcaseId - id of the briefcaseitemId - item idmetaData - meta dataintFlag1 - integer flag 1intFlag2 - integer flag 2intFlag3 - integer flag 3longFlag1 - long flag 1longFlag2 - long flag 2sortField - sort fieldsortOrder - sort order
FxApplicationException - on errors
int queryItemDataCount(long briefcaseId,
java.lang.Long itemId,
java.lang.String metaData,
java.lang.Integer intFlag1,
java.lang.Integer intFlag2,
java.lang.Integer intFlag3,
java.lang.Long longFlag1,
java.lang.Long longFlag2)
throws FxApplicationException
briefcaseId - id of the briefcaseitemId - item idmetaData - meta dataintFlag1 - integer flag 1intFlag2 - integer flag 2intFlag3 - integer flag 3longFlag1 - long flag 1longFlag2 - long flag 2
FxApplicationException - on errors
void updateItemData(long briefcaseId,
BriefcaseItemData updateData)
throws FxApplicationException
updateItem must contain a valid briefcase and object/item id
briefcaseId - id of the briefcaseupdateData - data to update
FxApplicationException - on errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||