Changeset 2150


Ignore:
Timestamp:
08/23/12 16:13:06 (12 years ago)
Author:
olhsha
Message:

key stuff for fixing tickets 50 and 180 is discussed and coded

Location:
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java

    r1993 r2150  
    1010import clarin.cmdi.componentregistry.UserUnauthorizedException;
    1111import clarin.cmdi.componentregistry.components.CMDComponentSpec;
     12import clarin.cmdi.componentregistry.components.CMDComponentType;
    1213import clarin.cmdi.componentregistry.model.AbstractDescription;
    1314import clarin.cmdi.componentregistry.model.Comment;
     
    793794            validate(response, descriptionValidator, validator);
    794795            if (response.getErrors().isEmpty()) {
    795                 CMDComponentSpec spec = validator.getCMDComponentSpec();
     796               
     797                CMDComponentSpec spec = validator.getCMDComponentSpec();
     798               
     799                // Olha was here: remove filename from spec before it gets extended!!! recursion over all the components
     800                List<CMDComponentType> listofcomponents=spec.getCMDComponent();
     801                for (CMDComponentType currentcomponent : listofcomponents) {
     802                    currentcomponent.setFilename(null);
     803                }
     804               
    796805                try {
     806                       
     807                   
    797808                    // Expand to check for recursion
    798809                    registry.getExpander().expandNestedComponent(spec.getCMDComponent(), desc.getId());
    799810
     811                   
     812                   
    800813                    // Add profile
     814                   
     815                   
    801816                    int returnCode = action.execute(desc, spec, response, registry);
    802817                    if (returnCode == 0) {
Note: See TracChangeset for help on using the changeset viewer.