diff options
author | Jonathan Bauer | 2017-09-06 13:48:33 +0200 |
---|---|---|
committer | Jonathan Bauer | 2017-09-06 13:48:33 +0200 |
commit | e310fa0738149f20b9de6b173d3d175857b0c748 (patch) | |
tree | 5857811d25cc53c51590cc0158ec84e049a3ed88 /dozentenmodul/src/main/java/org/openslx/dozmod/util | |
parent | [client] Update apache httpclient, pass custom client to ecp-client-lean (diff) | |
download | tutor-module-e310fa0738149f20b9de6b173d3d175857b0c748.tar.gz tutor-module-e310fa0738149f20b9de6b173d3d175857b0c748.tar.xz tutor-module-e310fa0738149f20b9de6b173d3d175857b0c748.zip |
[client/server] network share feature [WIP]
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/util')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/util/FormatHelper.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/util/FormatHelper.java b/dozentenmodul/src/main/java/org/openslx/dozmod/util/FormatHelper.java index 6f129931..11ad277a 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/util/FormatHelper.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/util/FormatHelper.java @@ -3,6 +3,7 @@ package org.openslx.dozmod.util; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.openslx.bwlp.thrift.iface.Location; +import org.openslx.bwlp.thrift.iface.NetShareAuth; import org.openslx.bwlp.thrift.iface.OperatingSystem; import org.openslx.bwlp.thrift.iface.Organization; import org.openslx.bwlp.thrift.iface.UserInfo; @@ -165,4 +166,25 @@ public class FormatHelper { return "Unknown"; return org.getDisplayName(); } + + /** + * Format the given network share authentication type. + * + * @param NetShareAuth a {@link NetShareAuth} instance + * @return Display name for that authentication type, string "unknown" otherwise + */ + public static String netShareAuthName(NetShareAuth auth) { + if (auth == null) + return "Unknown"; + switch (auth) { + case LOGIN_USER: + return "Angemeldeter Nutzer"; + case GUEST_USER: + return "Gast Nutzer"; + case SPECIAL_USER: + return "Spezifischer Nutzer"; + default: + return auth.toString(); + } + } } |