public final class LinkDataPack extends DataPack
ICollection. This class is immutable. If the target resource is
itself a link, the data pack will use the IResource.getTargetResource()
method to retrieve the target of that link. This target will then be used as
target for the newly created link. This is only applicable, if the link to
be created is of LinkType.INTERNAL| Type | Property and Description |
|---|---|
boolean |
generateDisplayName
returns
false if it is an LinkType.INTERNAL
For these internal links, the default link generation must not create a
displayname property, if the target has a displayname, because the link should show
its targets displayname as displayname. |
| Constructor and Description |
|---|
LinkDataPack(IPropertyMap properties,
IResource target)
Convenience constructor to create a link of type
LinkType.INTERNAL. |
LinkDataPack(String name,
IPropertyMap properties,
IResource target)
Convenience constructor to create a link of type
LinkType.INTERNAL. |
LinkDataPack(String name,
IPropertyMap properties,
LinkType type,
URL target,
IResourceContext context)
standard constructor for this class.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
generateDisplayNameProperty()
returns
false if it is an LinkType.INTERNAL
For these internal links, the default link generation must not create a
displayname property, if the target has a displayname, because the link should show
its targets displayname as displayname. |
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.
|
URL |
target() |
LinkType |
type() |
addProperty, modifyProperty, name, propertiespublic boolean generateDisplayNameProperty
false if it is an LinkType.INTERNAL
For these internal links, the default link generation must not create a
displayname property, if the target has a displayname, because the link should show
its targets displayname as displayname. For external links, a displayname
property is wanted, because the external link cannot be used as a displayname-provider.generateDisplayNameProperty in class DataPackpublic LinkDataPack(String name, IPropertyMap properties, LinkType type, URL target, IResourceContext context)
name - the name the link should have, must not be nullproperties - properties to be set for the link, might be nulltype - specifies if a link to an object within the repository framework
LinkType.INTERNAL or to an object outside the framework,
LinkType.EXTERNAL, should be created. Must not be nulltarget - the adress of the object the link should point at. Must not be nullcontext - no descriptionpublic LinkDataPack(String name, IPropertyMap properties, IResource target) throws ResourceException
LinkType.INTERNAL. The
needed URL object will be created using the given target's RIDname - the name the link should have, must not be nullproperties - properties to be set for the link, might be nulltarget - the IResource the link should point at, must not be nullResourceException - if the target's RID is not retrievablepublic LinkDataPack(IPropertyMap properties, IResource target) throws ResourceException
LinkType.INTERNAL. The
needed URL object will be created using the given target's RID,
the name of the link will be the name of the targetproperties - properties to be set for the link, might be nulltarget - the IResource the link should point at, must not be nullResourceException - if the target's RID is not retrievablepublic boolean generateDisplayNameProperty()
false if it is an LinkType.INTERNAL
For these internal links, the default link generation must not create a
displayname property, if the target has a displayname, because the link should show
its targets displayname as displayname. For external links, a displayname
property is wanted, because the external link cannot be used as a displayname-provider.generateDisplayNameProperty in class DataPackpublic LinkType type()
public URL target()
public DataPack modify(IProperty property)
DataPacknull, all values
will be equal.| 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 2021 SAP SE Complete Copyright Notice