src/org/ohmage/service/DocumentServices.java
public String createDocument(final byte[] contents, 
			final String name, final String description, 
			final Document.PrivacyState privacyState,
			final Map<String, Document.Role> campaignRoleMap, 
			final Map<String, Document.Role> classRoleMap, 
			final String creatorUsername) throws ServiceException {
		
		try {
			return documentQueries.createDocument(contents, name, description, privacyState, campaignRoleMap, classRoleMap, creatorUsername);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
/**
	 * Creates a new document in the database.
	 * 
	 * @param contents The contents of the new document.
	 * 
	 * @param name The name of the document.
	 * 
	 * @param description An optional description of the document.
	 * 
	 * @param privacyState The initial privacy state of the document.
	 * 
	 * @param campaignRoleMap A Map of campaign IDs to document roles to which
	 * 						  this document will initially be associated.
	 * 
	 * @param classRoleMap A Map of class IDs to document roles to which this
	 * 					   document will initially be associated.
	 * 
	 * @param creatorUsername The creator of this document's username.
	 * 
	 * @return Returns a unique identifier for this document.
	 * 
	 * @throws ServiceException Thrown if there is an error.
	 */
Creates a new document in the database.

@param contents The contents of the new document.

@param name The name of the document.

@param description An optional description of the document.

@param privacyState The initial privacy state of the document.

@param campaignRoleMap A Map of campaign IDs to document roles to which
this document will initially be associated.

@param classRoleMap A Map of class IDs to document roles to which this
document will initially be associated.

@param creatorUsername The creator of this document's username.

@return Returns a unique identifier for this document.

@throws ServiceException Thrown if there is an error.
Creates a new document in the database . @param contents The contents of the new document . @param name The name of the document . @param description An optional description of the document . @param privacyState The initial privacy state of the document . @param campaignRoleMap A Map of campaign IDs to document roles to which this document will initially be associated . @param classRoleMap A Map of class IDs to document roles to which this document will initially be associated . @param creatorUsername The creator of this document ' s username . @return Returns a unique identifier for this document . @throws ServiceException Thrown if there is an error .
public String createDocument(final byte[] contents, 
			final String name, final String description, 
			final Document.PrivacyState privacyState,
			final Map<String, Document.Role> campaignRoleMap, 
			final Map<String, Document.Role> classRoleMap, 
			final String creatorUsername) throws ServiceException {
		try {
			return documentQueries.createDocument(contents, name, description, privacyState, campaignRoleMap, classRoleMap, creatorUsername);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
	}
public String createDocument ( final byte [ ] contents , final String name , final String description , final Document . PrivacyState privacyState , final Map < String , Document . Role > campaignRoleMap , final Map < String , Document . Role > classRoleMap , final String creatorUsername ) throws ServiceException { try { return documentQueries . createDocument ( contents , name , description , privacyState , campaignRoleMap , classRoleMap , creatorUsername ) ; } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } }
Creates a new document in the database.
Creates a new document in the database .