/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.aries.samples.blog.api;
import java.text.ParseException;
import java.util.List;
public interface BlogAuthorManager
{
/**
* Create an author.
* @param email the author's email address, this is used as the key in the database
* @param dob the author's date of birth
* @param name the author's full name
* @param displayName the author's display name
* @param bio the author's biography
* @throws ParseException
*/
public void createAuthor(String email, String dob, String name, String displayName, String bio) throws ParseException;
/**
* Get all authors from the database.
* @return a List<Author> of all authors in the database
*/
public List<? extends BlogAuthor> getAllAuthors();
/**
* Get an individual author.
* @param emailAddress - the email address of the author to retrieve
* @return the author
*/
public BlogAuthor getAuthor(String emailAddress);
/**
* Delete an author from the database.
* @param emailAddress the email address of the author to delete
*/
public void removeAuthor(String emailAddress);
/**
* Update a specific author.
* @param email the email address of the author being updated.
* @param dob the new date of birth (as a string)
* @param name the new full name
* @param displayName the new display name
* @param bio the new biography
* @throws ParseException
*/
public void updateAuthor(String email, String dob, String name, String displayName, String bio) throws ParseException;
}