cpExtension = new Extension(ExtensionType.ARTIFACTS, Extension.EXTENSION_NAME_CONTENT_PACKAGES, true); extensions.add(cpExtension); repoExtension = new Extension(ExtensionType.JSON, Extension.EXTENSION_NAME_REPOINIT, true); extensions.add(repoExtension); repoExtension.setJSON(textToJSON(repoinitText.toString()));
/** * Create a copy of the Extension * @return A copy of the Extension */ public Extension copy() { Extension c = new Extension(type, name, required); switch(type) { case TEXT: c.setText(text); break; case JSON: c.setJSON(text); break; case ARTIFACTS: if (artifacts != null) { for (Artifact a : artifacts) { c.getArtifacts().add(a.copy(a.getId())); } } break; } return c; }
final Extension list = new Extension(ExtensionType.ARTIFACTS, Extension.EXTENSION_NAME_ASSEMBLED_FEATURES, false); for(final ArtifactId id : usedFeatures) {
final Extension c = new Extension(e.getType(), e.getName(), e.isRequired()); switch ( c.getType() ) { case ARTIFACTS : for(final Artifact a : e.getArtifacts()) {