|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.utils.extensions.cms.AbstractContentManager
public abstract class AbstractContentManager
Base implementation of a IContentManager
Field Summary | |
---|---|
protected static char |
SEPARATOR
|
Constructor Summary | |
---|---|
AbstractContentManager()
|
Method Summary | |
---|---|
ContentItem |
addContent(ContentItem content)
Adds a new content to the repository. |
Node |
addNode(Node node)
Adds a new content to the repository Will assign the ID internally |
protected List<ContentItem> |
checkContentAccessInList(List<ContentItem> listToCheck,
IDIFUser user)
Check the access in a list of content items |
protected List<Node> |
checkNodeAccessInList(List<Node> listToCheck,
IDIFUser user)
Check the access in a list of nodes |
boolean |
deleteContent(String id,
IDIFUser user)
Deletes an existing content from the repository |
protected abstract boolean |
deleteContentInRepository(String id,
IDIFUser user)
Deletes an existing content from the repository |
boolean |
deleteNode(Long id,
IDIFUser user)
Deletes an existing node from the repository |
boolean |
deleteNode(Long id,
IDIFUser user,
boolean cascadeDelete)
Deletes an existing node from the repository. |
protected abstract boolean |
deleteNodeInRepository(Long nodeId,
IDIFUser user,
boolean cascadeDelete)
Deletes an existing node from the repository. |
protected String |
determineFullPath(Node node)
Determines the full path String base in the Node chain |
List<ContentItem> |
getContentByDescription(String description,
IDIFUser user)
Searches content items by description |
protected abstract List<ContentItem> |
getContentByDescriptionInRepository(String description,
IDIFUser user)
Searches content items by description |
ContentItem |
getContentById(String id,
IDIFUser user)
Searches a content item by it's unique identifier |
protected abstract ContentItem |
getContentByIdInRepository(String id,
IDIFUser user)
Searches an existing content by it's unique identifier |
protected ContentItem |
getContentByIdNoPermissions(String id,
IDIFUser user)
Searches an existing content by it's unique identifier, without access validation |
protected abstract ContentItem |
getContentByIdNoPermissionsInRepository(String id,
IDIFUser user)
Searches an existing content by it's unique identifier, without access validation |
List<ContentItem> |
getContentByName(String name,
IDIFUser user)
Searches content items by name |
protected abstract List<ContentItem> |
getContentByNameInRepository(String name,
IDIFUser user)
Searches content items by name |
List<ContentItem> |
getContentByParentNode(Long nodeId,
IDIFUser user)
Searches content items by parent node |
protected abstract List<ContentItem> |
getContentByParentNodeInRepository(Long nodeId,
IDIFUser user)
Searches content items by parent node |
ContentItem |
getContentFromNodePathByName(String nodeFullPath,
String name,
IDIFUser user)
Searches content items by name and node path |
protected abstract ContentItem |
getContentFromNodePathByNameRepository(String nodeFullPath,
String name,
IDIFUser user)
Searches content items by name and node path on the repository |
List<ACLEntry> |
getContentItemACL(String id)
get content item ACL |
protected abstract List<ACLEntry> |
getContentItemACLInRepository(String id)
get node ACL |
List<ACLEntry> |
getNodeACL(Long id)
get node ACL |
protected abstract List<ACLEntry> |
getNodeACLInRepository(Long id)
get node ACL |
Node |
getNodeById(Long id,
IDIFUser user)
Searches a node by unique identifier |
protected abstract Node |
getNodeByIdInRepository(Long id,
IDIFUser user)
Searches a node by unique identifier |
protected Node |
getNodeByIdNoPermissions(Long nodeID,
IDIFUser user)
Searches a node by unique identifier. |
protected abstract Node |
getNodeByIdNoPermissionsInRepository(Long id,
IDIFUser user)
Searches for a given node. |
Node |
getNodeByPath(String fullPath,
IDIFUser user)
Searches a node by path |
protected abstract Node |
getNodeByPathInRespository(String fullPath,
IDIFUser user)
Searches a node by path |
protected Node |
getNodeByPathNoPermissions(String nodePath,
IDIFUser user)
Searches a node by path. |
List<Node> |
getNodesByDescription(String description,
IDIFUser user)
Searches nodes by description |
List<Node> |
getNodesByDescription(String basePathToSearch,
String description,
IDIFUser user)
Searches nodes by description |
protected abstract List<Node> |
getNodesByDescriptionInRepository(String description,
IDIFUser user)
Searches nodes by description |
protected abstract List<Node> |
getNodesByDescriptionInRepository(String basePathToSearch,
String description,
IDIFUser user)
Searches nodes by description |
List<Node> |
getNodesByName(String name,
IDIFUser user)
Searches nodes by name |
List<Node> |
getNodesByName(String basePathToSearch,
String name,
IDIFUser user)
Searches nodes by name |
protected abstract List<Node> |
getNodesByNameInRepository(String name,
IDIFUser user)
Searches nodes by name |
protected abstract List<Node> |
getNodesByNameInRepository(String basePathToSearch,
String name,
IDIFUser user)
Searches nodes by name |
List<Node> |
getNodesByParentNode(Long nodeId,
IDIFUser user)
Searches nodes by parent node |
protected abstract List<Node> |
getNodesByParentNodeInRepository(Long nodeId,
IDIFUser user)
Searches nodes by parent node |
protected List<Node> |
getNodesByParentNodeNoPermissions(Long nodeId,
IDIFUser user)
Searches nodes by parent node. |
protected abstract List<Node> |
getNodesByParentNodeNoPermissionsInRepository(Long nodeId,
IDIFUser user)
Searches nodes by parent node. |
protected abstract String |
getParentFullPathInRepository(Node node)
Gets the parent full path |
List<Node> |
getRootNodes(IDIFUser user)
Searches root nodes that user has access |
protected abstract List<Node> |
getRootNodesInRepository(IDIFUser user)
Searches root nodes |
boolean |
grantContentAccessToGroup(String contentId,
String groupId)
Grants group access to content item |
protected abstract boolean |
grantContentAccessToGroupInRepository(ContentItem contentItemParam,
String groupId)
Grants group access to content item |
boolean |
grantContentAccessToUser(String contentId,
IDIFUser user)
Grants user access to content item |
protected abstract boolean |
grantContentAccessToUserInRepository(ContentItem contentItemParam,
IDIFUser user)
Grants user access to content item |
boolean |
grantNodeAccessToGroup(Long nodeId,
String groupId)
Grants group access to node |
protected abstract boolean |
grantNodeAccessToGroupInRepository(Node nodeParam,
String groupId)
Grants group access to node |
boolean |
grantNodeAccessToUser(Long nodeId,
IDIFUser user)
Grants user access to node |
boolean |
grantNodeAccessToUser(String nodePath,
IDIFUser user)
Grants user access to node |
protected abstract boolean |
grantNodeAccessToUserInRepository(Node nodeParam,
IDIFUser user)
Grants user access to node |
boolean |
hasContentAccessGroup(ContentItem contentItem,
String groupId)
Checks if group has access to the content |
boolean |
hasContentAccessGroup(String contentId,
String groupId)
Checks if group has access to the content |
boolean |
hasContentAccessGroups(ContentItem contentItem,
Set<String> groups)
Checks if one of the group in the list has access to the content |
protected abstract boolean |
hasContentAccessGroupsInRepository(String contentId,
Set<String> groups)
Checks if one of the groups has access to the content |
boolean |
hasContentAccessUser(ContentItem contentItem,
IDIFUser user)
Checks if user has access to the content |
boolean |
hasContentAccessUser(String contentId,
IDIFUser user)
Checks if user has access to the content |
protected abstract boolean |
hasContentAccessUserInRepository(String contentId,
IDIFUser user)
Checks if group has access to thentent |
boolean |
hasNodeAccessGroups(Long nodeId,
Set<String> groups)
Checks if one of the group has access to the node |
protected abstract boolean |
hasNodeAccessGroupsInRepository(Long nodeId,
Set<String> groups)
Checks if one of the groups has access to the node |
boolean |
hasNodeAccessUser(Long nodeId,
IDIFUser user)
Checks if user has access to the node |
boolean |
hasNodeAccessUser(Node node,
IDIFUser user)
Checks if user has access to the node |
protected abstract boolean |
hasNodeAccessUserInRespository(Long nodeId,
IDIFUser user)
Checks if user has access to the node |
protected abstract ContentItem |
mergeContentInRepository(ContentItem contentParam,
IDIFUser user)
Updates a content item |
protected abstract Node |
mergeNodeInRepository(Node nodeParam,
IDIFUser user)
Updates a node |
boolean |
moveContent(String contentID,
Long destinationNodeId,
IDIFUser user)
Moves content to another node |
protected abstract ContentItem |
moveContentInRepository(ContentItem contentParam,
Node nodeParam,
IDIFUser user)
Moves content to another node |
boolean |
moveNode(Long nodeID,
Long destinationNodeId,
IDIFUser user)
Moves a node to another parent node |
protected abstract Node |
moveNodeInRepository(Node node,
IDIFUser user)
Moves node to another parent node |
protected boolean |
nodeExists(Long id,
IDIFUser user)
Searches a node by unique identifier. |
protected abstract boolean |
nodeExistsInRepository(Long id,
IDIFUser user)
Searches a node by unique identifier in the repository. |
protected abstract ContentItem |
persistContentInRepository(ContentItem content,
IDIFUser user)
Adds a new content to repository. |
protected abstract Node |
persistNodeInRepository(Node node,
IDIFUser user)
Adds a new content to repository. |
boolean |
revokeContentAccessToGroup(String contentId,
String groupId)
Revokes group access to content item |
protected abstract boolean |
revokeContentAccessToGroupInRepository(String contentId,
String groupId)
Revokes group access to content item |
boolean |
revokeContentAccessToUser(String contentId,
IDIFUser user)
Revokes user access to content item |
protected abstract boolean |
revokeContentAccessToUserInRepository(String contentId,
IDIFUser user)
Revokes user access to content item |
boolean |
revokeNodeAccessToGroup(Long nodeId,
String groupId)
Revokes group access to node |
protected abstract boolean |
revokeNodeAccessToGroupInRepository(Long nodeId,
String groupId)
Revokes group access to node |
boolean |
revokeNodeAccessToUser(Long nodeId,
IDIFUser user)
Revokes user access to node |
protected abstract boolean |
revokeNodeAccessToUserInRepository(Long nodeId,
IDIFUser user)
Revokes user access to node |
ContentItem |
updateContent(ContentItem content)
Updates content in the repository |
Node |
updateNode(Node node)
Updates content in the repository |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pt.digitalis.dif.utils.extensions.cms.IContentManager |
---|
beginTransaction, commitTransaction, rollbackTransaction |
Field Detail |
---|
protected static char SEPARATOR
Constructor Detail |
---|
public AbstractContentManager()
Method Detail |
---|
public ContentItem addContent(ContentItem content) throws ContentManagerException
IContentManager
addContent
in interface IContentManager
content
- the content to add in the repository
InvalidParentNodeException
NodeNotFoundException
NoAccessException
ContentItemWithDuplicateNameAndParentNodeException
ContentManagerException
IContentManager.addContent(pt.digitalis.dif.utils.extensions.cms.ContentItem)
public Node addNode(Node node) throws ContentManagerException
IContentManager
addNode
in interface IContentManager
node
- the node to add
InvalidPathException
InvalidNameException
NoAccessException
InvalidParentNodeException
NodeNotFoundException
NodeWithDuplicatePathException
ContentManagerException
IContentManager.addNode(pt.digitalis.dif.utils.extensions.cms.Node)
protected List<ContentItem> checkContentAccessInList(List<ContentItem> listToCheck, IDIFUser user)
listToCheck
- the content list to checkuser
- the user who's searching
protected List<Node> checkNodeAccessInList(List<Node> listToCheck, IDIFUser user)
listToCheck
- the node list to checkuser
- the user who's searching
public boolean deleteContent(String id, IDIFUser user) throws ContentManagerException
IContentManager
deleteContent
in interface IContentManager
id
- the content to deleteuser
- the user that is deleting the content
ContentItemNotFoundException
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.deleteContent(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract boolean deleteContentInRepository(String id, IDIFUser user) throws ContentManagerException
id
- the id of the content to deleteuser
- the user id that is deleting the content
ContentManagerException
public boolean deleteNode(Long id, IDIFUser user) throws ContentManagerException
IContentManager
deleteNode
in interface IContentManager
id
- the node to deleteuser
- the user that is deleting the node
NodeNotFoundException
NoAccessException
NodeWithNodesException
ContentManagerException
IContentManager.deleteNode(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
public boolean deleteNode(Long id, IDIFUser user, boolean cascadeDelete) throws ContentManagerException
IContentManager
deleteNode
in interface IContentManager
id
- the node to deleteuser
- the user that is deleting the nodecascadeDelete
- if T will delete all inner nodes and content, if F will launch an exception if the node is not empty
NodeNotFoundException
NoAccessException
NodeWithNodesException
ContentManagerException
IContentManager.deleteNode(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser, boolean)
protected abstract boolean deleteNodeInRepository(Long nodeId, IDIFUser user, boolean cascadeDelete) throws NodeNotFoundException, NodeWithNodesException, ContentManagerException
nodeId
- the node to deleteuser
- the user that's deleting the nodecascadeDelete
- if T will delete all inner nodes and content, if F will launch an exception if the node is not empty
NodeNotFoundException
NodeWithNodesException
ContentManagerException
protected String determineFullPath(Node node) throws ContentManagerException
node
- node to convert
ContentManagerException
public List<ContentItem> getContentByDescription(String description, IDIFUser user) throws ContentManagerException
IContentManager
getContentByDescription
in interface IContentManager
description
- the content iduser
- the user who's searching
ContentManagerException
IContentManager.getContentByDescription(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<ContentItem> getContentByDescriptionInRepository(String description, IDIFUser user) throws ContentManagerException
description
- the content iduser
- the user who's searching
ContentManagerException
public ContentItem getContentById(String id, IDIFUser user) throws ContentManagerException
IContentManager
getContentById
in interface IContentManager
id
- the content iduser
- the user who's searching
ContentItemNotFoundException
NoAccessException
NodeNotFoundException
ContentManagerException
IContentManager.getContentById(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract ContentItem getContentByIdInRepository(String id, IDIFUser user) throws ContentItemNotFoundException, NoAccessException, NodeNotFoundException, ContentManagerException
id
- the content iduser
- the user who's searching
ContentItemNotFoundException
NoAccessException
NodeNotFoundException
ContentManagerException
protected ContentItem getContentByIdNoPermissions(String id, IDIFUser user) throws ContentManagerException
id
- the content iduser
- current user
ContentManagerException
protected abstract ContentItem getContentByIdNoPermissionsInRepository(String id, IDIFUser user) throws ContentItemNotFoundException, ContentManagerException
id
- the content iduser
- current user
ContentItemNotFoundException
ContentManagerException
public List<ContentItem> getContentByName(String name, IDIFUser user) throws ContentManagerException
IContentManager
getContentByName
in interface IContentManager
name
- the content iduser
- the user who's searching
ContentManagerException
IContentManager.getContentByName(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<ContentItem> getContentByNameInRepository(String name, IDIFUser user) throws ContentManagerException
name
- the content iduser
- the user who's searching
ContentManagerException
public List<ContentItem> getContentByParentNode(Long nodeId, IDIFUser user) throws ContentManagerException
IContentManager
getContentByParentNode
in interface IContentManager
nodeId
- the parent node iduser
- the user who's searching
NodeNotFoundException
ContentManagerException
IContentManager.getContentByParentNode(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<ContentItem> getContentByParentNodeInRepository(Long nodeId, IDIFUser user) throws ContentManagerException
nodeId
- the parent iduser
- the user who's searching
ContentManagerException
public ContentItem getContentFromNodePathByName(String nodeFullPath, String name, IDIFUser user) throws ContentManagerException
IContentManager
getContentFromNodePathByName
in interface IContentManager
nodeFullPath
- the node fullPath from the content will be retrievename
- the content iduser
- the user who's searching
ContentItemNotFoundException
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.getContentFromNodePathByName(java.lang.String,
java.lang.String, pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract ContentItem getContentFromNodePathByNameRepository(String nodeFullPath, String name, IDIFUser user) throws ContentManagerException
nodeFullPath
- the node fullPath from the content will be retrievename
- the content iduser
- the user who's searching
ContentManagerException
public List<ACLEntry> getContentItemACL(String id) throws ContentManagerException
IContentManager
getContentItemACL
in interface IContentManager
id
- the content item ID
ContentManagerException
IContentManager.getContentItemACL(java.lang.String)
protected abstract List<ACLEntry> getContentItemACLInRepository(String id) throws ContentManagerException
id
- the content item ID
ContentManagerException
public List<ACLEntry> getNodeACL(Long id) throws ContentManagerException
IContentManager
getNodeACL
in interface IContentManager
id
- the node ID
ContentManagerException
IContentManager.getNodeACL(java.lang.Long)
protected abstract List<ACLEntry> getNodeACLInRepository(Long id) throws ContentManagerException
id
- the node ID
ContentManagerException
public Node getNodeById(Long id, IDIFUser user) throws ContentManagerException
IContentManager
getNodeById
in interface IContentManager
id
- the node IDuser
- the user who's searching
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.getNodeById(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract Node getNodeByIdInRepository(Long id, IDIFUser user) throws ContentManagerException
id
- the node IDuser
- the user who's searching
ContentManagerException
protected Node getNodeByIdNoPermissions(Long nodeID, IDIFUser user) throws ContentManagerException
nodeID
- the node IDuser
- the currentUser
ContentManagerException
protected abstract Node getNodeByIdNoPermissionsInRepository(Long id, IDIFUser user) throws NodeNotFoundException, ContentManagerException
id
- the node IDuser
- current user
NodeNotFoundException
ContentManagerException
public Node getNodeByPath(String fullPath, IDIFUser user) throws ContentManagerException
IContentManager
getNodeByPath
in interface IContentManager
fullPath
- the full path of the node the node IDuser
- the user who's searching
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.getNodeByPath(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract Node getNodeByPathInRespository(String fullPath, IDIFUser user) throws NodeNotFoundException, NoAccessException, ContentManagerException
fullPath
- the full path of the node the node IDuser
- the user who's searching
NodeNotFoundException
NoAccessException
ContentManagerException
protected Node getNodeByPathNoPermissions(String nodePath, IDIFUser user) throws ContentManagerException
nodePath
- the node pathuser
- the currentUser
ContentManagerException
public List<Node> getNodesByDescription(String description, IDIFUser user) throws ContentManagerException
IContentManager
getNodesByDescription
in interface IContentManager
description
- the description of the node to searchuser
- the user who's searching
ContentManagerException
IContentManager.getNodesByDescription(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
public List<Node> getNodesByDescription(String basePathToSearch, String description, IDIFUser user) throws ContentManagerException
IContentManager
getNodesByDescription
in interface IContentManager
basePathToSearch
- the path to search fromdescription
- the name of the node to searchuser
- the user who's searching
ContentManagerException
IContentManager.getNodesByDescription(java.lang.String,
java.lang.String, pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<Node> getNodesByDescriptionInRepository(String description, IDIFUser user) throws ContentManagerException
description
- the description of the node to searchuser
- the user who's searching
ContentManagerException
protected abstract List<Node> getNodesByDescriptionInRepository(String basePathToSearch, String description, IDIFUser user) throws ContentManagerException
basePathToSearch
- the path to search fromdescription
- the name of the node to searchuser
- the user who's searching
ContentManagerException
public List<Node> getNodesByName(String name, IDIFUser user) throws ContentManagerException
IContentManager
getNodesByName
in interface IContentManager
name
- the name of the node to searchuser
- the user who's searching
ContentManagerException
IContentManager.getNodesByName(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
public List<Node> getNodesByName(String basePathToSearch, String name, IDIFUser user) throws ContentManagerException
IContentManager
getNodesByName
in interface IContentManager
basePathToSearch
- the path to search fromname
- the name of the node to searchuser
- the user who's searching
ContentManagerException
IContentManager.getNodesByName(java.lang.String, java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<Node> getNodesByNameInRepository(String name, IDIFUser user) throws ContentManagerException
name
- the name of the node to searchuser
- the user who's searching
ContentManagerException
protected abstract List<Node> getNodesByNameInRepository(String basePathToSearch, String name, IDIFUser user) throws ContentManagerException
basePathToSearch
- the path to search fromname
- the name of the node to searchuser
- the user who's searching
ContentManagerException
public List<Node> getNodesByParentNode(Long nodeId, IDIFUser user) throws ContentManagerException
IContentManager
getNodesByParentNode
in interface IContentManager
nodeId
- the parent node iduser
- the user who's searching
NodeNotFoundException
ContentManagerException
IContentManager.getNodesByParentNode(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<Node> getNodesByParentNodeInRepository(Long nodeId, IDIFUser user) throws ContentManagerException
nodeId
- the parent node iduser
- the user who's searching
ContentManagerException
protected List<Node> getNodesByParentNodeNoPermissions(Long nodeId, IDIFUser user) throws ContentManagerException
nodeId
- the parent node iduser
- current user
ContentManagerException
protected abstract List<Node> getNodesByParentNodeNoPermissionsInRepository(Long nodeId, IDIFUser user) throws ContentManagerException
nodeId
- the parent node iduser
- current user
ContentManagerException
protected abstract String getParentFullPathInRepository(Node node) throws InvalidParentNodeException, ContentManagerException
node
- node to determine full path
InvalidParentNodeException
ContentManagerException
public List<Node> getRootNodes(IDIFUser user) throws ContentManagerException
IContentManager
getRootNodes
in interface IContentManager
user
- the user who's searching
ContentManagerException
IContentManager.getRootNodes(pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract List<Node> getRootNodesInRepository(IDIFUser user) throws ContentManagerException
user
- the user who's searching
ContentManagerException
public boolean grantContentAccessToGroup(String contentId, String groupId) throws ContentManagerException
grantContentAccessToGroup
in interface IContentManager
contentId
- the id of the content to grant accessgroupId
- the group to grant access
ContentManagerException
ContentItemNotFoundException
protected abstract boolean grantContentAccessToGroupInRepository(ContentItem contentItemParam, String groupId) throws ContentManagerException
contentItemParam
- the content to grant accessgroupId
- the group to grant access
ContentManagerException
public boolean grantContentAccessToUser(String contentId, IDIFUser user) throws ContentManagerException
IContentManager
grantContentAccessToUser
in interface IContentManager
contentId
- the id of the content to grant accessuser
- the group to grant access
ContentItemNotFoundException
ContentManagerException
IContentManager.grantContentAccessToUser(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract boolean grantContentAccessToUserInRepository(ContentItem contentItemParam, IDIFUser user) throws ContentManagerException
contentItemParam
- the content to grant accessuser
- the group to grant access
ContentManagerException
public boolean grantNodeAccessToGroup(Long nodeId, String groupId) throws ContentManagerException
IContentManager
grantNodeAccessToGroup
in interface IContentManager
nodeId
- the id of the node to grant accessgroupId
- the group to grant access
NodeNotFoundException
ContentManagerException
IContentManager.grantNodeAccessToGroup(java.lang.Long,
java.lang.String)
protected abstract boolean grantNodeAccessToGroupInRepository(Node nodeParam, String groupId) throws ContentManagerException
nodeParam
- the node to grant accessgroupId
- the group to grant access
ContentManagerException
public boolean grantNodeAccessToUser(Long nodeId, IDIFUser user) throws ContentManagerException
IContentManager
grantNodeAccessToUser
in interface IContentManager
nodeId
- the id of the node to grant accessuser
- the user to grant access
NodeNotFoundException
ContentManagerException
IContentManager.grantNodeAccessToUser(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
public boolean grantNodeAccessToUser(String nodePath, IDIFUser user) throws ContentManagerException
IContentManager
grantNodeAccessToUser
in interface IContentManager
nodePath
- the path of the node to grant accessuser
- the user to grant access
NodeNotFoundException
ContentManagerException
IContentManager.grantNodeAccessToUser(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract boolean grantNodeAccessToUserInRepository(Node nodeParam, IDIFUser user) throws ContentManagerException
nodeParam
- the node to grant accessuser
- the group to grant access
ContentManagerException
public boolean hasContentAccessGroup(ContentItem contentItem, String groupId) throws ContentManagerException
contentItem
- the content to check accessgroupId
- the group to check access
ContentManagerException
public boolean hasContentAccessGroup(String contentId, String groupId) throws ContentManagerException
IContentManager
hasContentAccessGroup
in interface IContentManager
contentId
- the id of the content to check accessgroupId
- the group to check access
ContentItemNotFoundException
NodeNotFoundException
ContentManagerException
IContentManager.hasContentAccessGroup(java.lang.String,
java.lang.String)
public boolean hasContentAccessGroups(ContentItem contentItem, Set<String> groups) throws ContentManagerException
contentItem
- the content to check accessgroups
- the group to check access
ContentManagerException
protected abstract boolean hasContentAccessGroupsInRepository(String contentId, Set<String> groups) throws ContentManagerException
contentId
- the id of the content to check accessgroups
- the group list to check access
ContentManagerException
public boolean hasContentAccessUser(ContentItem contentItem, IDIFUser user) throws ContentManagerException
IContentManager
hasContentAccessUser
in interface IContentManager
contentItem
- the content to check accessuser
- the user to check access
ContentItemNotFoundException
NodeNotFoundException
ContentManagerException
IContentManager.hasContentAccessUser(pt.digitalis.dif.utils.extensions.cms.ContentItem,
pt.digitalis.dif.controller.security.objects.IDIFUser)
public boolean hasContentAccessUser(String contentId, IDIFUser user) throws ContentManagerException
IContentManager
hasContentAccessUser
in interface IContentManager
contentId
- the id of the content to check accessuser
- the user to check access
ContentItemNotFoundException
NodeNotFoundException
ContentManagerException
IContentManager.hasContentAccessUser(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract boolean hasContentAccessUserInRepository(String contentId, IDIFUser user) throws ContentManagerException
contentId
- the id of the content to check accessuser
- the group to check access
ContentManagerException
public boolean hasNodeAccessGroups(Long nodeId, Set<String> groups) throws ContentManagerException
IContentManager
hasNodeAccessGroups
in interface IContentManager
nodeId
- the id of the node to check accessgroups
- the group list to check access
NodeNotFoundException
ContentManagerException
IContentManager.hasNodeAccessGroups(java.lang.Long, java.util.Set)
protected abstract boolean hasNodeAccessGroupsInRepository(Long nodeId, Set<String> groups) throws ContentManagerException
nodeId
- the id of the node to check accessgroups
- the group list to check access
ContentManagerException
public boolean hasNodeAccessUser(Long nodeId, IDIFUser user) throws ContentManagerException
IContentManager
hasNodeAccessUser
in interface IContentManager
nodeId
- the id of the node to check accessuser
- the user to check access
NodeNotFoundException
ContentManagerException
IContentManager.hasNodeAccessUser(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
public boolean hasNodeAccessUser(Node node, IDIFUser user) throws ContentManagerException
node
- the node to check accessuser
- the user to check access
ContentManagerException
protected abstract boolean hasNodeAccessUserInRespository(Long nodeId, IDIFUser user) throws ContentManagerException
nodeId
- the id of the node to check accessuser
- the group to check access
ContentManagerException
protected abstract ContentItem mergeContentInRepository(ContentItem contentParam, IDIFUser user) throws ContentItemNotFoundException, ContentItemWithDuplicateNameAndParentNodeException, ContentManagerException
contentParam
- the content to update in the repositoryuser
- current user
ContentItemNotFoundException
ContentItemWithDuplicateNameAndParentNodeException
ContentManagerException
protected abstract Node mergeNodeInRepository(Node nodeParam, IDIFUser user)
nodeParam
- the node to update in the repositoryuser
- current user
public boolean moveContent(String contentID, Long destinationNodeId, IDIFUser user) throws ContentManagerException
IContentManager
moveContent
in interface IContentManager
contentID
- the content ID to movedestinationNodeId
- the destination node to move touser
- the user request the move
ContentItemNotFoundException
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.moveContent(java.lang.String, java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract ContentItem moveContentInRepository(ContentItem contentParam, Node nodeParam, IDIFUser user) throws ContentItemNotFoundException, ContentManagerException
contentParam
- the content to update in the repositorynodeParam
- the node to move touser
- the current user
ContentItemNotFoundException
ContentManagerException
public boolean moveNode(Long nodeID, Long destinationNodeId, IDIFUser user) throws ContentManagerException
IContentManager
moveNode
in interface IContentManager
nodeID
- the original node iddestinationNodeId
- the destination node iduser
- the user requesting the move operation
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.moveNode(java.lang.Long, java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract Node moveNodeInRepository(Node node, IDIFUser user)
node
- the node to update in the repositoryuser
- the current user
protected boolean nodeExists(Long id, IDIFUser user) throws ContentManagerException
id
- the node IDuser
- the current User
ContentManagerException
protected abstract boolean nodeExistsInRepository(Long id, IDIFUser user) throws ContentManagerException
id
- the node IDuser
- the currentUser
ContentManagerException
protected abstract ContentItem persistContentInRepository(ContentItem content, IDIFUser user) throws ContentItemWithDuplicateNameAndParentNodeException, ContentManagerException
content
- the content to update in the repositoryuser
-
ContentItemWithDuplicateNameAndParentNodeException
ContentManagerException
protected abstract Node persistNodeInRepository(Node node, IDIFUser user) throws NodeWithDuplicatePathException, ContentManagerException
node
- node to update in the repositoryuser
- the user persisting the node
NodeWithDuplicatePathException
ContentManagerException
public boolean revokeContentAccessToGroup(String contentId, String groupId) throws ContentManagerException
IContentManager
revokeContentAccessToGroup
in interface IContentManager
contentId
- the id of the content to revoke accessgroupId
- the group to revoke access
ContentItemNotFoundException
ContentManagerException
IContentManager.revokeContentAccessToGroup(java.lang.String,
java.lang.String)
protected abstract boolean revokeContentAccessToGroupInRepository(String contentId, String groupId)
contentId
- the id of the content to revoke accessgroupId
- the group to revoke access
public boolean revokeContentAccessToUser(String contentId, IDIFUser user) throws ContentManagerException
IContentManager
revokeContentAccessToUser
in interface IContentManager
contentId
- the id of the content to revoke accessuser
- the group to revoke access
ContentItemNotFoundException
ContentManagerException
IContentManager.revokeContentAccessToUser(java.lang.String,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract boolean revokeContentAccessToUserInRepository(String contentId, IDIFUser user)
contentId
- the id of the content to revoke accessuser
- the group to revoke access
public boolean revokeNodeAccessToGroup(Long nodeId, String groupId) throws ContentManagerException
IContentManager
revokeNodeAccessToGroup
in interface IContentManager
nodeId
- the id of the node to revoke accessgroupId
- the group to revoke access
NodeNotFoundException
ContentManagerException
IContentManager.revokeNodeAccessToGroup(java.lang.Long,
java.lang.String)
protected abstract boolean revokeNodeAccessToGroupInRepository(Long nodeId, String groupId) throws ContentManagerException
nodeId
- the id of the node to revoke accessgroupId
- the group to revoke access
ContentManagerException
public boolean revokeNodeAccessToUser(Long nodeId, IDIFUser user) throws ContentManagerException
IContentManager
revokeNodeAccessToUser
in interface IContentManager
nodeId
- the id of the node to revoke accessuser
- the user to revoke access
NodeNotFoundException
ContentManagerException
IContentManager.revokeNodeAccessToUser(java.lang.Long,
pt.digitalis.dif.controller.security.objects.IDIFUser)
protected abstract boolean revokeNodeAccessToUserInRepository(Long nodeId, IDIFUser user) throws ContentManagerException
nodeId
- the id of the node to revoke accessuser
- the group to revoke access
ContentManagerException
public ContentItem updateContent(ContentItem content) throws ContentManagerException
IContentManager
updateContent
in interface IContentManager
content
- the content to update in the repository
ContentItemNotFoundException
NodeNotFoundException
NoAccessException
ContentItemWithDuplicateNameAndParentNodeException
ContentManagerException
IContentManager.updateContent(pt.digitalis.dif.utils.extensions.cms.ContentItem)
public Node updateNode(Node node) throws ContentManagerException
IContentManager
updateNode
in interface IContentManager
node
- the node to update in the repository
NodeNotFoundException
NoAccessException
ContentManagerException
IContentManager.updateNode(pt.digitalis.dif.utils.extensions.cms.Node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |