Changeset 5549 for ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/IComponentRegistryRestService.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/rest/IComponentRegistryRestService.java
r4135 r5549 1 1 package clarin.cmdi.componentregistry.rest; 2 2 3 import clarin.cmdi.componentregistry.UserUnauthorizedException; 3 4 import java.io.IOException; 4 5 import java.io.InputStream; … … 13 14 14 15 import clarin.cmdi.componentregistry.AllowedAttributetypesXML; 15 import clarin.cmdi.componentregistry.ComponentRegistry;16 16 import clarin.cmdi.componentregistry.ComponentRegistryException; 17 17 import clarin.cmdi.componentregistry.ComponentRegistryFactory; … … 44 44 public static final String GROUP_FORM_FIELD = "group"; 45 45 public static final String DOMAIN_FORM_FIELD = "domainName"; 46 public static final String USERSPACE_PARAM = "userspace";46 public static final String REGISTRY_SPACE_PARAM = "registrySpace"; 47 47 public static final String GROUPID_PARAM = "groupid"; 48 48 public static final String METADATA_EDITOR_PARAM = "mdEditor"; 49 49 public static final String NUMBER_OF_RSSITEMS = "limit"; 50 50 51 List<ComponentDescription> getRegisteredComponents(boolean userspace, String groupId) 52 throws ComponentRegistryException; 53 54 List<ProfileDescription> getRegisteredProfiles(boolean userspace, 55 boolean metadataEditor, String groupId) throws ComponentRegistryException; 56 57 Response getRegisteredComponent(String componentId, boolean userspace) 58 throws ComponentRegistryException; 59 60 Response getRegisteredComponentRawType(String componentId, String rawType); 61 62 ComponentRegistry findRegistry(String id, 63 RegistryClosure<? extends BaseDescription> clos) 64 throws ComponentRegistryException; 65 66 Response getRegisteredProfile(String profileId, boolean userspace) 67 throws ComponentRegistryException; 68 69 List<BaseDescription> getComponentUsage(String componentId, 70 boolean userspace) throws ComponentRegistryException; 71 72 List<Comment> getCommentsFromProfile(String profileId, boolean userspace) 73 throws ComponentRegistryException; 74 75 List<Comment> getCommentsFromComponent(String componentId, boolean userspace) 76 throws ComponentRegistryException; 77 78 Comment getSpecifiedCommentFromProfile(String profileId, String commentId, 79 boolean userspace) throws ComponentRegistryException; 80 81 Comment getSpecifiedCommentFromComponent(String componentId, 82 String commentId, boolean userspace) 83 throws ComponentRegistryException; 51 List<ComponentDescription> getRegisteredComponents(String registrySpace, String groupId) 52 throws ComponentRegistryException, IOException, UserUnauthorizedException; 53 54 List<ProfileDescription> getRegisteredProfiles(String registrySpace, boolean metadataEditor, String groupId) throws ComponentRegistryException, IOException, UserUnauthorizedException; 55 56 Response getRegisteredComponent(String componentId) throws IOException; 57 58 Response getRegisteredProfile(String profileId) throws IOException; 59 60 Response getRegisteredComponentRawType(String componentId, String rawType) throws ComponentRegistryException; 61 62 63 // ComponentRegistry findRegistry(String id, 64 // RegistryClosure<? extends BaseDescription> clos) 65 // throws ComponentRegistryException; 66 // 67 // 68 69 List<BaseDescription> getComponentUsage(String componentId) throws ComponentRegistryException, IOException; 70 71 List<Comment> getCommentsFromProfile(String profileId) throws ComponentRegistryException, IOException; 72 73 List<Comment> getCommentsFromComponent(String componentId) throws ComponentRegistryException, IOException; 74 75 Comment getSpecifiedCommentFromProfile(String profileId, String commentId) throws ComponentRegistryException, IOException ; 76 77 Comment getSpecifiedCommentFromComponent(String componentId, String commentId) throws ComponentRegistryException, IOException ; 84 78 85 79 /** … … 92 86 * @return 93 87 */ 94 Response manipulateRegisteredProfile(String profileId, String method, 95 boolean userspace); 88 Response manipulateRegisteredProfile(String profileId, String method); 96 89 97 90 Response manipulateCommentFromProfile(String profileId, String commentId, 98 String method , boolean userspace);91 String method); 99 92 100 93 Response manipulateCommentFromComponent(String componentId, 101 String commentId, String method , boolean userspace);94 String commentId, String method); 102 95 103 96 Response publishRegisteredProfile(String profileId, InputStream input, 104 97 String name, String description, String group, String domainName); 105 98 106 Response updateRegisteredProfile(String profileId, boolean userspace,107 InputStream input, String name, String description, String group ,99 Response updateRegisteredProfile(String profileId, 100 InputStream input, String name, String description, String groupId, 108 101 String domainName); 109 102 … … 117 110 * @return 118 111 */ 119 Response manipulateRegisteredComponent(String componentId, String method, 120 boolean userspace); 112 Response manipulateRegisteredComponent(String componentId, String method); 121 113 122 114 Response publishRegisteredComponent(String componentId, InputStream input, 123 String name, String description, String group , String domainName);124 125 Response updateRegisteredComponent(String componentId, boolean userspace,126 InputStream input, String name, String description, String group ,115 String name, String description, String groupId, String domainName); 116 117 Response updateRegisteredComponent(String componentId, 118 InputStream input, String name, String description, String groupId, 127 119 String domainName); 128 120 129 Response deleteRegisteredComponent(String componentId, boolean userspace); 130 131 Response deleteRegisteredProfile(String profileId, boolean userspace); 132 133 Response deleteCommentFromProfile(String profileId, String commentId, 134 boolean userspace); 135 136 Response deleteCommentFromComponent(String componentId, String commentId, 137 boolean userspace); 138 139 Response getRegisteredProfileRawType(String profileId, String rawType); 121 Response deleteRegisteredComponent(String componentId); 122 123 Response deleteRegisteredProfile(String profileId); 124 125 Response deleteCommentFromProfile(String profileId, String commentId); 126 127 Response deleteCommentFromComponent(String componentId, String commentId); 128 129 Response getRegisteredProfileRawType(String profileId, String rawType) throws ComponentRegistryException; 140 130 141 131 Response registerProfile(InputStream input, String name, 142 String description, String group, String domainName, 143 boolean userspace); 132 String description, String groupId, String domainName); 144 133 145 134 Response registerComponent(InputStream input, String name, 146 String description, String group, String domainName, 147 boolean userspace); 148 149 Response registerCommentInComponent(InputStream input, String componentId, 150 boolean userspace) throws ComponentRegistryException; 151 152 Response registerCommentInProfile(InputStream input, String profileId, 153 boolean userspace) throws ComponentRegistryException; 135 String description, String groupId, String domainName); 136 137 Response registerCommentInComponent(InputStream input, String componentId) throws ComponentRegistryException; 138 139 Response registerCommentInProfile(InputStream input, String profileId) throws ComponentRegistryException; 154 140 155 141 Response pingSession(); … … 158 144 * @param componentRegistryFactory the componentRegistryFactory to set 159 145 */ 160 void setComponentRegistryFactory( 161 ComponentRegistryFactory componentRegistryFactory); 146 void setComponentRegistryFactory(ComponentRegistryFactory componentRegistryFactory); 162 147 163 148 /** … … 169 154 * @throws ParseException 170 155 */ 171 Rss getRssComponent( boolean userspace, String limit)172 throws ComponentRegistryException, ParseException ;156 Rss getRssComponent(String groupId, String registrySpace, String limit) 157 throws ComponentRegistryException, ParseException, IOException; 173 158 174 159 /** … … 180 165 * @throws ParseException 181 166 */ 182 Rss getRssProfile( boolean userspace, String limit)183 throws ComponentRegistryException, ParseException ;167 Rss getRssProfile(String groupId, String registrySpace, String limit) 168 throws ComponentRegistryException, ParseException, IOException; 184 169 185 170 /** … … 194 179 * @throws ParseException 195 180 */ 196 Rss getRssOfCommentsFromProfile(String profileId, boolean userspace, 197 String limit) throws ComponentRegistryException, IOException, 198 JAXBException, ParseException; 181 Rss getRssOfCommentsFromProfile(String profileId, String limit) throws ComponentRegistryException, 182 JAXBException, ParseException, IOException; 199 183 200 184 /** … … 209 193 * @throws ParseException 210 194 */ 211 Rss getRssOfCommentsFromComponent(String componentId, boolean userspace,195 Rss getRssOfCommentsFromComponent(String componentId, 212 196 String limit) throws ComponentRegistryException, IOException, 213 197 JAXBException, ParseException; … … 237 221 * @param groupId 238 222 */ 239 void transferItemOwnershipToGroup(String itemId, long groupId);223 String transferItemOwnershipToGroup(String itemId, long groupId) throws IOException; 240 224 241 225 /** … … 244 228 * @return 245 229 */ 246 BaseDescription get ComponentDescription(String componentId) throws ComponentRegistryException;230 BaseDescription getBaseDescription(String componentId) throws ComponentRegistryException, IOException; 247 231 248 232 }
Note: See TracChangeset
for help on using the changeset viewer.