public class EntryCreator extends HasEntry
accountDAO, entryDAO
Constructor and Description |
---|
EntryCreator() |
Modifier and Type | Method and Description |
---|---|
protected void |
addReadPermission(Account account,
Group group,
Entry entry) |
protected void |
addWritePermission(Account account,
Entry entry) |
PartData |
copyPart(String userId,
String sourceId)
Creates a copy of
|
Entry |
createEntry(Account account,
Entry entry,
ArrayList<AccessPermission> accessPermissions)
Create an entry in the database.
|
PartData |
createPart(String userId,
PartData part)
Creates a new entry using the passed data
|
public Entry createEntry(Account account, Entry entry, ArrayList<AccessPermission> accessPermissions)
account
- account of user creating entryentry
- entry record being createdaccessPermissions
- list of permissions to associate with created entrypublic PartData createPart(String userId, PartData part)
userId
- unique identifier for user creating entrypart
- data used to create new partpublic PartData copyPart(String userId, String sourceId)
userId
- identifier for user making requestsourceId
- unique identifier for part acting as source of copy. Can be the part id, uuid or idIllegalArgumentException
- if the source part for the copy cannot be located using the identifierCopyright © 2017. All rights reserved.