summaryrefslogtreecommitdiff
path: root/pdf-over-commons
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-commons')
-rw-r--r--pdf-over-commons/pdf-over-commons.iml14
-rw-r--r--pdf-over-commons/pom.xml15
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java53
3 files changed, 82 insertions, 0 deletions
diff --git a/pdf-over-commons/pdf-over-commons.iml b/pdf-over-commons/pdf-over-commons.iml
new file mode 100644
index 00000000..597cd8e6
--- /dev/null
+++ b/pdf-over-commons/pdf-over-commons.iml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module> \ No newline at end of file
diff --git a/pdf-over-commons/pom.xml b/pdf-over-commons/pom.xml
new file mode 100644
index 00000000..1a68b59a
--- /dev/null
+++ b/pdf-over-commons/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>pdf-over</artifactId>
+ <groupId>at.a-sit</groupId>
+ <version>4.2.4-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>pdf-over-commons</artifactId>
+
+
+</project> \ No newline at end of file
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java
new file mode 100644
index 00000000..ef2eccd8
--- /dev/null
+++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java
@@ -0,0 +1,53 @@
+package at.asit.pdfover.commons;
+
+public enum Profile {
+
+ SIGNATURBLOCK_SMALL("Signaturblock Normal"), //$NON-NLS-1$
+ AMTSSIGNATURBLOCK("Amtssignatur"), //$NON-NLS-1$
+ BASE_LOGO("Nur Bildmarke"), //$NON-NLS-1$
+ INVISIBLE("Unsichtbar");
+
+ public static int length = 4;
+ private String name;
+
+ Profile(String profile){
+ this.name = profile;
+ }
+
+ public static String[] getProfileStrings() {
+ String[] profiles = new String[Profile.length];
+ int i = 0;
+ for (Profile profile : Profile.values()) {
+ profiles[i] = profile.getName();
+ i++;
+ }
+ return profiles;
+ }
+
+ public static Profile getProfileByIndex(int index) {
+ String[] profiles = getProfileStrings();
+ if (profiles.length < index) {
+ return null;
+ }
+ return getProfile(profiles[index]);
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public static Profile getProfile(String profile) {
+ if (SIGNATURBLOCK_SMALL.getName().equals(profile)) {
+ return SIGNATURBLOCK_SMALL;
+ } else if (AMTSSIGNATURBLOCK.getName().equals(profile)) {
+ return AMTSSIGNATURBLOCK;
+ } else if (BASE_LOGO.getName().equals(profile)) {
+ return BASE_LOGO;
+ } else if (INVISIBLE.getName().equals(profile)){
+ return INVISIBLE;
+ }
+ return null;
+ }
+
+
+}