-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #650 from xscreach/feature/Remove-custom-plugins-f…
…rom-IITC-Mobile
- Loading branch information
Showing
9 changed files
with
285 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
mobile/app/src/main/java/org/exarhteam/iitc_mobile/prefs/PluginInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
package org.exarhteam.iitc_mobile.prefs; | ||
|
||
import java.util.HashMap; | ||
|
||
public class PluginInfo extends HashMap<String, String> { | ||
|
||
public static final String KEY_CATEGORY = "category"; | ||
public static final String KEY_DESCRIPTION = "description"; | ||
public static final String KEY_NAME = "name"; | ||
public static final String KEY_VERSION = "version"; | ||
public static final String KEY_ID = "id"; | ||
public static final String KEY_UPDATE_URL = "updateURL"; | ||
public static final String KEY_DOWNLOAD_URL = "downloadURL"; | ||
|
||
private String key; | ||
private boolean userPlugin; | ||
|
||
public PluginInfo() { | ||
super(); | ||
this.setId("unknown"); | ||
this.setVersion("not found"); | ||
this.setName("unknown"); | ||
this.setDescription(""); | ||
this.setCategory("Misc"); | ||
} | ||
|
||
public void setId(String id) { | ||
this.put(KEY_ID, id); | ||
} | ||
|
||
public void setVersion(String version) { | ||
this.put(KEY_VERSION, version); | ||
} | ||
|
||
public void setName(String name) { | ||
if (name != null) { | ||
name = name.replace("IITC Plugin: ", ""); | ||
name = name.replace("IITC plugin: ", ""); | ||
} | ||
this.put(KEY_NAME, name); | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.put(KEY_DESCRIPTION, description); | ||
} | ||
|
||
public void setCategory(String category) { | ||
this.put(KEY_CATEGORY, category); | ||
} | ||
|
||
public String getVersion() { | ||
return this.get(KEY_VERSION); | ||
} | ||
|
||
public String getId() { | ||
return this.get(KEY_ID); | ||
} | ||
|
||
public String getName() { | ||
String name = this.get(KEY_NAME); | ||
if (name != null) { | ||
name = name.replace("IITC Plugin: ", ""); | ||
name = name.replace("IITC plugin: ", ""); | ||
} | ||
return name; | ||
} | ||
|
||
public String getUpdateURL() { | ||
return this.get(KEY_UPDATE_URL); | ||
} | ||
|
||
public String getDownloadURL() { | ||
return this.get(KEY_DOWNLOAD_URL); | ||
} | ||
|
||
public String getCategory() { | ||
return this.get(KEY_CATEGORY); | ||
} | ||
|
||
public String getDescription() { | ||
return this.get(KEY_DESCRIPTION); | ||
} | ||
|
||
public void setKey(String key) { | ||
this.key = key; | ||
} | ||
|
||
public String getKey() { | ||
return this.key; | ||
} | ||
|
||
public void setUserPlugin(boolean userPlugin) { | ||
this.userPlugin = userPlugin; | ||
} | ||
|
||
public boolean isUserPlugin() { | ||
return userPlugin; | ||
} | ||
} |
Oops, something went wrong.