If you think the Android project adventure.datetime listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (c) 2013 Andrew Fontaine, James Finlay, Jesse Tucker, Jacob Viau, and
* Evan DeGraff/*fromwww.java2s.com*/
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/package ca.cmput301f13t03.adventure_datetime.model.Interfaces;
import ca.cmput301f13t03.adventure_datetime.model.Bookmark;
import ca.cmput301f13t03.adventure_datetime.model.Comment;
import ca.cmput301f13t03.adventure_datetime.model.Story;
import ca.cmput301f13t03.adventure_datetime.model.StoryFragment;
import java.util.UUID;
/**
* Class provides an interface for controllers to interact with the model and to direct its behaviour
*
* @author Jesse Tucker, Evan DeGraff
*
* AKA : IModelSet
*/publicinterface IStoryModelDirector
{
/**
* Select the story as the current story
* @param storyId
*/publicvoid selectStory(UUID storyId);
/**
* Select the fragment as the current fragment
* @param fragmentId
*/publicvoid selectFragment(UUID fragmentId);
/**
* Save a story in the database
* @return Success value
*/publicboolean SaveStory();
/**
* Creates a new story with a head fragment
*/public Story CreateNewStory();
public StoryFragment CreateNewStoryFragment();
/**
* Delete a story from the database
* @param storyId
*/publicvoid deleteStory(UUID storyId);
publicvoid deleteImage(UUID imageId);
/**
* Save a fragment to the database
* @param fragment
* @return success value
*/publicboolean putFragment(StoryFragment fragment);
/**
* Delete a fragment from the database
* @param fragmentId
*/publicvoid deleteFragment(UUID fragmentId);
/**
* Fetch a story by its Id
* @param storyId
* @return The matching story object
*/public Story getStory(UUID storyId);
/**
* Save a bookmark to the database
* @param uuid
*/publicvoid setBookmark(UUID uuid);
/**
* Fetch a bookmark ID by its ID
*
* Why is a fetch in the director?
*
* @param bookmarkId
* @return bookmark with the given UUID
*/public Bookmark getBookmark(UUID bookmarkId);
/**
* Uploads current story to the web storage
*/publicvoid uploadCurrentStory();
/**
* Deletes a bookmark by StoryID
*
*/publicvoid deleteBookmark();
/**
* Downloads current story to local database
*/publicvoid download();
/**
* Publishes a comment to the server
* @param comment
*/publicvoid addComment(Comment comment);
/**
* Changes a downloaded story to author mode
* @param storyId The UUID of the story
* @param username The new author name
* @return new UUID for the story
*/public UUID setStoryToAuthor(UUID storyId, String username);
/**
* Checks if story is authored by user
* @return true if authored
*/boolean isAuthored(UUID storyId);
/**
* Sends a search for stories to the server
* @param searchTerm
*/publicvoid search(String searchTerm);
}