final Artifact cp = sa.copy(sa.getId());
/** * 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 Artifact cp = sa.copy(sa.getId());