public class XMLAccessAccess extends BaseAccess
Constructor and Description |
---|
XMLAccessAccess() |
Modifier and Type | Method and Description |
---|---|
void |
addXMLAccess(java.lang.String guid,
java.lang.String principalName,
java.lang.Long permission,
java.lang.String permType,
java.lang.String permOrder,
java.lang.String accessFileId,
java.lang.String subTreeId)
Add permissions for a given principal on a given document.
|
void |
deleteXMLAccessForDoc(java.lang.String guid)
Delete xml access.
|
void |
deleteXMLAccessForDoc(java.lang.String guid,
java.lang.String permType)
Delete xml access.
|
java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> |
getXMLAccessForDoc(java.lang.String guid)
Get all xml access for a document
|
java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> |
getXMLAccessForPrincipal(java.lang.String guid,
java.lang.String principalName)
Get all xml access for a principal for a certain document
|
java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> |
getXMLAccessForPrincipal(java.lang.String guid,
java.lang.String principalName,
java.lang.String permType,
java.lang.String permOrder)
Get all xml access for a principal/permType/permOrder for a certain document
|
void |
insertAccess(java.lang.String guid,
java.util.List<edu.ucsb.nceas.utilities.access.XMLAccessDAO> xmlAccessList)
Set permissions for a given document.
|
protected edu.ucsb.nceas.utilities.access.XMLAccessDAO |
populateDAO(java.sql.ResultSet resultSet)
Populate a job data object with the current row in a resultset
|
void |
removeXMLAccessForPrincipal(java.lang.String guid,
java.lang.String principalName,
java.lang.Long permission)
Remove xml access.
|
void |
replaceAccess(java.lang.String guid,
java.util.List<edu.ucsb.nceas.utilities.access.XMLAccessDAO> xmlAccessList)
Set permissions for a given document.
|
closeDBObjects
public XMLAccessAccess() throws AccessException
AccessException
public java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> getXMLAccessForDoc(java.lang.String guid) throws AccessException
id
- the id of the documentAccessException
public java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> getXMLAccessForPrincipal(java.lang.String guid, java.lang.String principalName) throws AccessException
id
- the id of the documentprincipalName
- the credentials of the principal in the databaseAccessException
public java.util.Vector<edu.ucsb.nceas.utilities.access.XMLAccessDAO> getXMLAccessForPrincipal(java.lang.String guid, java.lang.String principalName, java.lang.String permType, java.lang.String permOrder) throws AccessException
guid
- the id of the documentprincipalName
- the credentials of the principal in the databaseAccessException
public void addXMLAccess(java.lang.String guid, 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 AccessException, PermOrderException
guid
- document idprincipalName
- principal credentialspermission
- permission bitmappermType
- permission typepermOrder
- permission orderAccessException
PermOrderException
public void replaceAccess(java.lang.String guid, java.util.List<edu.ucsb.nceas.utilities.access.XMLAccessDAO> xmlAccessList) throws AccessException
id
- document idxmlAccessList
- list of xml access dao objects that hold new access for the documentAccessException
public void insertAccess(java.lang.String guid, java.util.List<edu.ucsb.nceas.utilities.access.XMLAccessDAO> xmlAccessList) throws AccessException
id
- document idxmlAccessList
- list of xml access dao objects that hold new access for the documentAccessException
public void removeXMLAccessForPrincipal(java.lang.String guid, java.lang.String principalName, java.lang.Long permission) throws AccessException
guid
- document idprincipalName
- principal credentialsAccessException
public void deleteXMLAccessForDoc(java.lang.String guid) throws AccessException
id
- document idAccessException
public void deleteXMLAccessForDoc(java.lang.String guid, java.lang.String permType) throws AccessException
guid
- document idprincipal
- principal credentialsAccessException
protected edu.ucsb.nceas.utilities.access.XMLAccessDAO populateDAO(java.sql.ResultSet resultSet) throws java.sql.SQLException
populateDAO
in class BaseAccess
resultSet
- the result set which is already pointing to the desired row.java.sql.SQLException
Copyright © 2020 Regents of the University of California. All Rights Reserved.