public interface IPcdUtils
This interface is not intended to be implemented by clients.
| Modifier and Type | Method and Description |
|---|---|
String |
convertShortNameToUrl(String shortName)
Converts a short name to its corresponding URL (name including JNDI
scheme).
|
String |
convertUrlToShortName(String url)
Converts a URL (name including JNDI scheme) to a short name.
|
IPcdAttribute |
createPcdAttribute(PcdAttributeValueType type,
IPcdAttributeId attributeId)
Creates an ordered PcdAttribute of the specified value type and id.
|
IPcdAttribute |
createPcdAttribute(PcdAttributeValueType type,
IPcdAttributeId attributeId,
boolean isOrdered)
Creates a PcdAttribute of the specified value type and id and ordering
|
IPcdAttribute |
createPcdAttribute(PcdAttributeValueType type,
String attributeName)
Creates an ordered PcdAttribute of the selected value type.
|
IPcdAttribute |
createPcdAttribute(PcdAttributeValueType type,
String attributeName,
boolean isOrdered)
Creates PcdAttribute instance
|
IPcdAttributeId |
createPcdAttributeId(String[] attributeNameElements)
Creates a compound attribute identifier from the specified attribute ID
components.
|
IPcdAttributes |
createPcdAttributes()
createPcdAttributes creates an instance of PcdAttributes |
String |
escapeShortName(String shortName)
Escapes a short name so that it can be used as atomic name in PCD.
|
Locale |
getDefaultLocale()
Returns the default locale of the portal.
|
ILockHandle |
getLockHandle(String nameInNamespace)
Returns the
ILockHandle for the specified name (i.e.,
without prefix), which allows to lock/unlock it etc. |
int |
getMaxLengthAtomicName()
Returns the maximum length of atomic names.
|
int |
getMaxLengthAttributeId()
Deprecated.
the restriction in the length of an attributes name has been
removed
|
int |
getMaxLengthTextType()
Returns the maximum length of a text type.
|
IPcdNameFactory |
getPcdNameFactory()
Returns an
IPcdNameFactory instance that provides various methods
for creation of IPcdName objects. |
String |
getUrlSchemePrefix()
Returns the pcd url scheme prefix (pcd:)
|
WriteProtectInfo |
getWriteProtectInfo()
Returns information about the write protect mode.
|
boolean |
isADbSearch(String jndiFilterExpr,
Object[] filterArgs,
Locale locale) |
boolean |
matches(String objAtomicName,
String objObjectClass,
String objDeltalinkTarget,
IPcdAttributes objAttributes,
IPcdAttributes objUnitAttributes,
IPcdAttributes matchingAttributes,
String filterExpression,
Locale locale)
Performs the same comparison as is used internally during the search.
|
boolean |
originalLocaleTextsOnly()
If true, only texts in the original locale are returned.
|
void |
publishChanges()
Publishes changes to pcd objects to all other objects that depend on the
changed one.
|
DirContext |
recreateSchemaEntry(String atomicName,
Attributes attrs,
Object securityPrincipal)
Ensures that the specified schema entry exists (after this call returns).
|
boolean |
storesLongString(String longStr)
Returns true if the long string
longStr has already been
converted to a short string. |
String |
unescapeShortName(String escapedShortName)
Unescapes a short name that has been escaped with method
escapeShortName(String). |
IPcdAttribute createPcdAttribute(PcdAttributeValueType type, String attributeName)
type - value typeattributeName - the new attribute nameIPcdAttribute createPcdAttribute(PcdAttributeValueType type, String attributeName, boolean isOrdered)
type - value typeattributeName - the new attribute nameisOrdered - flag if attribute is orderedIPcdAttribute createPcdAttribute(PcdAttributeValueType type, IPcdAttributeId attributeId)
type - value typeattributeId - the ID of the new attributeIPcdAttribute createPcdAttribute(PcdAttributeValueType type, IPcdAttributeId attributeId, boolean isOrdered)
type - value typeattributeId - the ID of the new attributeisOrdered - flag if attribute is orderedIPcdAttributeId createPcdAttributeId(String[] attributeNameElements)
Note: usage of compound attribute IDs should be restricted to special use-cases. This method is not intended for public use and might be discarded in future releases.
attributeNameElements - the elements of the compound attribute idIPcdAttributes createPcdAttributes()
createPcdAttributes creates an instance of PcdAttributesint getMaxLengthAtomicName()
@Deprecated int getMaxLengthAttributeId()
int getMaxLengthTextType()
String convertUrlToShortName(String url) throws IllegalArgumentException
url - name including JNDI schemeIllegalArgumentException - if the parameter is notconvertShortNameToUrl(String)String convertShortNameToUrl(String shortName)
shortName - short nameconvertUrlToShortName(String)String escapeShortName(String shortName)
The short name generated by method convertUrlToShortName(String)
can contain characters which are not allowed as part of an atomic name in
PCD.
This method "escapes" these characters by replacing them with characters
which are allowed for names in PCD but which are not part of the
character encoding which is used by method
convertUrlToShortName(String)
shortName - A short name generated by
convertUrlToShortName(String)unescapeShortName(String),
convertUrlToShortName(String)String unescapeShortName(String escapedShortName)
escapeShortName(String).escapedShortName - A short name which was escaped by
escapeShortName(String)convertUrlToShortName(String)escapeShortName(String)boolean storesLongString(String longStr)
longStr has already been
converted to a short string.longStr - long stringlongStr has already been
converted to a short string, otherwise falseString getUrlSchemePrefix()
Locale getDefaultLocale()
boolean originalLocaleTextsOnly()
com.sapportals.portal.pcd.gl for details.void publishChanges()
DirContext recreateSchemaEntry(String atomicName, Attributes attrs, Object securityPrincipal) throws NamingException
atomicName - name of the schema entryattrs - attributes of the schema entrysecurityPrincipal - security principal, which is added to the environment of the
context; can be null; in future releases this might become a
required parameterNamingException - if a naming exception is encounteredILockHandle getLockHandle(String nameInNamespace) throws NamingException
ILockHandle for the specified name (i.e.,
without prefix), which allows to lock/unlock it etc. This method should
be used if you need to lock a not yet existing unit. It is not checked
whether the object exists, and whether it is a unit.nameInNamespace - a pcd-internal "name in namespace", i.e., without url-prefixNamingException - if a naming exception is encounteredWriteProtectInfo getWriteProtectInfo()
IPcdNameFactory getPcdNameFactory()
IPcdNameFactory instance that provides various methods
for creation of IPcdName objects.IPcdNameFactory instanceboolean matches(String objAtomicName, String objObjectClass, String objDeltalinkTarget, IPcdAttributes objAttributes, IPcdAttributes objUnitAttributes, IPcdAttributes matchingAttributes, String filterExpression, Locale locale) throws NamingException
objAtomicName - maybe null if the comparison does not check the atomic nameobjObjectClass - maybe null if the comparison does not check the obejct classobjDeltalinkTarget - maybe null if the comparison does not check the deltalink
targetobjAttributes - the attributes of the objectobjUnitAttributes - maybe null if the comparison does not check the unit
attributes of the objectmatchingAttributes - maybe null if filterExpression is not nullfilterExpression - maybe null if matchingAttributes is not nulllocale - is relevant only if text attributes are comparedtrue if the object matchesNamingException - if e.g. the filterString cannot be parsedboolean isADbSearch(String jndiFilterExpr, Object[] filterArgs, Locale locale) throws InvalidSearchFilterException
jndiFilterExpr - filterString the pattern stringfilterArgs - arguments object(s) to formatlocale - is relevant only if text attributes are comparedtrue if the given expression can be executed on the
database layer, i.e. only considers object class, atomic name and
unit attributes - atomic name and object class may be case
insensitive. In the case-insensitive case, the PL layer does the
post filtering directly on the result set.InvalidSearchFilterException - if the filter arguments contain invalid elements| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-BASIS
|
[sap.com]
|
api
|
BC-PIN-PCD
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/pcd/gl/api
|
-
|
EP-PIN
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/pcd/gl/api
|
api
|
EP-PIN
|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/semantics/api
|
api
|
EP-PIN
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice