| | |
| | |
|
| | | public static final String SPARKLESHARE_INVITE_PATH = "/sparkleshare/";
|
| | |
|
| | | public static final String RAW_PATH = "/raw/";
|
| | |
|
| | | public static final String BRANCH_GRAPH_PATH = "/graph/";
|
| | |
|
| | | public static final String BORDER = "*****************************************************************";
|
| | |
| | |
|
| | | public static final AccessPermission [] NEWPERMISSIONS = { EXCLUDE, VIEW, CLONE, PUSH, CREATE, DELETE, REWIND };
|
| | |
|
| | | public static final AccessPermission [] SSHPERMISSIONS = { VIEW, CLONE, PUSH };
|
| | |
|
| | | public static AccessPermission LEGACY = REWIND;
|
| | |
|
| | | public final String code;
|
| | |
| | | }
|
| | |
|
| | | public static enum AuthenticationType {
|
| | | SSH, CREDENTIALS, COOKIE, CERTIFICATE, CONTAINER;
|
| | | PUBLIC_KEY, CREDENTIALS, COOKIE, CERTIFICATE, CONTAINER;
|
| | |
|
| | | public boolean isStandard() {
|
| | | return ordinal() <= COOKIE.ordinal();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static enum Transport {
|
| | | // ordered for url advertisements, assuming equal access permissions
|
| | | SSH, HTTPS, HTTP, GIT;
|
| | |
|
| | | public static Transport fromString(String value) {
|
| | | for (Transport t : values()) {
|
| | | if (t.name().equalsIgnoreCase(value)) {
|
| | | return t;
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static Transport fromUrl(String url) {
|
| | | String scheme = url.substring(0, url.indexOf("://"));
|
| | | return fromString(scheme);
|
| | | }
|
| | | }
|
| | |
|
| | | @Documented
|
| | | @Retention(RetentionPolicy.RUNTIME)
|
| | | public @interface Unused {
|