summaryrefslogtreecommitdiff
path: root/pdf-over-commons/src/main
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-23 16:02:25 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-23 16:02:25 +0100
commit42fde29384da03043bcf7710b4983fa4f5836ae8 (patch)
treee707ba4fad2d74540ac6fe07a5b9e7012e36c3aa /pdf-over-commons/src/main
parentccd49455bfc3b98c60e2db940dc5d368e951ac97 (diff)
downloadpdf-over-42fde29384da03043bcf7710b4983fa4f5836ae8.tar.gz
pdf-over-42fde29384da03043bcf7710b4983fa4f5836ae8.tar.bz2
pdf-over-42fde29384da03043bcf7710b4983fa4f5836ae8.zip
change in profile setting
Diffstat (limited to 'pdf-over-commons/src/main')
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java45
1 files changed, 9 insertions, 36 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
index ef2eccd8..c15fc225 100644
--- 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
@@ -2,48 +2,21 @@ 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");
+ SIGNATURBLOCK_SMALL, //$NON-NLS-1$
+ AMTSSIGNATURBLOCK, //$NON-NLS-1$
+ BASE_LOGO, //$NON-NLS-1$
+ INVISIBLE;
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)) {
+ public static Profile getProfile(String name) {
+ if (SIGNATURBLOCK_SMALL.name().equals(name)) {
return SIGNATURBLOCK_SMALL;
- } else if (AMTSSIGNATURBLOCK.getName().equals(profile)) {
+ } else if (AMTSSIGNATURBLOCK.name().equals(name)) {
return AMTSSIGNATURBLOCK;
- } else if (BASE_LOGO.getName().equals(profile)) {
+ } else if (BASE_LOGO.name().equals(name)) {
return BASE_LOGO;
- } else if (INVISIBLE.getName().equals(profile)){
+ } else if (INVISIBLE.name().equals(name)){
return INVISIBLE;
}
return null;