Changeset 5591
- Timestamp:
- 08/21/14 15:24:24 (10 years ago)
- Location:
- VirtualCollectionRegistry/trunk/VirtualCollectionRegistry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/Protocol.txt
r5512 r5591 39 39 description: A virtual collection will be created based on the 40 40 representation of the virtual collection sent in 41 the request body. 41 the request body. ID and state, if provided, will be 42 ignored so this will always result in a private collection 43 with a new identifier. 42 44 HTTP method: POST 43 45 URI: $BASE/service/virtualcollections -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/assembly/distribution.xml
r5588 r5591 15 15 <include>LICENSE*</include> 16 16 <include>NOTICE*</include> 17 <include>Protocol.txt</include> 17 18 </includes> 18 19 </fileSet> -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/VirtualCollectionRegistry.java
r5543 r5591 102 102 } 103 103 104 /** 105 * Will store the specified collection; it will also set the owner according 106 * to the specified principal and set its state to 107 * {@link VirtualCollection.State#PRIVATE} 108 * 109 * @param principal owner principal 110 * @param vc collection to store 111 * @return identifier of the persisted collection 112 * @throws VirtualCollectionRegistryException 113 */ 104 114 public long createVirtualCollection(Principal principal, 105 115 VirtualCollection vc) throws VirtualCollectionRegistryException { … … 124 134 em.persist(user); 125 135 } 136 vc.setOwner(user); 137 138 // force new collection to be private 139 vc.setState(VirtualCollection.State.PRIVATE); 126 140 127 141 // store virtual collection 128 vc.setOwner(user);129 142 logger.debug("persisting new virtual collection", vc.getId()); 130 143 em.persist(vc); … … 685 698 }); 686 699 } 687 700 688 701 private boolean isAllowedToModify(Principal principal, VirtualCollection c) { 689 702 // admin and owner are allowed to modify collections
Note: See TracChangeset
for help on using the changeset viewer.