Package com.pnfsoftware.jeb.core.units
Class MetadataManager
java.lang.Object
com.pnfsoftware.jeb.core.units.MetadataManager
- All Implemented Interfaces:
IMetadataManager
A simple implementation of a metadata manager. Such objects are serializable if and only if all
the groups they contain are also serializable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addGroup
(IMetadataGroup group) Add a group.getGroupByName
(String name) Get a group by its name.int
Retrieve the number of groups.Get the list of groups.boolean
insertGroup
(int index, IMetadataGroup group) Insert a group at the given position.boolean
removeGroup
(int index) Delete a group by index.boolean
removeGroupByName
(String name) Delete a group by name.
-
Constructor Details
-
MetadataManager
public MetadataManager()
-
-
Method Details
-
getGroups
Description copied from interface:IMetadataManager
Get the list of groups.- Specified by:
getGroups
in interfaceIMetadataManager
- Returns:
- the groups, possibly empty but non-null
-
getGroupCount
public int getGroupCount()Description copied from interface:IMetadataManager
Retrieve the number of groups.- Specified by:
getGroupCount
in interfaceIMetadataManager
- Returns:
- the number of groups
-
getGroupByName
Description copied from interface:IMetadataManager
Get a group by its name.- Specified by:
getGroupByName
in interfaceIMetadataManager
- Parameters:
name
- group name- Returns:
-
addGroup
Description copied from interface:IMetadataManager
Add a group.- Specified by:
addGroup
in interfaceIMetadataManager
- Parameters:
group
- group to add- Returns:
-
insertGroup
Description copied from interface:IMetadataManager
Insert a group at the given position.- Specified by:
insertGroup
in interfaceIMetadataManager
- Parameters:
index
- positiongroup
- group to add- Returns:
-
removeGroup
public boolean removeGroup(int index) Description copied from interface:IMetadataManager
Delete a group by index.- Specified by:
removeGroup
in interfaceIMetadataManager
- Parameters:
index
- group index- Returns:
-
removeGroupByName
Description copied from interface:IMetadataManager
Delete a group by name.- Specified by:
removeGroupByName
in interfaceIMetadataManager
- Parameters:
name
- group name
-