public void convertContentLocations(YContentEntry<?> entry) { if (entry instanceof YContentDirectory) { YContentDirectory dir = (YContentDirectory) entry; for (YContentEntry<?> e : dir.getEntries()) { convertContentLocations(e); } return; } YContentFile file = (YContentFile) entry; List<String> newLocations = new ArrayList<String>(); for (String location : file.getLocations()) { newLocations.add(location.replaceAll("^" + YConstants.MISC_PACK_RELATIVE_CONTENT_PREFIX + "archive/", YConstants.MISC_LOCAL_CONTENT_ADDRESS_PREFIX)); } file.setLocations(newLocations); }
public void convertContentLocations(YContentEntry<?> entry) { if (entry instanceof YContentDirectory) { YContentDirectory dir = (YContentDirectory) entry; for (YContentEntry<?> e : dir.getEntries()) { convertContentLocations(e); } return; } YContentFile file = (YContentFile) entry; List<String> newLocations = new ArrayList<String>(); for (String location : file.getLocations()) { if (location.startsWith(BasicPackConstants.NEW_CONTENT_DIRECTORY) ||location.startsWith(BasicPackConstants.OLD_CONTENT_DIRECTORY) || location.startsWith(BasicPackConstants.OLD_FULLTEXTS_DIRECTORY) ){ try { newLocations.add(bpi.contentPathToArchiveUri(location)); } catch (Exception ex) { log.error(ex.getLocalizedMessage(), ex); newLocations.add(location); } } else { newLocations.add(location); } } file.setLocations(newLocations); }
description.setId(template.getId()); description.setLanguages(template.getLanguages()); description.setLocations(template.getLocations()); description.setNames(template.getNames()); description.setSignatures(template.getSignatures());
description.setId(template.getId()); description.setLanguages(template.getLanguages()); description.setLocations(template.getLocations()); description.setNames(template.getNames()); description.setSignatures(template.getSignatures());