Package se.datadosen.jalbum
Class AccountManager
java.lang.Object
se.datadosen.jalbum.AccountManager
Manager class for FTP accounts.
- Since:
- 8.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccount
(AccountProfile newAccount) Add a new FTP account to the list.void
findAccountByName
(String name) findCurrentAccount
(AlbumBean engine) findJAlbumAccountByUserName
(String userName) protected void
static String
static String
getCid
(AccountProfile account) Iterate through the list of accounts and find the first available myjalbum account.static AccountManager
static AccountManager.AccountStatus
getJalbumAccountQuota
(String username, String password) static AccountManager.AccountStatus
Get the account status by passing the more secure uicstatic AccountManager.AccountStatus
getJalbumAccountStatus
(String username, String password) static AccountManager.AccountStatus
getJalbumAccountStatus
(AccountProfile profile) boolean
Check if the manager has any FTP accounts in its list.void
Load account list from file.void
removeAccount
(AccountProfile oldAccount) Remove a FTP account from the list.void
void
static String
resolveCid
(AccountProfile account) Get the cid for the passed account if it's a jalbum account If not, the cid for the account the user is signed into jAlbum as is passed, or null if the user isn't signed into the jAlbum clientvoid
Save the account list to file.
-
Method Details
-
getInstance
-
addAccount
Add a new FTP account to the list. -
removeAccount
Remove a FTP account from the list. -
removeAccountManagerListener
-
addAccountManagerListener
-
fireAccountListUpdated
protected void fireAccountListUpdated() -
hasAccounts
public boolean hasAccounts()Check if the manager has any FTP accounts in its list. -
resetAccounts
public void resetAccounts() -
loadAccounts
Load account list from file.- Throws:
ElementException
- Could not fetch account elements.IOException
- Could not load from file.
-
getFirstMyjalbumAccount
Iterate through the list of accounts and find the first available myjalbum account. -
findJAlbumAccountByUserName
-
findAccountByName
-
findCurrentAccount
-
getCid
-
getCid
-
resolveCid
Get the cid for the passed account if it's a jalbum account If not, the cid for the account the user is signed into jAlbum as is passed, or null if the user isn't signed into the jAlbum client- Since:
- 8.4
-
getJalbumAccountQuota
public static AccountManager.AccountStatus getJalbumAccountQuota(String username, String password) throws IOException - Throws:
IOException
-
getJalbumAccountStatus
public static AccountManager.AccountStatus getJalbumAccountStatus(AccountProfile profile) throws IOException, AuthenticationException - Throws:
IOException
AuthenticationException
-
getJalbumAccountStatus
public static AccountManager.AccountStatus getJalbumAccountStatus(String uic) throws IOException, AuthenticationException Get the account status by passing the more secure uic- Parameters:
uic
- UserIdentificationCode (a userid combined with a hashed userid)- Throws:
IOException
AuthenticationException
-
getJalbumAccountStatus
public static AccountManager.AccountStatus getJalbumAccountStatus(String username, String password) throws IOException, AuthenticationException - Throws:
IOException
AuthenticationException
-
saveAccounts
Save the account list to file.- Throws:
IOException
- Could not write to file.Exception
- Could not get BeanBinder properties
-
getAccounts
-