@Override public ST normalize(Object configNode, ConfigProperty property, ProcessingContext ctx) throws ConfigurationException { return getDefaultTypeAdapter(ctx, property).normalize(configNode, property, ctx); } }
@Override public Map toConfigNode(ApplicationEntity object, ConfigProperty property, SavingContext ctx) throws ConfigurationException { Map aeNode = super.toConfigNode(object, property, ctx); // strip the TCs out in case the TCGroupConfigAEExtension is present if (object.getAEExtension(TCGroupConfigAEExtension.class) != null) { // we cannot do this since we don't want to change the state of the ae object // object.setTransferCapabilities(Collections.<TransferCapability>emptyList()); // so we modify the serialized node instead Nodes.removeNodes(aeNode, DicomPath.AETransferCapabilities.path()); } return aeNode; }
@Override public ApplicationEntity fromConfigNode(Map configNode, ConfigProperty property, LoadingContext ctx, Object parent) throws ConfigurationException { ApplicationEntity applicationEntity = super.fromConfigNode(configNode, property, ctx, parent); TCGroupConfigAEExtension tcGroupConfigAEExtension = applicationEntity.getAEExtension(TCGroupConfigAEExtension.class); if (tcGroupConfigAEExtension != null) { // override any entries that might have been added before applicationEntity.setTransferCapabilities(new ArrayList<TransferCapability>()); // add processed TCs from pre-configured groups to this ae for (Map.Entry<String, TCGroupConfigAEExtension.TCGroupDetails> tcGroupRefEntry : tcGroupConfigAEExtension.getScpTCs().entrySet()) addTC(applicationEntity, tcGroupsProvider.getTCGroups(), tcGroupRefEntry, TransferCapability.Role.SCP); for (Map.Entry<String, TCGroupConfigAEExtension.TCGroupDetails> tcGroupRefEntry : tcGroupConfigAEExtension.getScuTCs().entrySet()) addTC(applicationEntity, tcGroupsProvider.getTCGroups(), tcGroupRefEntry, TransferCapability.Role.SCU); } return applicationEntity; }
@Override public T fromConfigNode(ST configNode, ConfigProperty property, LoadingContext ctx, Object parent) throws ConfigurationException { return getDefaultTypeAdapter(ctx, property).fromConfigNode(configNode, property, ctx, parent); }
@Override public ST toConfigNode(T object, ConfigProperty property, SavingContext ctx) throws ConfigurationException { return getDefaultTypeAdapter(ctx, property).toConfigNode(object, property, ctx); }
@Override public Map<String, Object> getSchema(ConfigProperty property, ProcessingContext ctx) throws ConfigurationException { return getDefaultTypeAdapter(ctx, property).getSchema(property, ctx); }