|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.bsvrz.puk.config.configFile.datamodel.ConfigDataModel
public class ConfigDataModel
Implementierung des Datenmodells auf Seiten der Konfiguration zum Zugriff auf die Konfigurationsdaten. Die Verwaltungsdaten
und die Konfigurationsdaten
werden
hier zusammengeführt und entsprechend des Datenmodells
zur Verfügung gestellt.
DataModel
Field Summary | |
---|---|
private File |
_adminFile
Die Verwaltungsdatei der Konfiguration. |
private boolean |
_allowDoublePids
Flag, mit dem die Konsistenzprüfung entscheiden soll, ob doppelte Pids in verschiedenen Konfigurationsbereichen erlaubt sind. |
private long |
_authorityCoding
Kodierung des Konfigurationsverantwortlichen der Konfiguration |
private List<SystemObjectType> |
_baseTypes
Speichert die Basistypen der Konfiguration. |
private ConfigurationAuthority |
_configurationAuthority
Der Konfigurationsverantwortliche der Konfiguration. |
private ConfigurationFileManager |
_configurationFileManager
Zugriff auf die Konfigurationsdaten. |
private AttributeGroupUsage |
_configurationReadReplyUsage
Attribugruppenverwendung für Konfigurationsleseantworten |
private AttributeGroupUsage |
_configurationReadRequestUsage
Attribugruppenverwendung für Konfigurationsleseanfragen |
private AttributeGroupUsage |
_configurationWriteReplyUsage
Attribugruppenverwendung für Konfigurationsschreibantworten |
private AttributeGroupUsage |
_configurationWriteRequestUsage
Attribugruppenverwendung für Konfigurationsschreibanfragen |
private static Debug |
_debug
DebugLogger für Debug-Ausgaben |
private Set<ConfigMutableSet> |
_dirtyMutableSets
|
private boolean |
_ignoreDependencyErrorsInConsistencyCheck
|
private ConfigurationManagementFile |
_managementFile
Zugriff auf die Verwaltungsdaten der Konfiguration. |
private long |
_nextObjectId
Speichert die größte Objekt-Id, die in einem Konfigurationsbereich vorkam, der vom Verantwortlichen der Konfiguration verändert werden darf. |
Constructor Summary | |
---|---|
ConfigDataModel(File adminFile)
Erzeugt das Datenmodell der Konfiguration. |
Method Summary | |
---|---|
ConsistencyCheckResultInterface |
activateConfigurationAreas(Collection<ConfigAreaAndVersion> configurationAreas)
|
private void |
checkAreaDependency(Collection<ConfigAreaAndVersion> areasAndVersions)
Prüft, ob eventuelle Abhängigkeiten zwischen den Bereichen aufgelöst werden können. |
private void |
checkCodingOfConfigurationAuthority()
Diese Methode prüft, ob die Kodierung des Konfigurationsverantwortlichen dieser Konfiguration eindeutig ist. |
ConsistencyCheckResultInterface |
checkConsistency(Collection<ConfigAreaAndVersion> configurationAreas)
|
private ConsistencyCheckResultInterface |
checkConsistency(Collection<ConfigAreaAndVersion> configurationAreas,
KindOfConsistencyCheck kindOfConsistencyCheck)
Führt die Konsistenzprüfung aus und gibt das Ergebnis im Fehlerfalls auf dem Bildschirm aus. |
private void |
checkRequiredArea(String configurationAreaPid,
int recommendedVersion)
|
void |
close()
|
ConfigurationArea |
createConfigurationArea(String name,
String pid,
String authorityPid)
|
ConfigurationArea |
createConfigurationArea(String areaName,
String areaPid,
SystemObjectType authorityObjectType,
String authorityPid,
String authorityName,
long authorityCoding)
|
ConfigurationObject |
createConfigurationObject(ConfigurationObjectType type,
String pid,
String name,
List sets)
|
DynamicObject |
createDynamicObject(SystemObjectType type,
String pid,
String name)
|
(package private) SystemObject |
createSystemObject(ConfigurationArea configurationArea,
SystemObjectInformationInterface systemObjectInfo)
Erstellt, wenn es noch nicht existiert, ein neues System-Objekt und gibt es zurück. |
(package private) SystemObject |
createSystemObject(SystemObjectInformationInterface systemObjectInfo)
Erstellt, wenn es noch nicht existiert, ein neues System-Object und gibt es zurück. |
void |
deleteObjects(short simulationVariant)
Löscht alle dynamischen Objekte mit der angegebenen Simulationsvariante permanent. |
void |
exportConfigurationAreas(File exportPath,
Collection<String> configurationAreaPids)
|
short |
getActiveVersion(ConfigurationArea configurationArea)
|
Map<String,ConfigurationArea> |
getAllConfigurationAreas()
|
boolean |
getAllowDoublePids()
Liefert das Flag, mit dem die Konsistenzprüfung entscheiden soll, ob doppelte Pids in verschiedenen Konfigurationsbereichen erlaubt sind. |
protected Collection<SystemObjectType> |
getAllSubTypes(SystemObjectType type)
Diese Methode ermittelt zu diesem Objekt-Typ rekursiv alle Typen, die diesen Typ direkt und indirekt erweitern. |
Aspect |
getAspect(String pid)
|
AttributeGroup |
getAttributeGroup(String pid)
|
AttributeGroupUsage |
getAttributeGroupUsage(long usageIdentification)
Bestimmt die Attributgruppenverwendung mit der angegebenen Datenverteiler-Identifizierung. |
AttributeType |
getAttributeType(String pid)
|
List<SystemObjectType> |
getBaseTypes()
|
private long |
getCodingOfAuthority()
Kodierung des Verantwortlichen der Konfiguration ermitteln. |
ConfigurationArea |
getConfigurationArea(String pid)
|
ConfigurationAreaManagementInfo |
getConfigurationAreaManagementInfo(String pid)
Gibt zu einem Konfigurationsbereich dessen Verwaltungsinformationen zurück. |
ConfigurationAuthority |
getConfigurationAuthority()
|
String |
getConfigurationAuthorityPid()
|
Data[] |
getConfigurationData(Collection<SystemObject> objects,
AttributeGroup atg)
|
Data[] |
getConfigurationData(Collection<SystemObject> objects,
AttributeGroup atg,
Aspect asp)
|
Data[] |
getConfigurationData(SystemObject[] objects,
AttributeGroup atg)
|
Data[] |
getConfigurationData(SystemObject[] objects,
AttributeGroup atg,
Aspect asp)
|
ConfigurationFileManager |
getConfigurationFileManager()
Liefert die Verwaltung für die Konfigurationsdateien. |
(package private) Collection<SystemObject> |
getCurrentObjects(ConfigurationArea configurationArea)
Gibt zu einem Konfigurationsbereich die aktuellen Objekte zurück. |
boolean |
getIgnoreDependencyErrorsInConsistencyCheck()
|
ConfigurationManagementFile |
getManagementFile()
Gibt das Objekt für Änderungen an der Verwaltungsdatei zurück. |
(package private) Collection<SystemObject> |
getNewObjects(ConfigurationArea configurationArea)
Gibt zu einem Konfigurationsbereich die noch nicht aktuellen Objekte zurück. |
(package private) long |
getNextObjectId()
Ermittelt die bisher größte vergebene Objekt-Id der Konfigurationsbereiche, die vom Verantwortlichen der Konfiguration verändert werden darf. |
SystemObject |
getObject(long id)
|
SystemObject |
getObject(String pid)
|
Collection<SystemObject> |
getObjects(Collection<ConfigurationArea> configurationAreas,
Collection<SystemObjectType> systemObjectTypes,
ObjectTimeSpecification objectTimeSpecification)
|
Collection<SystemObject> |
getObjects(String pid,
long startTime,
long endTime)
|
ObjectSetType |
getObjectSetType(String pid)
|
private String |
getPidOfType(long id)
Gibt zu einer ID die Pid zurück. |
private long |
getRunningNumberOfAuthority()
Ermittelt die größte laufende Nummer zu einem Konfigurationsverantwortlichen. |
SystemObjectType |
getType(String pid)
|
SystemObjectType |
getTypeTypeObject()
|
UserAdministration |
getUserAdministration()
|
(package private) List<VersionInfo> |
getVersionInfoOfConfigurationArea(ConfigurationArea configurationArea)
Gibt zum angegebenen Konfigurationsbereich die Versionsinformationen zurück, wann welche Version aktiviert wurde. |
(package private) String |
idOutput(long id)
Gibt eine Objekt-ID formatiert aus (siehe TPuK1-9 Vergabe von Objekt-IDs): id (0#Kodierung des KV#0#Laufende Nummer) |
void |
importConfigurationAreas(File importPath,
Collection<String> configurationAreaPids)
|
void |
releaseConfigurationAreasForActivation(Collection<ConfigAreaAndVersion> configurationAreas)
|
ConsistencyCheckResultInterface |
releaseConfigurationAreasForActivationWithoutCAActivation(Collection<ConfigAreaAndVersion> configurationAreas)
|
ConsistencyCheckResultInterface |
releaseConfigurationAreasForTransfer(Collection<ConfigAreaAndVersion> configurationAreas)
|
void |
save()
Speichert die Verwaltungsdaten und die Konfigurationsbereiche ab. |
void |
saveSetElementsFileLater(ConfigMutableSet configMutableSet)
|
void |
saveSetElementsFiles()
|
void |
sendCollectionChangedNotification(ConfigMutableCollectionSupport mutableCollectionSupport,
short simulationVariant,
List<SystemObject> addedElements,
List<SystemObject> removedElements)
Leitet die Aktualisierungsnachrichten bzgl. |
void |
setAllowDoublePids(boolean allowDoublePids)
Setzt das Flag, mit dem die Konsistenzprüfung entscheiden soll, ob doppelte Pids in verschiedenen Konfigurationsbereichen erlaubt sind. |
void |
setConfigurationAuthority(ConfigurationAuthority authority)
Setzt den Konfigurationsverantwortlichen der Konfiguration. |
void |
setIgnoreDependencyErrorsInConsistencyCheck(boolean ignoreDependencyErrorsInConsistencyCheck)
Setzt das Flag, mit dem die Konsistenzprüfung entscheidet, ob Fehler bei der Prüfung der Abhängigkeiten in der Konsistenzprüfung ignoriert werden oder zum Abbruch führen sollen. |
private void |
setRunningNumberAtAuthority(long nextObjectId)
|
String |
toString()
Gibt die String-Repräsentation dieser Klasse zurück. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Debug _debug
private final ConfigurationManagementFile _managementFile
private final File _adminFile
private final ConfigurationFileManager _configurationFileManager
private List<SystemObjectType> _baseTypes
private long _nextObjectId
private AttributeGroupUsage _configurationReadRequestUsage
private AttributeGroupUsage _configurationReadReplyUsage
private AttributeGroupUsage _configurationWriteRequestUsage
private AttributeGroupUsage _configurationWriteReplyUsage
private long _authorityCoding
private ConfigurationAuthority _configurationAuthority
private boolean _allowDoublePids
private Set<ConfigMutableSet> _dirtyMutableSets
private boolean _ignoreDependencyErrorsInConsistencyCheck
Constructor Detail |
---|
public ConfigDataModel(File adminFile)
adminFile
- Datei mit den Verwaltungsdaten der Konfiguration oder leere Datei.Method Detail |
---|
private void checkRequiredArea(String configurationAreaPid, int recommendedVersion)
private void checkCodingOfConfigurationAuthority() throws IllegalStateException
IllegalStateException
- Falls die Kodierung des Konfigurationsverantwortlichen nicht eindeutig ist.long getNextObjectId()
private void setRunningNumberAtAuthority(long nextObjectId) throws ConfigurationChangeException
ConfigurationChangeException
private long getCodingOfAuthority()
private long getRunningNumberOfAuthority()
String idOutput(long id)
id
- anzuzeigende Objekt-ID
public ConfigurationFileManager getConfigurationFileManager()
public ConfigurationManagementFile getManagementFile()
public ConfigurationAuthority getConfigurationAuthority()
getConfigurationAuthority
in interface DataModel
public String getConfigurationAuthorityPid()
getConfigurationAuthorityPid
in interface DataModel
List<VersionInfo> getVersionInfoOfConfigurationArea(ConfigurationArea configurationArea)
configurationArea
- der Konfigurationsbereich
public ConfigurationAreaManagementInfo getConfigurationAreaManagementInfo(String pid)
pid
- Pid des Konfigurationsbereichs
public ConsistencyCheckResultInterface checkConsistency(Collection<ConfigAreaAndVersion> configurationAreas)
checkConsistency
in interface ConfigurationControl
private ConsistencyCheckResultInterface checkConsistency(Collection<ConfigAreaAndVersion> configurationAreas, KindOfConsistencyCheck kindOfConsistencyCheck)
configurationAreas
- Konfigurationsbereiche in den zu betrachtenden Versionen.kindOfConsistencyCheck
- Art der durchzuführenden Prüfung.
public ConsistencyCheckResultInterface activateConfigurationAreas(Collection<ConfigAreaAndVersion> configurationAreas) throws ConfigurationChangeException
activateConfigurationAreas
in interface ConfigurationControl
ConfigurationChangeException
public ConsistencyCheckResultInterface releaseConfigurationAreasForTransfer(Collection<ConfigAreaAndVersion> configurationAreas) throws ConfigurationChangeException
releaseConfigurationAreasForTransfer
in interface ConfigurationControl
ConfigurationChangeException
public void releaseConfigurationAreasForActivation(Collection<ConfigAreaAndVersion> configurationAreas) throws ConfigurationChangeException
releaseConfigurationAreasForActivation
in interface ConfigurationControl
ConfigurationChangeException
public void importConfigurationAreas(File importPath, Collection<String> configurationAreaPids) throws ConfigurationChangeException
importConfigurationAreas
in interface ConfigurationControl
ConfigurationChangeException
public void exportConfigurationAreas(File exportPath, Collection<String> configurationAreaPids) throws ConfigurationTaskException
exportConfigurationAreas
in interface ConfigurationControl
ConfigurationTaskException
public ConsistencyCheckResultInterface releaseConfigurationAreasForActivationWithoutCAActivation(Collection<ConfigAreaAndVersion> configurationAreas) throws ConfigurationChangeException
releaseConfigurationAreasForActivationWithoutCAActivation
in interface ConfigurationControl
ConfigurationChangeException
public SystemObject getObject(String pid)
getObject
in interface DataModel
getObject
in interface ObjectLookup
public SystemObject getObject(long id)
getObject
in interface DataModel
getObject
in interface ObjectLookup
private String getPidOfType(long id)
id
- die ID des Objekts
SystemObject createSystemObject(SystemObjectInformationInterface systemObjectInfo)
systemObjectInfo
- das korrespondierende Objekt aus den Konfigurationsdateien
SystemObject createSystemObject(ConfigurationArea configurationArea, SystemObjectInformationInterface systemObjectInfo)
systemObjectInfo
- das korrespondierende Objekt für die Dateioperationen des SystemObjektsconfigurationArea
- Konfigurationsbereich des System-Objekt
public ConfigurationArea getConfigurationArea(String pid)
getConfigurationArea
in interface DataModel
public Map<String,ConfigurationArea> getAllConfigurationAreas()
getAllConfigurationAreas
in interface ConfigurationControl
public Data[] getConfigurationData(SystemObject[] objects, AttributeGroup atg)
getConfigurationData
in interface DataModel
public Data[] getConfigurationData(Collection<SystemObject> objects, AttributeGroup atg)
getConfigurationData
in interface DataModel
public Data[] getConfigurationData(SystemObject[] objects, AttributeGroup atg, Aspect asp)
getConfigurationData
in interface DataModel
public Data[] getConfigurationData(Collection<SystemObject> objects, AttributeGroup atg, Aspect asp)
getConfigurationData
in interface DataModel
public short getActiveVersion(ConfigurationArea configurationArea)
getActiveVersion
in interface DataModel
public SystemObjectType getTypeTypeObject()
getTypeTypeObject
in interface DataModel
public List<SystemObjectType> getBaseTypes()
getBaseTypes
in interface DataModel
public SystemObjectType getType(String pid)
getType
in interface DataModel
public ObjectSetType getObjectSetType(String pid)
getObjectSetType
in interface DataModel
public AttributeGroup getAttributeGroup(String pid)
getAttributeGroup
in interface DataModel
public AttributeType getAttributeType(String pid)
getAttributeType
in interface DataModel
public Aspect getAspect(String pid)
getAspect
in interface DataModel
public ConfigurationObject createConfigurationObject(ConfigurationObjectType type, String pid, String name, List sets) throws ConfigurationChangeException
createConfigurationObject
in interface DataModel
ConfigurationChangeException
public DynamicObject createDynamicObject(SystemObjectType type, String pid, String name) throws ConfigurationChangeException
createDynamicObject
in interface DataModel
ConfigurationChangeException
public void deleteObjects(short simulationVariant)
simulationVariant
- die Simulationsvariantepublic Collection<SystemObject> getObjects(String pid, long startTime, long endTime)
getObjects
in interface DataModel
public Collection<SystemObject> getObjects(Collection<ConfigurationArea> configurationAreas, Collection<SystemObjectType> systemObjectTypes, ObjectTimeSpecification objectTimeSpecification)
getObjects
in interface DataModel
public UserAdministration getUserAdministration()
getUserAdministration
in interface DataModel
protected Collection<SystemObjectType> getAllSubTypes(SystemObjectType type)
type
- der zu betrachtende Objekt-Typ
public String toString()
toString
in class Object
public void save() throws IOException
IOException
- Fehler, die beim Speichern der Verwaltungsdaten oder der Konfigurationsdateien auftreten, werden hier weitergereicht.public void close()
public void setConfigurationAuthority(ConfigurationAuthority authority)
authority
- der Konfigurationsverantwortliche der Konfigurationpublic ConfigurationArea createConfigurationArea(String areaName, String areaPid, SystemObjectType authorityObjectType, String authorityPid, String authorityName, long authorityCoding) throws ConfigurationChangeException
ConfigurationChangeException
public ConfigurationArea createConfigurationArea(String name, String pid, String authorityPid) throws ConfigurationChangeException
createConfigurationArea
in interface ConfigurationControl
ConfigurationChangeException
Collection<SystemObject> getCurrentObjects(ConfigurationArea configurationArea)
configurationArea
- der Konfigurationsbereich
ConfigurationArea
Collection<SystemObject> getNewObjects(ConfigurationArea configurationArea)
configurationArea
- der Konfigurationsbereich
ConfigurationArea
public AttributeGroupUsage getAttributeGroupUsage(long usageIdentification)
getAttributeGroupUsage
in interface DataModel
usageIdentification
- Identifizierung dieser Attributgruppenverwendung bei der Kommunikation über den Datenverteiler.
private void checkAreaDependency(Collection<ConfigAreaAndVersion> areasAndVersions)
areasAndVersions
- Bereiche und deren Versionen die auf Abhängigikeit geprüft werden sollen.
IllegalStateException
- Es wurden notwendige Abhängigkeiten zwischen Bereichen gefunden, die nicht aufgelöst werden konnten.public void setAllowDoublePids(boolean allowDoublePids)
allowDoublePids
- true
falls doppelte Pids in verschiedenen Konfigurationsbereichen von der Konsistenzprüfung zugelassen werden sollen.public boolean getAllowDoublePids()
true
falls doppelte Pids in verschiedenen Konfigurationsbereichen von der Konsistenzprüfung zugelassen werden sollen.public void setIgnoreDependencyErrorsInConsistencyCheck(boolean ignoreDependencyErrorsInConsistencyCheck)
ignoreDependencyErrorsInConsistencyCheck
- true
falls Fehler bei der Prüfung der Abhängigkeiten in der Konsistenzprüfung ignoriert
werden sollen.public boolean getIgnoreDependencyErrorsInConsistencyCheck()
public void saveSetElementsFileLater(ConfigMutableSet configMutableSet)
public void saveSetElementsFiles()
public void sendCollectionChangedNotification(ConfigMutableCollectionSupport mutableCollectionSupport, short simulationVariant, List<SystemObject> addedElements, List<SystemObject> removedElements)
mutableCollectionSupport
- Verwaltungsobjekt für AktualisierungsnachrichtensimulationVariant
- Simulationsvariante der ÄnderungaddedElements
- Hinzugefügte Elemente der dynamischen ZusammenstellungremovedElements
- Entfernte Elemente der dynamischen Zusammenstellung
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |