diff options
Diffstat (limited to 'id/server/moa-id-commons/src/main/java')
13 files changed, 20 insertions, 116 deletions
diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/ConfigurationUtil.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java index e771b96a2..d8fde7eee 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/ConfigurationUtil.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf; +package at.gv.egovernment.moa.id.commons.config; import java.io.File; import java.io.FileInputStream; @@ -16,11 +16,11 @@ import javax.xml.bind.Unmarshaller; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import at.gv.egovernment.moa.id.commons.config.persistence.Configuration; +import at.gv.egovernment.moa.id.commons.config.persistence.JsonMapper; import at.gv.egovernment.moa.id.commons.db.MOAIDConfigurationConstants; import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration; -import com.datentechnik.moa.id.conf.persistence.Configuration; -import com.datentechnik.moa.id.conf.persistence.JsonMapper; import com.fasterxml.jackson.core.JsonProcessingException; public class ConfigurationUtil { @@ -128,7 +128,7 @@ public class ConfigurationUtil { ApplicationContext context = new ClassPathXmlApplicationContext("configuration.beans.xml"); Configuration dbConfiguration = (Configuration) context.getBean("config"); boolean prettyPrint = true; - com.datentechnik.moa.id.conf.persistence.JsonMapper mapper = new JsonMapper(prettyPrint); + at.gv.egovernment.moa.id.commons.config.persistence.JsonMapper mapper = new JsonMapper(prettyPrint); for (String key : MOAIDConfigurationConstants.getAllMOAIDConfigurationKeys()) { diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/MigrateConfiguration.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MigrateConfiguration.java index fefcf5028..4e8c7dffd 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/MigrateConfiguration.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MigrateConfiguration.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf; +package at.gv.egovernment.moa.id.commons.config; import java.io.File; import java.io.FileInputStream; @@ -7,8 +7,8 @@ import java.io.IOException; import javax.xml.bind.JAXBException; -import com.datentechnik.moa.id.conf.cli.MOAIDConfCLI; -import com.datentechnik.moa.id.conf.cli.MigrateConfigurationParams; +import at.gv.egovernment.moa.id.commons.config.cli.MOAIDConfCLI; +import at.gv.egovernment.moa.id.commons.config.cli.MigrateConfigurationParams; /** * CLI tool which is able to perform the following tasks: diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/cli/CLIConstants.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/cli/CLIConstants.java index 481b6d6f6..c652645fc 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/cli/CLIConstants.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/cli/CLIConstants.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.cli; +package at.gv.egovernment.moa.id.commons.config.cli; /** * Constants for the CLI. diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/cli/MOAIDConfCLI.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/cli/MOAIDConfCLI.java index ac5ead171..f2753c3d0 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/cli/MOAIDConfCLI.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/cli/MOAIDConfCLI.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.cli; +package at.gv.egovernment.moa.id.commons.config.cli; import java.io.OutputStream; import java.io.PrintWriter; diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/cli/MigrateConfigurationParams.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/cli/MigrateConfigurationParams.java index da2cac31b..86bde1310 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/cli/MigrateConfigurationParams.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/cli/MigrateConfigurationParams.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.cli; +package at.gv.egovernment.moa.id.commons.config.cli; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.MissingOptionException; diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/Configuration.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/Configuration.java index 406c21026..f357fc570 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/Configuration.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/Configuration.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.persistence; +package at.gv.egovernment.moa.id.commons.config.persistence; import java.util.List; diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/ConfigurationImpl.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/ConfigurationImpl.java index 43974de7a..c90b60440 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/ConfigurationImpl.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/ConfigurationImpl.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.persistence; +package at.gv.egovernment.moa.id.commons.config.persistence; import java.io.IOException; import java.util.ArrayList; @@ -11,8 +11,9 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Required; import org.springframework.stereotype.Component; -import com.datentechnik.moa.id.conf.persistence.dal.ConfigProperty; -import com.datentechnik.moa.id.conf.persistence.dal.ConfigPropertyDao; +import at.gv.egovernment.moa.id.commons.db.dao.config.ConfigProperty; +import at.gv.egovernment.moa.id.commons.db.dao.config.ConfigPropertyDao; + import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/JsonMapper.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/JsonMapper.java index 8e5d2e7c4..6138d571b 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/JsonMapper.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/JsonMapper.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.persistence; +package at.gv.egovernment.moa.id.commons.config.persistence; import java.io.IOException; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java index 0dd232773..28363a1eb 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java @@ -7,6 +7,7 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import at.gv.egovernment.moa.id.commons.config.persistence.Configuration; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral; import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes; import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs; @@ -17,8 +18,6 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates; import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase; import at.gv.egovernment.moa.logging.Logger; -import com.datentechnik.moa.id.conf.persistence.Configuration; - /** * * diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java index e1b51ee9b..de4a1789e 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBWrite.java @@ -6,6 +6,7 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import at.gv.egovernment.moa.id.commons.config.persistence.Configuration; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral; import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes; import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs; @@ -15,8 +16,6 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates; import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase; -import com.datentechnik.moa.id.conf.persistence.Configuration; - /** * This class is used for writing to the key-value database. */ diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigPropertyDao.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyDao.java index 8f00bd226..db35ba1df 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigPropertyDao.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyDao.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.persistence.dal; +package at.gv.egovernment.moa.id.commons.db.dao.config; import java.util.List; import java.util.Set; diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigPropertyDaoImpl.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyDaoImpl.java index 6de10e9b9..6a76c1d17 100644 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigPropertyDaoImpl.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyDaoImpl.java @@ -1,4 +1,4 @@ -package com.datentechnik.moa.id.conf.persistence.dal; +package at.gv.egovernment.moa.id.commons.db.dao.config; import java.util.List; import java.util.Set; diff --git a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigProperty.java b/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigProperty.java deleted file mode 100644 index 7e4e217b0..000000000 --- a/id/server/moa-id-commons/src/main/java/com/datentechnik/moa/id/conf/persistence/dal/ConfigProperty.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.datentechnik.moa.id.conf.persistence.dal; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; - -/** - * Reflects a MOAID configuration entry. - * - */ -@Table(name = "moaid_configuration") -@Entity -public class ConfigProperty implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @Column(name = "propertyKey", unique = true) - private String key; - - @Lob - @Column(name = "propertyValue") - private String value; - - /** - * Returns the property's key. - * @return The key. - */ - public String getKey() { - return key; - } - - /** - * Sets the property's key. - * @param key The key - */ - public void setKey(String key) { - this.key = key; - } - - /** - * Returns the property's value (which might be {@code null}). - * @return The property's value (might be {@code null}). - */ - public String getValue() { - return value; - } - - /** - * Sets the property's value. - * @param value The value - */ - public void setValue(String value) { - this.value = value; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((key == null) ? 0 : key.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ConfigProperty other = (ConfigProperty) obj; - if (key == null) { - if (other.key != null) - return false; - } else if (!key.equals(other.key)) - return false; - return true; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("ConfigProperty [key="); - builder.append(key); - builder.append(", value="); - builder.append(value); - builder.append("]"); - return builder.toString(); - } -} |