From 47615b97181da1c25881bdd4e9b61256476ce5b4 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 9 Apr 2014 11:05:01 +0200 Subject: update user initialized PVP2 metadata reload process --- .../protocols/pvp2x/metadata/MOAMetadataProvider.java | 12 +++++++++++- .../src/main/resources/config/moaid_config_2.0.xsd | 18 +++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java index 6d9022bd9..f2e3e7cb1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/metadata/MOAMetadataProvider.java @@ -124,6 +124,7 @@ public class MOAMetadataProvider implements MetadataProvider { .getAllActiveOnlineApplications(); //set Timestamp + Date oldTimeStamp = timestamp; timestamp = new Date(); Iterator oaIt = oaList.iterator(); @@ -138,7 +139,16 @@ public class MOAMetadataProvider implements MetadataProvider { String metadataurl = pvp2Config.getMetadataURL(); if (loadedproviders.containsKey(metadataurl)) { - //PVP2 OA is actually loaded, to nothing + + if (pvp2Config.getUpdateRequiredItem() != null && + pvp2Config.getUpdateRequiredItem().after(oldTimeStamp)) { + //PVP2 OA is actually loaded, but update is requested + Logger.info("Reload metadata for: " + oa.getFriendlyName()); + loadedproviders.get(metadataurl).refresh(); + + } + + // PVP2 OA is actually loaded, to nothing providersinuse.put(metadataurl, loadedproviders.get(metadataurl)); loadedproviders.remove(metadataurl); diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd index d7f48e51a..e8562a57b 100644 --- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd +++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd @@ -842,6 +842,7 @@ + @@ -884,17 +885,12 @@ - - - - - - + + + + + + -- cgit v1.2.3