summaryrefslogtreecommitdiff
path: root/pdf-over-commons/src/main/java
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-20 07:46:39 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-20 07:46:39 +0100
commit86d77f8df8e831a2794be6a96c005f5eaf5b3016 (patch)
tree1f57059de3f46ced1a5ef461470a4bc2c318f740 /pdf-over-commons/src/main/java
parent3fe8080081427838ef4e3f60ef50461c5aa2fbcf (diff)
parenta224ce26811102d97ab02a33f3befcba311e0a62 (diff)
downloadpdf-over-86d77f8df8e831a2794be6a96c005f5eaf5b3016.tar.gz
pdf-over-86d77f8df8e831a2794be6a96c005f5eaf5b3016.tar.bz2
pdf-over-86d77f8df8e831a2794be6a96c005f5eaf5b3016.zip
Merge branch 'feature/sigProfiles' into 'master'
Feature/sig profiles See merge request egiz/pdf-over!2
Diffstat (limited to 'pdf-over-commons/src/main/java')
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java53
1 files changed, 53 insertions, 0 deletions
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;
+ }
+
+
+}