src/org/ohmage/service/DocumentServices.java
public void updateDocument(final String documentId, 
			final byte[] newContents, final String newName, 
			final String newDescription, 
			final Document.PrivacyState newPrivacyState,
			final Map<String, Document.Role> campaignAndRolesToAssociateOrUpdate, 
			final List<String> campaignsToDisassociate,
			final Map<String, Document.Role> classAndRolesToAssociateOrUpdate, 
			final Collection<String> classesToDisassociate,
			final Map<String, Document.Role> userAndRolesToAssociateOrUpdate, 
			final Collection<String> usersToDisassoicate) 
			throws ServiceException {
		
		try {
			documentQueries.updateDocument(documentId, newContents, newName, newDescription, newPrivacyState, 
					campaignAndRolesToAssociateOrUpdate, campaignsToDisassociate, 
					classAndRolesToAssociateOrUpdate, classesToDisassociate, 
					userAndRolesToAssociateOrUpdate, usersToDisassoicate);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Updates a document's information and/or contents. Except for the 
	 * 'request' and the 'documentId', any parameter can be null indicating
	 * that its value should not be updated.
	 * 
	 * @param documentId The unique identifier for the document to be updated.
	 * 
	 * @param newContents The new contents of the document.
	 * 
	 * @param newName The new name of the document.
	 * 
	 * @param newDescription The new description for the document.
	 * 
	 * @param newPrivacyState The new privacy state for the document.
	 * 
	 * @param campaignAndRolesToAssociateOrUpdate A Map of campaign IDs to 
	 * 											  document roles that should
	 * 											  either be associated with the
	 * 											  document or, if already 
	 * 											  associated, have their role 
	 * 											  updated.
	 * 
	 * @param campaignsToDisassociate A List of campaigns that should no longer
	 * 								  be associated with the document.
	 * 
	 * @param classAndRolesToAssociateOrUpdate A Map of class IDs to document
	 * 										   roles that should either be
	 * 										   associated with the document or,
	 * 										   if already associated, have 
	 * 										   their role updated.
	 * 
	 * @param classesToDisassociate A List of classes that should no longer be
	 * 								be associated with the document.
	 * 
	 * @param userAndRolesToAssociateOrUpdate A Map of user IDs to document 
	 * 										  roles that should either be 
	 * 										  associated with the document or,
	 * 										  if already associated, have their
	 * 										  role updated.
	 * 
	 * @param usersToDisassoicate A List of users that should no longer be 
	 * 							  associated with the document.
	 * 
	 * @throws ServiceException Thrown if there is an error.
	 */
Updates a document's information and/or contents. Except for the
'request' and the 'documentId', any parameter can be null indicating
that its value should not be updated.

@param documentId The unique identifier for the document to be updated.

@param newContents The new contents of the document.

@param newName The new name of the document.

@param newDescription The new description for the document.

@param newPrivacyState The new privacy state for the document.

@param campaignAndRolesToAssociateOrUpdate A Map of campaign IDs to
document roles that should
either be associated with the
document or, if already
associated, have their role
updated.

@param campaignsToDisassociate A List of campaigns that should no longer
be associated with the document.

@param classAndRolesToAssociateOrUpdate A Map of class IDs to document
roles that should either be
associated with the document or,
if already associated, have
their role updated.

@param classesToDisassociate A List of classes that should no longer be
be associated with the document.

@param userAndRolesToAssociateOrUpdate A Map of user IDs to document
roles that should either be
associated with the document or,
if already associated, have their
role updated.

@param usersToDisassoicate A List of users that should no longer be
associated with the document.

@throws ServiceException Thrown if there is an error.
Updates a document ' s information and / or contents . Except for the ' request ' and the ' documentId ' any parameter can be null indicating that its value should not be updated . @param documentId The unique identifier for the document to be updated . @param newContents The new contents of the document . @param newName The new name of the document . @param newDescription The new description for the document . @param newPrivacyState The new privacy state for the document . @param campaignAndRolesToAssociateOrUpdate A Map of campaign IDs to document roles that should either be associated with the document or if already associated have their role updated . @param campaignsToDisassociate A List of campaigns that should no longer be associated with the document . @param classAndRolesToAssociateOrUpdate A Map of class IDs to document roles that should either be associated with the document or if already associated have their role updated . @param classesToDisassociate A List of classes that should no longer be be associated with the document . @param userAndRolesToAssociateOrUpdate A Map of user IDs to document roles that should either be associated with the document or if already associated have their role updated . @param usersToDisassoicate A List of users that should no longer be associated with the document . @throws ServiceException Thrown if there is an error .
public void updateDocument(final String documentId, 
			final byte[] newContents, final String newName, 
			final String newDescription, 
			final Document.PrivacyState newPrivacyState,
			final Map<String, Document.Role> campaignAndRolesToAssociateOrUpdate, 
			final List<String> campaignsToDisassociate,
			final Map<String, Document.Role> classAndRolesToAssociateOrUpdate, 
			final Collection<String> classesToDisassociate,
			final Map<String, Document.Role> userAndRolesToAssociateOrUpdate, 
			final Collection<String> usersToDisassoicate) 
			throws ServiceException {
		try {
			documentQueries.updateDocument(documentId, newContents, newName, newDescription, newPrivacyState, 
					campaignAndRolesToAssociateOrUpdate, campaignsToDisassociate, 
					classAndRolesToAssociateOrUpdate, classesToDisassociate, 
					userAndRolesToAssociateOrUpdate, usersToDisassoicate);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public void updateDocument ( final String documentId , final byte [ ] newContents , final String newName , final String newDescription , final Document . PrivacyState newPrivacyState , final Map < String , Document . Role > campaignAndRolesToAssociateOrUpdate , final List < String > campaignsToDisassociate , final Map < String , Document . Role > classAndRolesToAssociateOrUpdate , final Collection < String > classesToDisassociate , final Map < String , Document . Role > userAndRolesToAssociateOrUpdate , final Collection < String > usersToDisassoicate ) throws ServiceException { try { documentQueries . updateDocument ( documentId , newContents , newName , newDescription , newPrivacyState , campaignAndRolesToAssociateOrUpdate , campaignsToDisassociate , classAndRolesToAssociateOrUpdate , classesToDisassociate , userAndRolesToAssociateOrUpdate , usersToDisassoicate ) ; } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Updates a document's information and/or contents.
Updates a document ' s information and / or contents .