Package org.mycore.common.processing
Class MCRProcessableDefaultCollection
java.lang.Object
org.mycore.common.processing.MCRProcessableDefaultCollection
- All Implemented Interfaces:
MCRProcessableCollection
Base implementation of a processable collection.
- Author:
- Matthias Eichner
-
Constructor Summary
ConstructorDescriptionCreates a new collection with the given a human readable name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(MCRProcessable processable) Adds a newMCRProcessable
to this container.void
addListener
(MCRProcessableCollectionListener listener) Adds a new listener.protected void
fireAdded
(MCRProcessable processable) protected void
firePropertyChanged
(String propertyName, Object oldValue, Object newValue) protected void
fireRemoved
(MCRProcessable processable) getName()
Returns the human readable name of this collection.Returns a map of properties assigned to this processable.boolean
isEmpty()
Checks if this collection contains any processable.void
remove
(MCRProcessable processable) Removes aMCRProcessable
from the container.void
Removes a listener.void
setProperty
(String propertyName, Object propertyValue) stream()
Streams allMCRProcessable
registered by this container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.common.processing.MCRProcessableCollection
getProperty, getPropertyAs
-
Constructor Details
-
MCRProcessableDefaultCollection
Creates a new collection with the given a human readable name.- Parameters:
name
- name of this collection
-
-
Method Details
-
getName
Returns the human readable name of this collection.- Specified by:
getName
in interfaceMCRProcessableCollection
- Returns:
- name of this container
-
add
Description copied from interface:MCRProcessableCollection
Adds a newMCRProcessable
to this container.- Specified by:
add
in interfaceMCRProcessableCollection
- Parameters:
processable
- the processable to add
-
remove
Description copied from interface:MCRProcessableCollection
Removes aMCRProcessable
from the container.- Specified by:
remove
in interfaceMCRProcessableCollection
-
stream
Description copied from interface:MCRProcessableCollection
Streams allMCRProcessable
registered by this container.- Specified by:
stream
in interfaceMCRProcessableCollection
- Returns:
- stream of
MCRProcessable
-
isEmpty
public boolean isEmpty()Description copied from interface:MCRProcessableCollection
Checks if this collection contains any processable.- Specified by:
isEmpty
in interfaceMCRProcessableCollection
- Returns:
- true if this collection contains at least on processable
-
getProperties
Description copied from interface:MCRProcessableCollection
Returns a map of properties assigned to this processable.- Specified by:
getProperties
in interfaceMCRProcessableCollection
- Returns:
- the properties map
-
setProperty
-
addListener
Description copied from interface:MCRProcessableCollection
Adds a new listener.- Specified by:
addListener
in interfaceMCRProcessableCollection
- Parameters:
listener
- the listener to add
-
removeListener
Description copied from interface:MCRProcessableCollection
Removes a listener.- Specified by:
removeListener
in interfaceMCRProcessableCollection
- Parameters:
listener
- the listener to remove
-
fireAdded
-
fireRemoved
-
firePropertyChanged
-