Apply states for projects (active, readonly and hidden)

This feature is the result of the discussion
about issue 349 which the project can assume
one of the states mentioned above.

Active state indicates the project is regular
and is the default value.

Read Only means that users can see the project
if read permission is granted, but all modification
operations are disabled.

Hidden means the project is not visible for
those who are not owners

Bug: issue 349
Change-Id: I2a8972701359c3792331712efc93cb6ded2065f5
This commit is contained in:
carloseduardo.baldacin
2011-07-13 11:27:14 -03:00
committed by Gustaf Lundh
parent a3b3e95ae7
commit acbf134d54
14 changed files with 148 additions and 26 deletions

View File

@@ -53,4 +53,20 @@ public class Util {
return type.name();
}
}
public static String toLongString(final Project.State type) {
if (type == null) {
return "";
}
switch (type) {
case ACTIVE:
return C.projectState_ACTIVE();
case READ_ONLY:
return C.projectState_READ_ONLY();
case HIDDEN:
return C.projectState_HIDDEN();
default:
return type.name();
}
}
}