summaryrefslogtreecommitdiff
path: root/pdf-over-commons/src/main/java/at/asit
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-23 16:03:23 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-23 16:03:23 +0100
commit9fead182dd9bc31ac532028abd436ab84069b097 (patch)
tree80d063f6438f53a3f7a9332c62b9ba65d33d97e6 /pdf-over-commons/src/main/java/at/asit
parent38ca602a7739e8ba957b963992ba073409fdaf29 (diff)
parent42fde29384da03043bcf7710b4983fa4f5836ae8 (diff)
downloadpdf-over-9fead182dd9bc31ac532028abd436ab84069b097.tar.gz
pdf-over-9fead182dd9bc31ac532028abd436ab84069b097.tar.bz2
pdf-over-9fead182dd9bc31ac532028abd436ab84069b097.zip
Merge branch 'v4.3.0-rc' into 'master'
change in profile setting See merge request egiz/pdf-over!4
Diffstat (limited to 'pdf-over-commons/src/main/java/at/asit')
-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;