- java.lang.Object
-
- org.shredzone.acme4j.Account.EditableAccount
-
- Enclosing class:
- Account
public class Account.EditableAccount extends Object
Provides editable properties of anAccount
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Account.EditableAccount
addContact(String contact)
Adds a new Contact to the account.Account.EditableAccount
addContact(URI contact)
Adds a new Contact to the account.Account.EditableAccount
addEmail(String email)
Adds a new Contact email to the account.void
commit()
Commits the changes and updates the account.List<URI>
getContacts()
Returns the list of all contact URIs for modification.
-
-
-
Method Detail
-
getContacts
public List<URI> getContacts()
Returns the list of all contact URIs for modification. Use theList
methods to modify the contact list.The modified list is not validated. If you change entries, you have to make sure that they are valid according to the RFC. It is recommended to use the
addContact()
methods below to add new contacts to the list.
-
addContact
public Account.EditableAccount addContact(URI contact)
Adds a new Contact to the account.- Parameters:
contact
- Contact URI- Returns:
- itself
-
addContact
public Account.EditableAccount addContact(String contact)
Adds a new Contact to the account.This is a convenience call for
addContact(URI)
.- Parameters:
contact
- Contact URI as string- Returns:
- itself
-
addEmail
public Account.EditableAccount addEmail(String email)
Adds a new Contact email to the account.This is a convenience call for
addContact(String)
that doesn't require to prepend the email address with the "mailto" scheme.- Parameters:
email
- Contact email without "mailto" scheme (e.g. test@gmail.com)- Returns:
- itself
-
commit
public void commit() throws AcmeException
Commits the changes and updates the account.- Throws:
AcmeException
-
-