Changeset 5549 for ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/ComponentRegistry.java
- Timestamp:
- 08/11/14 16:07:55 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/ComponentRegistry.java
r4098 r5549 23 23 public static final String PUBLIC_NAME = "Public Registry"; 24 24 25 26 27 public Owner getRegistryOwner(); 28 public void setRegistryOwner(Owner registryOwner); 29 30 public RegistrySpace getRegistrySpace(); 31 public void setRegistrySpace(RegistrySpace registrySpace); 32 33 public Number getGroupId(); 34 public void setGroupId(Number groupId); 35 36 public Number getBaseDescriptionOwnerId(String cmdId); 37 38 public List<Number> getItemGroups(String cmdId); 25 39 /** 26 40 * @return List of component descriptions ordered by name ascending 27 41 * @throws ComponentRegistryException 28 42 */ 29 List<ComponentDescription> getComponentDescriptions() throws ComponentRegistryException; 30 31 /** 32 * @param principalName 33 * @param groupId 34 * @return List of component descriptions ordered by name ascending 35 * @throws ComponentRegistryException 36 */ 37 List<ComponentDescription> getComponentDescriptionsInGroup(String principalName, String groupId) throws ComponentRegistryException; 38 39 ComponentDescription getComponentDescription(String id) throws ComponentRegistryException; 40 43 List<ComponentDescription> getComponentDescriptions() throws ComponentRegistryException, UserUnauthorizedException; 44 45 46 ComponentDescription getComponentDescriptionAccessControlled(String id) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 47 48 41 49 /** 42 50 * … … 44 52 * @throws ComponentRegistryException 45 53 */ 46 List<ProfileDescription> getProfileDescriptions() throws ComponentRegistryException; 47 48 /** 49 * @param groupId 50 * @return List of profile descriptions ordered by name ascending 51 * @throws ComponentRegistryException 52 */ 53 List<ProfileDescription> getProfileDescriptionsInGroup(String groupId) throws ComponentRegistryException; 54 List<ProfileDescription> getProfileDescriptions() throws ComponentRegistryException, UserUnauthorizedException; 55 54 56 55 57 /** … … 65 67 * @throws ComponentRegistryException 66 68 */ 67 List<ProfileDescription> getProfileDescriptionsForMetadaEditor(String groupId) throws ComponentRegistryException; 68 69 ProfileDescription getProfileDescription(String id) throws ComponentRegistryException; 70 71 CMDComponentSpec getMDProfile(String id) throws ComponentRegistryException; 69 List<ProfileDescription> getProfileDescriptionsForMetadaEditor(Number groupId) throws ComponentRegistryException, UserUnauthorizedException; 70 71 ProfileDescription getProfileDescriptionAccessControlled(String id) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 72 73 CMDComponentSpec getMDProfileAccessControled(String id) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 74 75 CMDComponentSpec getMDComponentAccessControlled(String id) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 72 76 73 77 CMDComponentSpec getMDComponent(String id) throws ComponentRegistryException; 74 75 78 /** 76 79 * … … 84 87 * @return -1 if comment could not be registered 85 88 */ 86 int registerComment(Comment comment, String userId) throws ComponentRegistryException ;89 int registerComment(Comment comment, String userId) throws ComponentRegistryException, ItemNotFoundException, UserUnauthorizedException; 87 90 88 91 /** … … 90 93 * @return -1 if component could not be updated 91 94 */ 92 int update(BaseDescription description, CMDComponentSpec spec, Principal principal, boolean forceUpdate);95 int update(BaseDescription description, CMDComponentSpec spec, boolean forceUpdate) throws UserUnauthorizedException, ItemNotFoundException; 93 96 94 97 /** … … 97 100 * current (private) workspace to public workspace. 98 101 */ 99 int publish(BaseDescription desc, CMDComponentSpec spec, Principal principal); 100 101 void getMDProfileAsXml(String profileId, OutputStream output) throws ComponentRegistryException; 102 103 void getMDProfileAsXsd(String profileId, OutputStream outputStream) throws ComponentRegistryException; 104 105 void getMDComponentAsXml(String componentId, OutputStream output) throws ComponentRegistryException; 106 107 void getMDComponentAsXsd(String componentId, OutputStream outputStream) throws ComponentRegistryException; 108 109 /** 110 * 111 * @param profileId 112 * @param principal 102 int publish(BaseDescription desc, CMDComponentSpec spec, Principal principal) throws UserUnauthorizedException, ItemNotFoundException; 103 104 void getMDProfileAsXml(String profileId, OutputStream output) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 105 106 void getMDProfileAsXsd(String profileId, OutputStream outputStream) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 107 108 void getMDComponentAsXml(String componentId, OutputStream output) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 109 110 void getMDComponentAsXsd(String componentId, OutputStream outputStream) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 111 112 /** 113 * 114 * @param profileIds 113 115 * @throws IOException 114 116 * @throws UserUnauthorizedException … … 116 118 * @throws DeleteFailedException 117 119 */ 118 void deleteMDProfile(String profileId , Principal principal) throws IOException, UserUnauthorizedException, ComponentRegistryException, DeleteFailedException;120 void deleteMDProfile(String profileId) throws IOException, UserUnauthorizedException, ComponentRegistryException, DeleteFailedException, ItemNotFoundException; 119 121 120 122 /** … … 130 132 * @throws DeleteFailedException 131 133 */ 132 void deleteMDComponent(String componentId, Principal principal,boolean forceDelete) throws IOException, ComponentRegistryException, UserUnauthorizedException,133 DeleteFailedException ;134 void deleteMDComponent(String componentId, boolean forceDelete) throws IOException, ComponentRegistryException, UserUnauthorizedException, 135 DeleteFailedException, ItemNotFoundException; 134 136 135 137 /** … … 149 151 List<ProfileDescription> getUsageInProfiles(String componentId) throws ComponentRegistryException; 150 152 151 /** 152 * Return true if this registry is the public registry as opposed to a 153 * registry used for the user privately. 154 * */ 155 boolean isPublic(); 156 157 ComponentStatus getStatus(); 158 159 Owner getOwner(); 153 160 154 161 155 /** … … 168 162 * @return List of profile descriptions ordered by name ascending 169 163 */ 170 List<ProfileDescription> getDeletedProfileDescriptions() ;164 List<ProfileDescription> getDeletedProfileDescriptions()throws ComponentRegistryException; 171 165 172 166 /** … … 174 168 * @return List of component descriptions ordered by name ascending 175 169 */ 176 List<ComponentDescription> getDeletedComponentDescriptions() ;170 List<ComponentDescription> getDeletedComponentDescriptions() throws ComponentRegistryException; 177 171 178 172 /** … … 182 176 * @throws ComponentRegistryException 183 177 */ 184 List<Comment> getCommentsInProfile(String profileId , Principal principal) throws ComponentRegistryException;178 List<Comment> getCommentsInProfile(String profileId) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 185 179 186 180 /** … … 191 185 * @throws ComponentRegistryException 192 186 */ 193 Comment getSpecifiedCommentInProfile(String profileId, String commentId , Principal principal) throws ComponentRegistryException;187 Comment getSpecifiedCommentInProfile(String profileId, String commentId) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 194 188 195 189 /** … … 199 193 * @throws ComponentRegistryException 200 194 */ 201 List<Comment> getCommentsInComponent(String componentId , Principal principal) throws ComponentRegistryException;195 List<Comment> getCommentsInComponent(String componentId) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 202 196 203 197 /** … … 208 202 * @throws ComponentRegistryException 209 203 */ 210 Comment getSpecifiedCommentInComponent(String componentId, String commentId , Principal principal) throws ComponentRegistryException;204 Comment getSpecifiedCommentInComponent(String componentId, String commentId) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException; 211 205 212 206 /** … … 219 213 * @throws DeleteFailedException 220 214 */ 221 public void deleteComment(String commentId , Principal principal) throws IOException, ComponentRegistryException, UserUnauthorizedException,222 DeleteFailedException ;215 public void deleteComment(String commentId) throws IOException, ComponentRegistryException, UserUnauthorizedException, 216 DeleteFailedException, ItemNotFoundException; 223 217 224 218 /** … … 239 233 */ 240 234 List<String> getAllNonDeletedComponentIds(); 235 236 Boolean isItemPublic(String id) throws ItemNotFoundException; 237 241 238 }
Note: See TracChangeset
for help on using the changeset viewer.