Changeset 1339
- Timestamp:
- 05/18/11 15:53:21 (13 years ago)
- Location:
- ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/impl
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/impl/database/ComponentRegistryDbImpl.java
r1337 r1339 8 8 import clarin.cmdi.componentregistry.UserUnauthorizedException; 9 9 import clarin.cmdi.componentregistry.components.CMDComponentSpec; 10 import clarin.cmdi.componentregistry.impl.ComponentRegistryImplBase; 10 11 import clarin.cmdi.componentregistry.model.AbstractDescription; 11 12 import clarin.cmdi.componentregistry.model.ComponentDescription; … … 33 34 * @author Twan Goosen <twan.goosen@mpi.nl> 34 35 */ 35 public class ComponentRegistryDbImpl implements ComponentRegistry{36 public class ComponentRegistryDbImpl extends ComponentRegistryImplBase implements ComponentRegistry { 36 37 37 38 private final static Logger LOG = LoggerFactory.getLogger(ComponentRegistryDbImpl.class); … … 251 252 throw ex; 252 253 } 253 }254 255 @Override256 public List<ComponentDescription> getUsageInComponents(String componentId) {257 throw new UnsupportedOperationException("Not supported yet.");258 }259 260 @Override261 public List<ProfileDescription> getUsageInProfiles(String componentId) {262 throw new UnsupportedOperationException("Not supported yet.");263 254 } 264 255 -
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/impl/filesystem/ComponentRegistryImpl.java
r1335 r1339 1 1 package clarin.cmdi.componentregistry.impl.filesystem; 2 2 3 import clarin.cmdi.componentregistry.impl.ComponentRegistryImplBase; 3 4 import clarin.cmdi.componentregistry.ComponentRegistry; 4 5 import clarin.cmdi.componentregistry.ComponentRegistryUtils; … … 11 12 import java.io.IOException; 12 13 import java.io.OutputStream; 13 import java.io.UnsupportedEncodingException;14 14 import java.security.Principal; 15 15 import java.text.ParseException; … … 41 41 import clarin.cmdi.componentregistry.model.ProfileDescription; 42 42 43 public class ComponentRegistryImpl implements ComponentRegistry {43 public class ComponentRegistryImpl extends ComponentRegistryImplBase implements ComponentRegistry { 44 44 45 45 public static final String DESCRIPTION_FILE_NAME = "description.xml"; … … 395 395 396 396 @Override 397 public List<ComponentDescription> getUsageInComponents(String componentId) {398 List<ComponentDescription> result = new ArrayList<ComponentDescription>();399 List<ComponentDescription> descs = getComponentDescriptions();400 for (ComponentDescription desc : descs) {401 CMDComponentSpec spec = getMDComponent(desc.getId());402 if (spec != null && ComponentRegistryUtils.findComponentId(componentId, spec.getCMDComponent())) {403 result.add(desc);404 }405 }406 return result;407 }408 409 @Override410 public List<ProfileDescription> getUsageInProfiles(String componentId) {411 List<ProfileDescription> result = new ArrayList<ProfileDescription>();412 for (ProfileDescription profileDescription : getProfileDescriptions()) {413 CMDComponentSpec profile = getMDProfile(profileDescription.getId());414 if (profile != null && ComponentRegistryUtils.findComponentId(componentId, profile.getCMDComponent())) {415 result.add(profileDescription);416 }417 }418 return result;419 }420 421 @Override422 397 public boolean isPublic() { 423 398 return isPublic;
Note: See TracChangeset
for help on using the changeset viewer.