public class AccessControlForSingleFile
extends java.lang.Object
implements edu.ucsb.nceas.utilities.access.AccessControlInterface
Constructor and Description |
---|
AccessControlForSingleFile(java.lang.String accessionNumber)
Construct an instance of the AccessControlForSingleFile class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accessControlExists(edu.ucsb.nceas.utilities.access.XMLAccessDAO xmlAccessDAO)
Check if access control comination for
docid/principal/permission/permorder/permtype already exists.
|
java.lang.String |
getAccessString()
Get the access xml for all access on this docid
|
java.lang.String |
getAccessString(java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> xmlAccessDAOList)
Put together an xml representation of the objects in a given access dao list
|
java.lang.String |
getACL(java.lang.String user,
java.lang.String[] groups)
Get Access Control List information for document from db connetion.
|
void |
insertPermissions(java.lang.String accessBlock)
Replace existing permissions with a given block of permissions for this
document.
|
void |
insertPermissions(java.lang.String principalName,
java.lang.Long permission,
java.lang.String permType,
java.lang.String permOrder,
java.lang.String accessFileId,
java.lang.String subTreeId)
Insert a single access record into the database.
|
void |
insertPermissions(edu.ucsb.nceas.utilities.access.XMLAccessDAO xmlAccessDAO)
Insert a single access record into the database based on access DAO
object
|
public AccessControlForSingleFile(java.lang.String accessionNumber) throws AccessControlException
myAccessNumber
- the docid or docid with dev will be controlledAccessControlException
public void insertPermissions(edu.ucsb.nceas.utilities.access.XMLAccessDAO xmlAccessDAO) throws AccessControlException, PermOrderException
xmlAccessDAO
- dao object holding info to insertAccessControlException
PermOrderException
public void insertPermissions(java.lang.String principalName, java.lang.Long permission, java.lang.String permType, java.lang.String permOrder, java.lang.String accessFileId, java.lang.String subTreeId) throws AccessControlException, PermOrderException
principalName
- the principal credentialspermission
- the permissionpermType
- the permission typepermOrder
- the permission orderAccessControlException
PermOrderException
public void insertPermissions(java.lang.String accessBlock) throws AccessControlException
accessBlock
- the xml access block. This is the same structure as that
returned by the getdocumentinfo action in metacat.AccessControlException
public boolean accessControlExists(edu.ucsb.nceas.utilities.access.XMLAccessDAO xmlAccessDAO) throws AccessControlException
xmlAccessDAO
- the dao object holding the access we want to check for.AccessControlException
public java.lang.String getACL(java.lang.String user, java.lang.String[] groups) throws AccessControlException
user
- name of user connected to Metacat systemgroups
- names of user's groups to which user belongsAccessControlException
public java.lang.String getAccessString() throws AccessControlException
AccessControlException
public java.lang.String getAccessString(java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> xmlAccessDAOList) throws AccessControlException
xmlAccessDAOList
- list of xml access DAO objectsAccessControlException
Copyright © 2020 Regents of the University of California. All Rights Reserved.