Package com.lariflix.jemm.core
Class LoadFolders
java.lang.Object
com.lariflix.jemm.core.LoadFolders
This class is responsible for loading folders from the Jellyfin server.
- Since:
- 1.0
- Author:
- Cesar Bianchi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLoadFolders
(JellyfinParameters typeOfFolders) Default constructor for the LoadFolders class.LoadFolders
(String jellyfinURL, String apiToken, String cAdminID, JellyfinParameters typeOfFolders) Constructor for the LoadFolders class. -
Method Summary
Modifier and TypeMethodDescriptionGets the API token.Gets the ID of the admin user.Retrieves the type of folders that this LoadFolders instance is configured to load.Constructs the full URL for accessing the items on the Jellyfin server.Gets the Jellyfin instance URL.Requests a list of folders from the Jellyfin server.void
setApiToken
(String apiToken) Sets the API token.void
setcUserAdminID
(String cUserAdminID) Sets the ID of the admin user.void
setFoldersType
(JellyfinParameters foldersType) Sets the type of folders that this LoadFolders instance is configured to load.void
setFullURL
(String fullURL) Sets the full URL for accessing a specific folder on the Jellyfin server.void
setJellyfinInstanceUrl
(String jellyfinInstanceUrl) Sets the Jellyfin instance URL.
-
Constructor Details
-
LoadFolders
Default constructor for the LoadFolders class.- Parameters:
typeOfFolders
- A JellyfinParameters object representing the type of folders to load. This could be any of the types defined in the JellyfinParameters class.- Since:
- 1.1
-
LoadFolders
public LoadFolders(String jellyfinURL, String apiToken, String cAdminID, JellyfinParameters typeOfFolders) Constructor for the LoadFolders class.- Parameters:
jellyfinURL
- The URL of the Jellyfin server. This should be a valid URL, including the protocol (http or https) and the domain name or IP address of the Jellyfin server. It may also include a port number if the server is not running on the default port.apiToken
- The API token for accessing the Jellyfin server. This should be a valid API token provided by the Jellyfin server.cAdminID
- The ID of the admin user. This should be a valid user ID for a user with admin privileges on the Jellyfin server.typeOfFolders
- A JellyfinParameters object representing the type of folders to load. This could be any of the types defined in the JellyfinParameters class.- Since:
- 1.1
-
-
Method Details
-
requestFolders
public JellyfinFolders requestFolders() throws MalformedURLException, IOException, org.json.simple.parser.ParseExceptionRequests a list of folders from the Jellyfin server.- Returns:
- A JellyfinFolders object containing the list of folders.
- Throws:
MalformedURLException
- If the provided URL is not valid.IOException
- If an I/O error occurs.org.json.simple.parser.ParseException
- If there is an error parsing the server's response.- Since:
- 1.0
-
getJellyfinInstanceUrl
Gets the Jellyfin instance URL.- Returns:
- The Jellyfin instance URL.
- Since:
- 1.0
-
setJellyfinInstanceUrl
Sets the Jellyfin instance URL.- Parameters:
jellyfinInstanceUrl
- The Jellyfin instance URL.- Since:
- 1.0
-
getApiToken
Gets the API token.- Returns:
- The API token.
- Since:
- 1.0
-
setApiToken
Sets the API token.- Parameters:
apiToken
- The API token.- Since:
- 1.0
-
getFullURL
Constructs the full URL for accessing the items on the Jellyfin server.- Returns:
- The full URL as a string.
- Since:
- 1.0
-
setFullURL
Sets the full URL for accessing a specific folder on the Jellyfin server.- Parameters:
fullURL
- The full URL as a string.- Since:
- 1.0
-
getcUserAdminID
Gets the ID of the admin user.- Returns:
- The ID of the admin user.
- Since:
- 1.0
-
setcUserAdminID
Sets the ID of the admin user.- Parameters:
cUserAdminID
- The ID of the admin user.- Since:
- 1.0
-
getFoldersType
Retrieves the type of folders that this LoadFolders instance is configured to load.- Returns:
- A JellyfinParameters object representing the type of folders to load. This could be any of the types defined in the JellyfinParameters class.
- Since:
- 1.0
-
setFoldersType
Sets the type of folders that this LoadFolders instance is configured to load.- Parameters:
foldersType
- A JellyfinParameters object representing the type of folders to load. This could be any of the types defined in the JellyfinParameters class.- Since:
- 1.0
-