macaw.persistenceLayer.demo
Class InMemoryListChoiceManager

java.lang.Object
  extended by macaw.persistenceLayer.demo.InMemoryCurationConceptManager
      extended by macaw.persistenceLayer.demo.InMemoryListChoiceManager

public class InMemoryListChoiceManager
extends InMemoryCurationConceptManager

an In-memory class that manages instances of subclasses of MacawListChoice. For each of the Category, AliasFilePath, AvailabilityState and CleaningState, InMemoryListChoiceManager supports the following kinds of operations


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing Licensed 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.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Field Summary
 
Fields inherited from class macaw.persistenceLayer.demo.InMemoryCurationConceptManager
log
 
Constructor Summary
InMemoryListChoiceManager(InMemoryChangeEventManager changeEventManager)
           
 
Method Summary
 void addAliasFilePath(User user, AliasFilePath aliasFilePath)
           
 void addAvailabilityState(User user, AvailabilityState availabilityState)
           
 void addCategory(User user, Category category)
           
 void addCleaningState(User user, CleaningState cleaningState)
           
 void checkCategoryExists(Category category)
           
 void clear()
           
 void deleteAliasFilePaths(User user, java.util.ArrayList<AliasFilePath> aliasFilePathsToDelete, java.util.ArrayList<Variable> variables)
           
 void deleteAvailabilityStates(User user, java.util.ArrayList<AvailabilityState> availabilityStatesToDelete, java.util.ArrayList<Variable> variables)
           
 void deleteCategories(User user, java.util.ArrayList<Category> categoriesToDelete, java.util.ArrayList<Variable> variables)
           
 void deleteCleaningStates(User user, java.util.ArrayList<CleaningState> cleaningStatesToDelete, java.util.ArrayList<Variable> variables)
           
 AliasFilePath getAliasFilePath(User user, java.lang.String alias)
           
 int getAliasFilePathIdentifier(AliasFilePath targetAliasFilePath, Variable variable)
           
 java.util.ArrayList<AliasFilePath> getAliasFilePaths(User user)
           
 java.util.ArrayList<AliasFilePath> getAliasFilePathsMatchingName(User user, java.lang.String aliasExpression)
           
 int getAvailabilityStateIdentifier(AvailabilityState availabilityState, Variable variable)
           
 java.util.ArrayList<AvailabilityState> getAvailabilityStates(User user)
           
 java.util.ArrayList<Category> getCategories(User user)
           
 Category getCategory(java.lang.String categoryName)
           
 int getCategoryIdentifier(Category category, Variable variable)
           
 int getCleaningStateIdentifier(CleaningState cleaningState, Variable variable)
           
 java.util.ArrayList<CleaningState> getCleaningStates(User user)
           
 java.lang.String getFilePathFromAlias(java.lang.String currentAlias)
           
 void updateAliasFilePath(User user, AliasFilePath revisedAliasFilePath, java.util.ArrayList<Variable> variables)
           
 void updateAvailabilityState(User user, AvailabilityState revisedAvailabilityState, java.util.ArrayList<Variable> variables)
           
 void updateCategory(User user, Category revisedCategory, java.util.ArrayList<Variable> variables)
           
 void updateCleaningState(User user, CleaningState revisedCleaningState, java.util.ArrayList<Variable> variables)
           
 
Methods inherited from class macaw.persistenceLayer.demo.InMemoryCurationConceptManager
registerChangeEvent, registerChangeEvents, setLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryListChoiceManager

public InMemoryListChoiceManager(InMemoryChangeEventManager changeEventManager)
Method Detail

getCategories

public java.util.ArrayList<Category> getCategories(User user)
                                            throws MacawException
Throws:
MacawException

addCategory

public void addCategory(User user,
                        Category category)
                 throws MacawException
Throws:
MacawException

updateCategory

public void updateCategory(User user,
                           Category revisedCategory,
                           java.util.ArrayList<Variable> variables)
                    throws MacawException
Throws:
MacawException

deleteCategories

public void deleteCategories(User user,
                             java.util.ArrayList<Category> categoriesToDelete,
                             java.util.ArrayList<Variable> variables)
                      throws MacawException
Throws:
MacawException

getCategory

public Category getCategory(java.lang.String categoryName)
                     throws MacawException
Throws:
MacawException

getCategoryIdentifier

public int getCategoryIdentifier(Category category,
                                 Variable variable)
                          throws MacawException
Throws:
MacawException

getCleaningStates

public java.util.ArrayList<CleaningState> getCleaningStates(User user)
                                                     throws MacawException
Throws:
MacawException

addCleaningState

public void addCleaningState(User user,
                             CleaningState cleaningState)
                      throws MacawException
Throws:
MacawException

updateCleaningState

public void updateCleaningState(User user,
                                CleaningState revisedCleaningState,
                                java.util.ArrayList<Variable> variables)
                         throws MacawException
Throws:
MacawException

deleteCleaningStates

public void deleteCleaningStates(User user,
                                 java.util.ArrayList<CleaningState> cleaningStatesToDelete,
                                 java.util.ArrayList<Variable> variables)
                          throws MacawException
Throws:
MacawException

getCleaningStateIdentifier

public int getCleaningStateIdentifier(CleaningState cleaningState,
                                      Variable variable)
                               throws MacawException
Throws:
MacawException

getAvailabilityStates

public java.util.ArrayList<AvailabilityState> getAvailabilityStates(User user)
                                                             throws MacawException
Throws:
MacawException

addAvailabilityState

public void addAvailabilityState(User user,
                                 AvailabilityState availabilityState)
                          throws MacawException
Throws:
MacawException

updateAvailabilityState

public void updateAvailabilityState(User user,
                                    AvailabilityState revisedAvailabilityState,
                                    java.util.ArrayList<Variable> variables)
                             throws MacawException
Throws:
MacawException

deleteAvailabilityStates

public void deleteAvailabilityStates(User user,
                                     java.util.ArrayList<AvailabilityState> availabilityStatesToDelete,
                                     java.util.ArrayList<Variable> variables)
                              throws MacawException
Throws:
MacawException

getAvailabilityStateIdentifier

public int getAvailabilityStateIdentifier(AvailabilityState availabilityState,
                                          Variable variable)
                                   throws MacawException
Throws:
MacawException

getAliasFilePaths

public java.util.ArrayList<AliasFilePath> getAliasFilePaths(User user)
                                                     throws MacawException
Throws:
MacawException

getAliasFilePath

public AliasFilePath getAliasFilePath(User user,
                                      java.lang.String alias)
                               throws MacawException
Throws:
MacawException

getAliasFilePathsMatchingName

public java.util.ArrayList<AliasFilePath> getAliasFilePathsMatchingName(User user,
                                                                        java.lang.String aliasExpression)
                                                                 throws MacawException
Throws:
MacawException

addAliasFilePath

public void addAliasFilePath(User user,
                             AliasFilePath aliasFilePath)
                      throws MacawException
Throws:
MacawException

updateAliasFilePath

public void updateAliasFilePath(User user,
                                AliasFilePath revisedAliasFilePath,
                                java.util.ArrayList<Variable> variables)
                         throws MacawException
Throws:
MacawException

deleteAliasFilePaths

public void deleteAliasFilePaths(User user,
                                 java.util.ArrayList<AliasFilePath> aliasFilePathsToDelete,
                                 java.util.ArrayList<Variable> variables)
                          throws MacawException
Throws:
MacawException

getAliasFilePathIdentifier

public int getAliasFilePathIdentifier(AliasFilePath targetAliasFilePath,
                                      Variable variable)
                               throws MacawException
Throws:
MacawException

getFilePathFromAlias

public java.lang.String getFilePathFromAlias(java.lang.String currentAlias)
                                      throws MacawException
Throws:
MacawException

checkCategoryExists

public void checkCategoryExists(Category category)
                         throws MacawException
Throws:
MacawException

clear

public void clear()