Interface CollectionView.Presenter
-
- All Known Implementing Classes:
CollectionPresenter
- Enclosing interface:
- CollectionView
public static interface CollectionView.Presenter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListItem(Map<String,String> simplePropertiesValues, Map<String,Map<String,String>> expandablePropertiesValues)Creates a new single item element with values taken from givenMapvoidaddMapItem(Map<String,String> keyPropertiesValues, Map<String,String> valuePropertiesValues)Creates a new key/value item element with values taken from givenMapvoidinitListStructure(String key, Map<String,String> instancePropertyMap, Map<String,Map<String,String>> expandablePropertiesMap, CollectionView collectionView)Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such typevoidinitMapStructure(String key, Map<String,String> keyPropertyMap, Map<String,String> valuePropertyMap, CollectionView collectionEditorView)Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such typevoidonToggleRowExpansion(boolean isShown)Toggle the expansion of the items included in the collection.voidremove()Completely remove the givenCollection, i.e. set it tonullvoidsave()Actual implementations are meant to retrieve the json representation of the content of the currentCollectionEditorViewand save it.voidsetValue(String jsonString)Actual implementations are meant to transform that json representation to acom.google.gwt.json.client.JSONValueand use that to populate the currentCollectionEditorViewvoidshowEditingBox()Show the editing box in the currentCollectionEditorViewvoidtoggleEditingStatus(boolean toDisable)Toggles the status of the addItem buttonvoidupdateRowExpansionStatus(boolean isShown)Updates the expanded status of main collection container to reflect the status of all contained items, when they have the same expanded status
-
-
-
Method Detail
-
initListStructure
void initListStructure(String key, Map<String,String> instancePropertyMap, Map<String,Map<String,String>> expandablePropertiesMap, CollectionView collectionView)
Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such type- Parameters:
key- The key representing the property, i.e classname#propertyname (e.g Author#books)instancePropertyMap-expandablePropertiesMap-collectionView-
-
initMapStructure
void initMapStructure(String key, Map<String,String> keyPropertyMap, Map<String,String> valuePropertyMap, CollectionView collectionEditorView)
Actual implementations should invoke this method first to retrieve information about the collection generic type and the structure of such type- Parameters:
key- The key representing the property, i.e classname#propertyname (e.g Author#books)keyPropertyMap-valuePropertyMap-collectionEditorView-
-
setValue
void setValue(String jsonString)
Actual implementations are meant to transform that json representation to acom.google.gwt.json.client.JSONValueand use that to populate the currentCollectionEditorView- Parameters:
jsonString-
-
showEditingBox
void showEditingBox()
Show the editing box in the currentCollectionEditorView
-
onToggleRowExpansion
void onToggleRowExpansion(boolean isShown)
Toggle the expansion of the items included in the collection.- Parameters:
isShown- the current expansion status of the collection
-
updateRowExpansionStatus
void updateRowExpansionStatus(boolean isShown)
Updates the expanded status of main collection container to reflect the status of all contained items, when they have the same expanded status- Parameters:
isShown- the current expansion status of the collection
-
addListItem
void addListItem(Map<String,String> simplePropertiesValues, Map<String,Map<String,String>> expandablePropertiesValues)
Creates a new single item element with values taken from givenMap- Parameters:
simplePropertiesValues-expandablePropertiesValues-
-
addMapItem
void addMapItem(Map<String,String> keyPropertiesValues, Map<String,String> valuePropertiesValues)
Creates a new key/value item element with values taken from givenMap- Parameters:
keyPropertiesValues-valuePropertiesValues-
-
save
void save()
Actual implementations are meant to retrieve the json representation of the content of the currentCollectionEditorViewand save it.
-
remove
void remove()
Completely remove the givenCollection, i.e. set it tonull
-
toggleEditingStatus
void toggleEditingStatus(boolean toDisable)
Toggles the status of the addItem button- Parameters:
toDisable-
-
-