Class ExportEventProcessor
- java.lang.Object
-
- org.dspace.statistics.export.processor.ExportEventProcessor
-
- Direct Known Subclasses:
BitstreamEventProcessor,ItemEventProcessor
public abstract class ExportEventProcessor extends Object
Abstract export event processor that contains all shared logic to handle both Items and Bitstreams from the IrusExportUsageEventListener
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBITSTREAM_DOWNLOADprotected static StringENTITY_TYPE_DEFAULTprotected static StringITEM_VIEWprotected static StringUTF_8
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringgetBaseParameters(Item item)Get the base parameters for the url to be transmittedprotected StringgetCurrentDateString()Get the current dateabstract voidprocessEvent()Processes the eventprotected voidprocessObject(String urlParameters)Process the url obtained from the object to be transmittedprotected booleanshouldProcessEntityType(Item item)Checks if the item's entity type should be processed When no entity type is present, the check will not be performed and true will be returned.protected booleanshouldProcessItem(Item item)Checks if an item should be processedprotected booleanshouldProcessItemType(Item item)Checks if the item should be excluded based on the its type
-
-
-
Field Detail
-
ENTITY_TYPE_DEFAULT
protected static final String ENTITY_TYPE_DEFAULT
- See Also:
- Constant Field Values
-
ITEM_VIEW
protected static final String ITEM_VIEW
- See Also:
- Constant Field Values
-
BITSTREAM_DOWNLOAD
protected static final String BITSTREAM_DOWNLOAD
- See Also:
- Constant Field Values
-
UTF_8
protected static final String UTF_8
- See Also:
- Constant Field Values
-
-
Method Detail
-
processEvent
public abstract void processEvent() throws SQLException, IOExceptionProcesses the event- Throws:
SQLExceptionIOException
-
processObject
protected void processObject(String urlParameters) throws IOException, SQLException
Process the url obtained from the object to be transmitted- Parameters:
urlParameters-- Throws:
IOExceptionSQLException
-
getBaseParameters
protected String getBaseParameters(Item item) throws UnsupportedEncodingException
Get the base parameters for the url to be transmitted- Parameters:
item-- Returns:
- the parameter string to be used in the url
- Throws:
UnsupportedEncodingException
-
getCurrentDateString
protected String getCurrentDateString()
Get the current date- Returns:
- the current date as a string
-
shouldProcessItem
protected boolean shouldProcessItem(Item item) throws SQLException
Checks if an item should be processed- Parameters:
item- to be checked- Returns:
- whether the item should be processed
- Throws:
SQLException
-
shouldProcessEntityType
protected boolean shouldProcessEntityType(Item item) throws SQLException
Checks if the item's entity type should be processed When no entity type is present, the check will not be performed and true will be returned.- Parameters:
item- to be checked- Returns:
- whether the item should be processed
- Throws:
SQLException
-
shouldProcessItemType
protected boolean shouldProcessItemType(Item item)
Checks if the item should be excluded based on the its type- Parameters:
item- to be checked- Returns:
- whether the item should be processed
-
-