Class DetailActionDestinationCache
java.lang.Object
ecmwf.ecpds.master.plugin.http.controller.transfer.destination.DetailActionDestinationCache
The Class DetailActionDestinationCache.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe Class DataOptionsWithSizes.static final classThe Class NameCountAndSizes. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new detail action destination cache.DetailActionDestinationCache(DetailActionForm daf, String destination) Instantiates a new detail action destination cache. -
Method Summary
Modifier and TypeMethodDescriptionstatic void_fillTable(HashMap<String, DetailActionDestinationCache.NameCountAndSizes> dataTimeOptionsWithSizes, String name, Object count, Object size) Fill table.voidaddToSelections(Collection<DataTransferLightBean> transfers) Adds the to selections.voidClean action transfers.voidClean selected transfers.voidDelete from selection.getActionTransfer(String name) Gets the action transfer.Gets the action transfers.Gets the data options with sizes.Gets the data stream.Gets the data time.Gets the data transfer.getDataTransfers(boolean hasAccess) Gets the data transfers.getDataTransfers(boolean hasAccess, DataBaseCursor cursor) Gets the data transfers.getDate()Gets the date.protected StringGets the destination.Collection<ecmwf.web.util.bean.Pair> Gets the display tags params.Collection<ecmwf.web.util.bean.Pair> Gets the display tags params collection.Gets the dissemination stream.Gets the dissemination stream options with sizes.Gets the file name search.Gets the new priority.getSelectedTransfer(String name) Gets the selected transfer.Gets all selected transfer IDs (no DB lookup) — used for basket All/None/Invert.getSelectedTransfers(int from, int to) Gets the selected transfers.intGets the selected transfers count.getSortedTransfers(String cacheKey, Comparator<DataTransfer> comparator) Returns a sorted + filtered (on-only) view of the basket.Gets the status.Gets the status options with sizes.voidsetActionTransfer(String name, String value) Sets the action transfer.voidsetDataStream(String string) Sets the data stream.voidsetDataTime(String string) Sets the data time.voidSets the date.voidsetDisplayTagsParams(Collection<ecmwf.web.util.bean.Pair> collection) Sets the display tags params.voidsetDisplayTagsParamsCollection(Collection<ecmwf.web.util.bean.Pair> collection) Sets the display tags params collection.voidsetDisseminationStream(String string) Sets the dissemination stream.voidsetFileNameSearch(String fileNameSearch) Sets the file name search.voidsetNewPriority(String newPriority) Sets the new priority.voidsetSelectedTransfer(String name, String value) Sets the selected transfer.voidSets the status.
-
Field Details
-
ALL
-
NONE
-
-
Constructor Details
-
DetailActionDestinationCache
Instantiates a new detail action destination cache.- Parameters:
daf- the daf
-
DetailActionDestinationCache
Instantiates a new detail action destination cache.- Parameters:
daf- the dafdestination- the destination
-
-
Method Details
-
getDestination
-
getActionTransfers
Gets the action transfers.- Returns:
- the action transfers
-
getActionTransfer
-
getDataOptionsWithSizes
Gets the data options with sizes.- Returns:
- the data options with sizes
-
_fillTable
-
getDisplayTagsParams
Gets the display tags params.- Returns:
- the display tags params
-
setDisplayTagsParams
Sets the display tags params.- Parameters:
collection- the new display tags params
-
getDisplayTagsParamsCollection
Gets the display tags params collection.- Returns:
- the display tags params collection
-
setDisplayTagsParamsCollection
Sets the display tags params collection.- Parameters:
collection- the new display tags params collection
-
getDisseminationStreamOptionsWithSizes
protected Collection<DetailActionDestinationCache.NameCountAndSizes> getDisseminationStreamOptionsWithSizes()Gets the dissemination stream options with sizes.- Returns:
- the dissemination stream options with sizes
-
getStatusOptionsWithSizes
Gets the status options with sizes.- Returns:
- the status options with sizes
-
getSelectedTransfer
-
getSelectedTransferIds
Gets all selected transfer IDs (no DB lookup) — used for basket All/None/Invert.- Returns:
- the selected transfer ids
-
getSelectedTransfersCount
public int getSelectedTransfersCount()Gets the selected transfers count.- Returns:
- the selected transfers count
-
getSelectedTransfers
Gets the selected transfers.- Parameters:
from- the fromto- the to- Returns:
- the selected transfers
-
getDataTransfer
Gets the data transfer.- Parameters:
id- the id- Returns:
- the data transfer
-
getSortedTransfers
Returns a sorted + filtered (on-only) view of the basket.On the first call (or after the object cache has expired or been invalidated), all basket items are loaded from the database. The result is cached in the HTTP session so subsequent sort/pagination calls are served entirely from memory. The comparator is applied once; changing the sort column re-sorts the already-loaded objects without any further database I/O.
The expensive database-load phase is intentionally executed outside the synchronised block to avoid holding the monitor for tens of seconds. A brief second lock is acquired to commit the result.
- Parameters:
cacheKey- an opaque string that uniquely identifies the (column, direction) combinationcomparator- the sort order to apply- Returns:
- an unmodifiable sorted list of the currently selected (on) transfers
-
deleteFromSelection
-
addToSelections
Adds the to selections.- Parameters:
transfers- the transfers
-
setActionTransfer
-
setSelectedTransfer
-
getDataTransfers
public Collection<DataTransferLightBean> getDataTransfers(boolean hasAccess, DataBaseCursor cursor) throws TransferException Gets the data transfers.- Parameters:
hasAccess- the has accesscursor- the cursor- Returns:
- the data transfers
- Throws:
TransferException- the transfer exception
-
getDataTransfers
public Collection<DataTransferLightBean> getDataTransfers(boolean hasAccess) throws TransferException Gets the data transfers.- Parameters:
hasAccess- the has access- Returns:
- the data transfers
- Throws:
TransferException- the transfer exception
-
getDataStream
-
getDataTime
-
getDisseminationStream
Gets the dissemination stream.- Returns:
- the dissemination stream
-
getStatus
-
setDataStream
Sets the data stream.- Parameters:
string- the new data stream
-
setDataTime
-
setDisseminationStream
Sets the dissemination stream.- Parameters:
string- the new dissemination stream
-
setStatus
-
getDate
-
setDate
-
cleanActionTransfers
public void cleanActionTransfers()Clean action transfers. -
cleanSelectedTransfers
public void cleanSelectedTransfers()Clean selected transfers. -
getFileNameSearch
-
setFileNameSearch
Sets the file name search.- Parameters:
fileNameSearch- the new file name search
-
getNewPriority
-
setNewPriority
Sets the new priority.- Parameters:
newPriority- the new new priority
-