diff options
| author | Simon Rettberg | 2015-07-08 19:39:35 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2015-07-08 19:39:35 +0200 |
| commit | 8d6cd17c330388aa13fd7c39802c7400d85f972c (patch) | |
| tree | 5f2c5856f58b1454e24dc16fad10751dfe9d087b /dozentenmodul/src/main/java/util/CheckIntegrity.java | |
| parent | oops (diff) | |
| download | tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.tar.gz tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.tar.xz tutor-module-8d6cd17c330388aa13fd7c39802c7400d85f972c.zip | |
[client] Redo package structure, add comments/TODOs, rename GUI classes
Diffstat (limited to 'dozentenmodul/src/main/java/util/CheckIntegrity.java')
| -rw-r--r-- | dozentenmodul/src/main/java/util/CheckIntegrity.java | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/dozentenmodul/src/main/java/util/CheckIntegrity.java b/dozentenmodul/src/main/java/util/CheckIntegrity.java deleted file mode 100644 index faded054..00000000 --- a/dozentenmodul/src/main/java/util/CheckIntegrity.java +++ /dev/null @@ -1,121 +0,0 @@ -package util; - -public class CheckIntegrity { - - // private static boolean isFine = false; - - // integrity check on permissions put by user for an image - public static boolean[] isIntegreForImage(boolean isRead, boolean isWrite, - boolean isLink, boolean isAdmin) { - - // boolean array for the correct result values - boolean[] rights = new boolean[4]; - rights[0] = isRead; - rights[1] = isWrite; - rights[2] = isLink; - rights[3] = isAdmin; - - System.out.println("*****************************"); - System.out.println(isRead + " " + isWrite + " " + isLink + " " - + isAdmin); - - if (isRead) // if read is allowed, only read is allowed - { - rights[0] = true; // read allowed - } else // if read is not allowed, nothing is allowed - { - rights[0] = false; - rights[1] = false; - rights[2] = false; - rights[3] = false; - } - - if (isWrite) // if write was selected - { - rights[0] = true; - rights[1] = true; - } else // if write was unselected - { - // rights[0] = false; - rights[1] = false; - } - - if (isLink) // if link was selected, read and link are allowed - { - rights[0] = true; - rights[2] = true; - } else // if link is unselected, link is not allowed - { - rights[2] = false; - } - - if (isAdmin) // if admin is selected, anything is allowed - { - rights[0] = true; - rights[1] = true; - rights[2] = true; - rights[3] = true; - } else // if admin is unselected, admin is not allowed - { - rights[3] = false; - } - - System.out.println(">-------------<"); - System.out.println(rights[0] + " " + rights[1] + " " + rights[2] + " " - + rights[3]); - - return rights; - - }// end isIntegreForImage() - - - // integrity check on permissions put by user for a lecture - public static boolean[] isIntegreForLecture(boolean isRead, boolean isWrite, boolean isAdmin) { - - // boolean array for the correct result values - boolean[] rights = new boolean[4]; - rights[0] = isRead; - rights[1] = isWrite; - rights[2] = isAdmin; - - System.out.println("*****************************"); - System.out.println(isRead + " " + isWrite + " " + isAdmin); - - if (isRead) // if read is allowed, only read is allowed - { - rights[0] = true; // read allowed - } else // if read is not allowed, nothing is allowed - { - rights[0] = false; - rights[1] = false; - rights[2] = false; - } - - if (isWrite) // if write was selected - { - rights[0] = true; - rights[1] = true; - } else // if write was unselected - { - // rights[0] = false; - rights[1] = false; - } - - if (isAdmin) // if admin is selected, anything is allowed - { - rights[0] = true; - rights[1] = true; - rights[2] = true; - } else // if admin is unselected, admin is not allowed - { - rights[2] = false; - } - - System.out.println(">-------------<"); - System.out.println(rights[0] + " " + rights[1] + " " + rights[2]); - - return rights; - - }// end isIntegreForLecture() - -} |
