|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.fwk.share.RequestContext
dekoh.portal.fwk.share.LocalRequestContext
public class LocalRequestContext
| Field Summary | |
|---|---|
protected DIOEntityManagerFactory |
dioemf
|
| Fields inherited from class dekoh.portal.fwk.share.RequestContext |
|---|
contextPath, DIO_ID_PARAMETER_KEY, em, request, REQUEST_CONTEXT_ATTRIBUTE |
| Constructor Summary | |
|---|---|
LocalRequestContext(HttpServletRequest request,
DIOEntityManager em,
DIOEntityManagerFactory emf)
|
|
LocalRequestContext(HttpServletRequest request,
DIOEntityManager em,
DIOEntityManagerFactory emf,
String contextPath)
|
|
| Method Summary | |
|---|---|
protected DioCollection |
_createCollection(String collectionName,
int previewDioId)
|
Share |
addBuddiesToShare(int shareId,
String[] contactKeys)
Adds the given buddy contactKeys to the share |
Set |
addTagToDio(String dioId,
String[] tagNames)
Adds the given tags to the dio. |
protected void |
checkAccessControl()
|
void |
copyDigitalObjectsToCollection(int dioCollectionId,
String[] dioIDs)
Copy photos selected to the given collection |
DioCollection |
createCollection(String collectionName,
String[] dioIds)
This method makes a new collection with the given name, and the specified photos as its members. |
Share |
createPublicShare(DioCollection dio,
String contextPath,
String shareName)
|
Share |
createShare(DioCollection dio,
String contextPath,
String shareName,
String[] contactKeys)
|
void |
deleteComment(String commentId,
int numberOfReplies)
Deletes a comment. |
int |
deleteShareByID(int shareID)
deletes a share by shareId. |
void |
deleteTag(String[] tags)
deletes the given tag |
void |
disableShares(List shareIds)
|
void |
enableAllDisabledShares(int dioId)
|
void |
enableShares(List shareIds)
|
List |
findMostRecentComments(int numComments)
|
AccessPath |
getAccessPathForComment(Comment comment)
|
List |
getAllBuddies(HttpServletRequest request)
|
List |
getAllCommentsForDigitalObject(Integer dioId)
|
Set |
getAllDIOByTagName(String tagName)
gets the set all digital object to the given tag |
List |
getAllDIOForTags(String tags)
gets the List of all DigitalObjects for the given tags |
List |
getAllSharedBuddiesForDIO(DigitalObject digitalObject)
Gets all buddies to whom the given digitalObject is shared to |
List |
getAllShares()
|
DigitalObject |
getDio(Class entityClass,
int id)
|
DIOEntityManager |
getEntityManager()
|
TagCloud |
getLastMonthUsedTagCloud(int maxCount)
Gets Tagcloud with tags used in the last one month |
TagCloud |
getLastOneDayUsedTagCloud(int maxCount)
Gets Tagcloud with tags used in the last 24 hours |
TagCloud |
getLastWeekUsedTagCloud(int maxCount)
Gets Tagcloud with tags used in the last one week (7 days) |
LocalUser |
getOwner()
|
protected String |
getOwnerUserName(HttpServletRequest request)
|
List |
getRecentBuddyShareVisits(int maxNoOfVisits)
|
Share |
getShareById(int id)
|
List |
getShareForDigitalObject(int dioId)
Gets the list of all share for the given DigitalObject |
TagCloud |
getTagCloud(int numOfTags)
|
Set |
getTagsForDigitalObject(int dioId)
Gets all tags of the given digital object |
boolean |
isLocalRequest()
|
Tag |
mergeTags(String[] oldTags,
String newTag)
|
void |
moveDigitalObjectToCollection(AccessPath accessPath,
int digitalObjectId,
int dioCollectionId)
move the photos from a colletion to another collection |
DIOEntityManager |
newEntityManager()
|
Comment |
postNewComment(String comment,
AccessPath accessPath,
String dioId)
Adds new comment to a dioId. |
void |
removeBuddyFromShare(int shareId,
String[] contactKeys)
|
void |
removeCollection(int dioId)
To remove the entire collection |
void |
removeDigitalObjectFromCollection(AccessPath collectionPath,
int dioId)
Remove photo from a given collection |
void |
removeTagForDio(int dioId,
String[] tags)
Untags the given tag from the digital object if it is tagged with |
Tag |
renameTag(String fromTag,
String toTag)
Moves all digitalObject tagged with fromTag to toTag |
Comment |
replyToComment(String comment,
String commentId)
Post Reply to comment. |
void |
sendCollectionShareMail(ShareMetadata metaData,
MailTemplateObject template,
String[] contactKeys)
|
void |
setOrAddCollectionTemplate(DioCollection dioCollection,
Properties templateProperties)
sets or changed the template properties for the given collection |
void |
setOrAddCollectionTemplate(int dioCollectionId,
Properties templateProperties)
|
protected void |
updateParentPreviewDioIfRequired(DioCollection dioCollection)
|
protected void |
updatePreviewDioIfRequired(DioCollection collection,
DigitalObject oldpreviewDio)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DIOEntityManagerFactory dioemf
| Constructor Detail |
|---|
public LocalRequestContext(HttpServletRequest request,
DIOEntityManager em,
DIOEntityManagerFactory emf)
public LocalRequestContext(HttpServletRequest request,
DIOEntityManager em,
DIOEntityManagerFactory emf,
String contextPath)
| Method Detail |
|---|
public DIOEntityManager getEntityManager()
public DIOEntityManager newEntityManager()
public void deleteComment(String commentId,
int numberOfReplies)
throws CommentIsUpdatedException
commentId - comment to be deleted -- must be an integer.numberOfReplies - numberOfReplies to this comment, as the user sees them.
CommentIsUpdatedException - when the number of replies of this comment is different -- this usually means that someone has replied to this comment.
public Comment postNewComment(String comment,
AccessPath accessPath,
String dioId)
RequestContext
postNewComment in class RequestContext
public Comment replyToComment(String comment,
String commentId)
RequestContext
replyToComment in class RequestContextcomment - - comment textcommentId - - reply to comment
public void sendCollectionShareMail(ShareMetadata metaData,
MailTemplateObject template,
String[] contactKeys)
throws HeuristicShareException,
ShareException
HeuristicShareException
ShareExceptionprotected String getOwnerUserName(HttpServletRequest request)
getOwnerUserName in class RequestContext
public DigitalObject getDio(Class entityClass,
int id)
getDio in class RequestContextpublic boolean isLocalRequest()
isLocalRequest in class RequestContextpublic TagCloud getTagCloud(int numOfTags)
public TagCloud getLastMonthUsedTagCloud(int maxCount)
maxCount - - Maximum number of tag to fetch
public TagCloud getLastWeekUsedTagCloud(int maxCount)
maxCount - - Maximum number of tag to fetch
public TagCloud getLastOneDayUsedTagCloud(int maxCount)
maxCount - - Maximum number of tag to fetch
public Set addTagToDio(String dioId,
String[] tagNames)
dioId - which dio to add tags to, if the dio is null this method will create Tag objects but will not add
to any Dio.tagNames - key words
public void deleteTag(String[] tags)
tags - - array of tags
public Tag renameTag(String fromTag,
String toTag)
fromTag - - rename tagtoTag - - new Tag Name
public void removeTagForDio(int dioId,
String[] tags)
dioId - - DigitalObject IDtags - - Array of Tag to be removed
public Tag mergeTags(String[] oldTags,
String newTag)
public Set getAllDIOByTagName(String tagName)
tagName - - tag name to fetch
public List getAllDIOForTags(String tags)
tags - - tags separated by , (comma)
public Set getTagsForDigitalObject(int dioId)
dioId - - digitalobject ID
public List getAllSharedBuddiesForDIO(DigitalObject digitalObject)
digitalObject - - DigitalObject
public List getAllCommentsForDigitalObject(Integer dioId)
getAllCommentsForDigitalObject in class RequestContextpublic List findMostRecentComments(int numComments)
findMostRecentComments in class RequestContext
public DioCollection createCollection(String collectionName,
String[] dioIds)
collectionName - the name of the new collectiondioIds - array of dioIds to be added to the collection
protected DioCollection _createCollection(String collectionName,
int previewDioId)
public void setOrAddCollectionTemplate(DioCollection dioCollection,
Properties templateProperties)
dioCollection - - DIOCollectiontemplateProperties - templateProperties
public void setOrAddCollectionTemplate(int dioCollectionId,
Properties templateProperties)
public void removeDigitalObjectFromCollection(AccessPath collectionPath,
int dioId)
collectionPath - AccessPath To get the collection from which photo has to be deleteddioId - PhotoDio to be deleted
protected void updatePreviewDioIfRequired(DioCollection collection,
DigitalObject oldpreviewDio)
public void removeCollection(int dioId)
dioId - DioCollection IDprotected void updateParentPreviewDioIfRequired(DioCollection dioCollection)
public void copyDigitalObjectsToCollection(int dioCollectionId,
String[] dioIDs)
dioCollectionId - DioCollection IDdioIDs - PhotoId's to be copied
public void moveDigitalObjectToCollection(AccessPath accessPath,
int digitalObjectId,
int dioCollectionId)
accessPath - to get the curent collection the photos to be moveddigitalObjectId - digitalObject to movedioCollectionId - from collectionpublic List getAllBuddies(HttpServletRequest request)
request - Request object
public List getAllShares()
public Share getShareById(int id)
id - primary key
NoSuchEntityException - if there is no Share by given Id owner by the logged in user.public int deleteShareByID(int shareID)
shareID -
public Share createShare(DioCollection dio,
String contextPath,
String shareName,
String[] contactKeys)
public Share createPublicShare(DioCollection dio,
String contextPath,
String shareName)
public Share addBuddiesToShare(int shareId,
String[] contactKeys)
shareId - share IdcontactKeys - buddy contactkeys
public void removeBuddyFromShare(int shareId,
String[] contactKeys)
public List getRecentBuddyShareVisits(int maxNoOfVisits)
public List getShareForDigitalObject(int dioId)
dioId - digitalObject Id
public AccessPath getAccessPathForComment(Comment comment)
getAccessPathForComment in class RequestContextpublic LocalUser getOwner()
protected void checkAccessControl()
checkAccessControl in class RequestContextpublic void enableAllDisabledShares(int dioId)
public void enableShares(List shareIds)
public void disableShares(List shareIds)
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers