mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 02:17:43 +03:00
codacy: Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
d9886e8a96
commit
d62c2b3f9f
2 changed files with 29 additions and 30 deletions
|
@ -27,9 +27,17 @@ import java.util.Locale;
|
|||
/**
|
||||
* Template for creating a file from it via RichDocuments app
|
||||
*/
|
||||
|
||||
@Parcel
|
||||
public class Template {
|
||||
public int id;
|
||||
public String name;
|
||||
public String thumbnailLink;
|
||||
public Type type;
|
||||
public String extension;
|
||||
|
||||
public Template() {
|
||||
}
|
||||
|
||||
public Template(int id, String name, String thumbnailLink, Type type, String extension) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
|
@ -38,7 +46,21 @@ public class Template {
|
|||
this.extension = extension;
|
||||
}
|
||||
|
||||
public Template() {
|
||||
public enum Type {
|
||||
DOCUMENT, SPREADSHEET, PRESENTATION, UNKNOWN
|
||||
}
|
||||
|
||||
public static Type parse(String type) {
|
||||
switch (type.toLowerCase(Locale.US)) {
|
||||
case "document":
|
||||
return Type.DOCUMENT;
|
||||
case "spreadsheet":
|
||||
return Type.SPREADSHEET;
|
||||
case "presentation":
|
||||
return Type.PRESENTATION;
|
||||
default:
|
||||
return Type.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
@ -80,27 +102,4 @@ public class Template {
|
|||
public void setExtension(String extension) {
|
||||
this.extension = extension;
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
DOCUMENT, SPREADSHEET, PRESENTATION, UNKNOWN
|
||||
}
|
||||
|
||||
public static Type parse(String type) {
|
||||
switch (type.toLowerCase(Locale.US)) {
|
||||
case "document":
|
||||
return Type.DOCUMENT;
|
||||
case "spreadsheet":
|
||||
return Type.SPREADSHEET;
|
||||
case "presentation":
|
||||
return Type.PRESENTATION;
|
||||
default:
|
||||
return Type.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
public int id;
|
||||
public String name;
|
||||
public String thumbnailLink;
|
||||
public Type type;
|
||||
public String extension;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,11 @@ package com.owncloud.android.datastorage;
|
|||
* @author Bartosz Przybylski
|
||||
*/
|
||||
public class StoragePoint implements Comparable<StoragePoint> {
|
||||
private String description;
|
||||
private String path;
|
||||
private StorageType storageType;
|
||||
private PrivacyType privacyType;
|
||||
|
||||
public StoragePoint(String description, String path, StorageType storageType, PrivacyType privacyType) {
|
||||
this.description = description;
|
||||
this.path = path;
|
||||
|
@ -75,11 +80,6 @@ public class StoragePoint implements Comparable<StoragePoint> {
|
|||
PRIVATE, PUBLIC
|
||||
}
|
||||
|
||||
private String description;
|
||||
private String path;
|
||||
private StorageType storageType;
|
||||
private PrivacyType privacyType;
|
||||
|
||||
@Override
|
||||
public int compareTo(StoragePoint another) {
|
||||
return path.compareTo(another.getPath());
|
||||
|
|
Loading…
Reference in a new issue