public abstract class DataPack extends Object
IResource
to
be created. Note that any implementation of this abstract class must ensure
that it will be immutable as well.Type | Property and Description |
---|---|
boolean |
generateDisplayName
flag telling if for a resource created with this datapack should be
created or not.
|
Constructor and Description |
---|
DataPack(String name,
IPropertyMap properties)
abstract constructor which must be used by all implementing classes.
|
Modifier and Type | Method and Description |
---|---|
abstract DataPack |
add(IProperty property)
creates a new DataPack object that is a 1:1 copy of this instance but with the given
parameter as additional property.
|
protected IPropertyMap |
addProperty(IProperty property)
convinience method for implementing classes to create a new
IPropertyMap that includes the given property. |
boolean |
generateDisplayNameProperty()
flag telling if for a resource created with this datapack should be
created or not.
|
abstract DataPack |
modify(IProperty property)
creates a new DataPack object that is a 1:1 copy of this instance but with the given
parameter as additional or modified property.
|
protected IPropertyMap |
modifyProperty(IProperty property)
convinience method for implementing classes to create a new
IPropertyMap that includes the given property. |
String |
name() |
IPropertyMap |
properties() |
public boolean generateDisplayNameProperty
true
public DataPack(String name, IPropertyMap properties)
name
and
properties
. If the given map implements the IMutablePropertyMap
interface, a IPropertyMap
will be created from this map, so this class
can ensure that only immutable maps are available from its properties
method.name
- the name of the IResource
to create. This must not be null and
the expression name.trim().equals("")
must not be true
. If the name
contains characters that are not usable for the RepositoryFramework, problems creating a resource
with this datapack might occur. The classes ResourceCreator
and
MassResourceCreator
in this package use the IDResolver
to modify this
name to ensure a valid id for the IResource
properties
- the properties for the IResource
to create, might be null
.public final String name()
public final IPropertyMap properties()
public boolean generateDisplayNameProperty()
true
protected final IPropertyMap modifyProperty(IProperty property)
IPropertyMap
that includes the given property. If the
given property is null
, the existing (or non-existing) map
is returned. Otherwise, the property will be added and a new
IPropertyMap
is returned. The original property map of this
instance will not be modified.property
- the property to be included in the map, might be null
IPropertyMap
that holds the given property
or null
, if both the property and the current map of this class are
null
or the existing propertymap of this instance if only the property
is null
protected final IPropertyMap addProperty(IProperty property)
IPropertyMap
that includes the given property. The difference to
the modify
method is, that if the given property already exists in
the propertymap, no changes will be done. Instead, the same propertymap will be
returnedproperty
- the property to be included in the map, might be null
IPropertyMap
that holds the given property
or null
, if both the property and the current map of this class are
null
or the existing propertymap of this instance if only the property
is null
or the map already includes this propertypublic abstract DataPack modify(IProperty property)
null
, all values
will be equal.property
- the property to modify for the new datapack, might be null
public abstract DataPack add(IProperty property)
null
, all values
will be equal.property
- the property to add for the new datapack, might be null
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice