Class ExpImpForSecurityLabelsAttr
java.lang.Object
wt.ixb.publicforhandlers.AttributeExporterImporterTemplate
wt.access.ixb.handlers.forattributes._ExpImpForSecurityLabelsAttr
wt.access.ixb.handlers.forattributes.ExpImpForSecurityLabelsAttr
- All Implemented Interfaces:
AttributeExporterImporter,wt.ixb.publicforhandlers.CommonAttributeConflictChecker
public class ExpImpForSecurityLabelsAttr
extends wt.access.ixb.handlers.forattributes._ExpImpForSecurityLabelsAttr
implements wt.ixb.publicforhandlers.CommonAttributeConflictChecker
This class performs import/export of the <SecurityLabels> attribute for
Supported API: true
Extendable: false
SecurityLabeled
objects. IX handlers for SecurityLabeled objects should call wt.ixb.publicforhandlers.
IxbHndHelper.exportAttribute(), IxbHndHelper.checkConflictForAttribute(), and
IxbHndHelper.importAttribute() from their exportAttributes(), checkConflicts()
, and importAttributes() methods respectively, with this class (
wt.access.ixb.handlers.forattributes.ExpImpForSecurityLabelsAttr) as the first parameter. <BR/P>
The system will export and import security labels regardless of whether the Security Labels feature is enabled. If no
security labels are defined in the source system, an empty SecurityLabels element will be exported.
When importing, the security labels and security label values must all be defined in the importing system's security
labels configuration. If an imported security label or security label value does not match the security label
configuration, a non-overridable conflict will be generated, and the import will fail. (There is one exception: if
the import contains a security label not matching the configuration whose value is
SecurityLabelsConfiguration.NULL, no conflict will result, because the null value would not restrict
access to the object). If the target system has an existing object with different values for security labels, an
overrideable conflict will be generated (This allows the user to consider which of the conflicting labels should in
fact be applied to the object).
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckConflictForAttribute(Object existObj, IxbElement fileXML, Importer importer) Checks for conflicts when importing SecurityLabels elements.voidcheckConflictForAttribute(IxbElement fileXML, Importer importer) Checks for conflicts when importing SecurityLabels elements for the preview case.voidcheckConflictForAttributeBatch(List<IxbHndHelper.ElementObjectPair> list, Importer importer, ElementImporter handler) Checks for conflicts when importing SecurityLabels elements.voidexportAttribute(Object obj, IxbElement fileXML, Exporter exporter) Exports the <SecurityLabels> attribute of aSecurityLabeledobject.importAttribute(Object obj, IxbElement fileXML, Importer importer) Imports the security labels attribute on the object.voidimportAttributeBatch(List<IxbHndHelper.ElementObjectPair> list, Importer importer) Imports the security labels attributes.Methods inherited from class wt.ixb.publicforhandlers.AttributeExporterImporterTemplate
finalizeCheckConflicts, finalizeExport, finalizeImport, prepareForCheckConflicts, prepareForImport
-
Method Details
-
exportAttribute
Exports the <SecurityLabels> attribute of aSecurityLabeledobject.
Supported API: true- Specified by:
exportAttributein interfaceAttributeExporterImporter- Overrides:
exportAttributein classAttributeExporterImporterTemplate- Parameters:
obj- TheSecurityLabeledobject whose security labels attribute is being exportedfileXML- TheIxbElementrepresenting theSecurityLabeledobject whose security labels attribute is being exported. An element representing the security labels attribute will be added to this element.exporter- TheExporterwhich is processing the security labels.- Throws:
WTException
-
importAttribute
Imports the security labels attribute on the object. On return, the imported security labels have been set on the specifiedSecurity Labeledobjects, but have not been persisted. If theSecurityLabelsIxbElementis missing or empty, the object's security labels will not be set.
Supported API: true- Specified by:
importAttributein interfaceAttributeExporterImporter- Overrides:
importAttributein classAttributeExporterImporterTemplate- Parameters:
obj- TheSecurityLabeledobject which the security labels are being set onfileXML-IxbElementfor the object from import fileimporter- TheImporterwhich is processing the import.- Returns:
- Object The object with security labels attribute set.
- Throws:
WTException
-
importAttributeBatch
public void importAttributeBatch(List<IxbHndHelper.ElementObjectPair> list, Importer importer) throws WTException Imports the security labels attributes. On return, the imported security labels have been set on the specifiedSecurity Labeledobjects, but have not been persisted. If theSecurityLabelsIxbElementis missing or empty, the object's security labels will not be set.
Supported API: true- Specified by:
importAttributeBatchin interfaceAttributeExporterImporter- Overrides:
importAttributeBatchin classAttributeExporterImporterTemplate- Parameters:
list- The list of objects to be imported, along with their respectiveIxbElement importer- TheImporterwhich is processing the import.- Throws:
WTException
-
checkConflictForAttribute
public void checkConflictForAttribute(Object existObj, IxbElement fileXML, Importer importer) throws WTException Checks for conflicts when importing SecurityLabels elements.- If SecurityLabel name is not valid (not found in security labels configuration):
- If value=
SecurityLabelsConfiguration.NULL, no conflict is reported. Otherwise, generate a non-overridableIXBConflictType.DEFAULT_IXB_TYPEconflict. - If the value for the security label is not valid (not found in security labels configuration for this label):
- Generate a non-overridable
IXBConflictType.DEFAULT_IXB_TYPEconflict - If imported security label values don't match those on already-persisted object:
- Generate an overrideable
IXBConflictType.EXISTING_OBJECT_ATTRIBUTE_CONFLICT - If the importing user doesn't have authorization to modify the security labels of an existing object:
- Generate an non-overrideable
IXBConflictType.NOT_AUTHORIZEDconflict.
Supported API: true- Specified by:
checkConflictForAttributein interfaceAttributeExporterImporter- Overrides:
checkConflictForAttributein classAttributeExporterImporterTemplate- Parameters:
existObj- existing (persisted) object for conflict checkfileXML-IxbElementfor the object from import fileimporter- TheImporterwhich is processing the import- Throws:
WTException- if an unexpected error occurs- See Also:
-
wt.ixb.publicforhandlers.imp.IXBImpConflictRB
-
checkConflictForAttributeBatch
public void checkConflictForAttributeBatch(List<IxbHndHelper.ElementObjectPair> list, Importer importer, ElementImporter handler) throws WTException Checks for conflicts when importing SecurityLabels elements.- If SecurityLabel name is not valid (not found in security labels configuration):
- If value=
SecurityLabelsConfiguration.NULL, no conflict is reported. Otherwise, generate a non-overridableIXBConflictType.DEFAULT_IXB_TYPEconflict. - If the value for the security label is not valid (not found in security labels configuration for this label):
- Generate a non-overridable
IXBConflictType.DEFAULT_IXB_TYPEconflict. - If imported security label values don't match those on already-persisted object:
- Generate an overrideable
IXBConflictType.EXISTING_OBJECT_ATTRIBUTE_CONFLICTconflict. - If the importing user doesn't have authorization to modify the security labels of an existing object:
- Generate an non-overrideable
IXBConflictType.NOT_AUTHORIZEDconflict.
Supported API: true- Specified by:
checkConflictForAttributeBatchin interfaceAttributeExporterImporter- Overrides:
checkConflictForAttributeBatchin classAttributeExporterImporterTemplate- Parameters:
list- The list of objects to be imported, along with their respectiveIxbElementimporter- TheImporterwhich is processing the import.handler- TheElementImporterinstance that represents the object handler.- Throws:
WTException- if an unexpected error occurs
-
checkConflictForAttribute
Checks for conflicts when importing SecurityLabels elements for the preview case. When this API is called, the object is not passed in so only a limited set of conflict checks are done (no conflicts associated with an existing object are checked).- If SecurityLabel name is not valid (not found in security labels configuration):
- If value=
SecurityLabelsConfiguration.NULL, no conflict is reported. Otherwise, generate a non-overridableIXBConflictType.DEFAULT_IXB_TYPEconflict. - If the value for the security label is not valid (not found in security labels configuration for this label):
- Generate a non-overridable
IXBConflictType.DEFAULT_IXB_TYPEconflict. - If imported security label values don't match those on already-persisted object:
- Generate an overrideable
IXBConflictType.EXISTING_OBJECT_ATTRIBUTE_CONFLICTconflict>.
Supported API: true- Specified by:
checkConflictForAttributein interfacewt.ixb.publicforhandlers.CommonAttributeConflictChecker- Parameters:
fileXML-IxbElementfor the object from import fileimporter- TheImporterwhich is processing the import- Throws:
WTException- if an unexpected error occurs
-