com.sapportals.portal.pcd.gl

Interface IUnit


public interface IUnit

Interface that contains unit-specific methods. See the package-description for details of what units are. This interface is returned by IPcdContext.getUnit().

In contrast to this, the method IPcdContext.isUnit() returns true only for semantic objects that form the root of a real unit. Units can be version-controlled and control the handling of language resources, especially with respect to translation. Further, the Pcd tracks created at/by and last-changed at/by information on the granularity of units. Least not last, the Pcd defines a namespace for unit attributes that can be used for application purposes as well. In contrast to attributes, unit attributes are not inherited through the deltalink mechanism.

This interface is not intended to be implemented by clients.


Field Summary
static String COLLECTION
          Collection
static String CREATED_AT
          Creation time of the object
static String CREATED_BY
          Creator of the object
static String DEVELOPMENT_COMPONENT_NAME
          The name of the Development Component to which this unit is assigned.
static String DEVELOPMENT_COMPONENT_VENDOR
          The vendor (-id) of the Development Component to which this unit is assigned.
static String DOMAIN
          Domain
static String IS_TEMPLATE
          Optional attribute for units that serve as templates for others.
static String LAST_CHANGED_AT
          Last time the object was changed
static String LAST_CHANGED_BY
          Last user who changed the object
static String ORIGINAL_LOCALE
          Original Locale
static String RESPONSIBLE
          Responsible person
static String SYSTEM_LOCAL_DEVELOPMENT_COMPONENT
          Defines the name of the built-in Development Component for system-local objects.
static String SYSTEM_LOCAL_GENERATED_DEVELOPMENT_COMPONENT
          Defines the name of the built-in Development Component for generated system-local objects.
static String TRANSPORT_DEPENDENCIES
          Deprecated. use IPcdAttribute.TRANSPORT_DEPENDENCIES
static String UNIT_ATTR_NAMESPACE
          Namespace of all unit attributes
 
Method Summary
 void checkOutForEdit(Object versionControlActivity, boolean exclusive)
          Deprecated. version-control not fully supported; changes expected in future releases
 String getCollection()
          Get the value for the collection unit attribute, which is used for in the translation of the texts belonging to this unit.
 String getDomain()
          Get the value for the domain unit attribute, which is used for in the translation of the texts belonging to this unit.
 ILockHandle getLockHandle()
          Returns the lock handle, which allows to lock or unlock this unit
 String getNameInNamespace()
          The name of the unit is returned.
 String getOriginalCountry()
          Deprecated. please use getOriginalLocale() instead
 String getOriginalLanguage()
          Deprecated. please use getOriginalLocale() instead
 Locale getOriginalLocale()
          Get the value for the original-locale unit attribute, which is used for in the translation of the texts belonging to this unit.
 IPcdAttributes getUnitAttributes()
          Returns the unit attributes.
 IVersionControlInfo getVersionControlInfo()
          Deprecated. version-control not fully supported; changes expected in future releases
 boolean isTransportable()
          Deprecated. evaluate the DEVELOPMENT_COMPONENT_NAME attribute instead
 void modifyUnitAttributes(ModificationItem[] mods)
          Modifies the unit attributes.
 void setCollection(String collection)
          Set the value for the collection unit attribute, which is used for in the translation of the texts belonging to this unit.
 void setDevelopmentComponent(Object versionControlActivity, String developmentComponentVendor, String developmentComponentName)
          Deprecated. version-control not fully supported; changes expected in future releases
 void setDomain(String domain)
          Set the value for the domain unit attribute, which is used for in the translation of the texts belonging to this unit.
 void setOriginalCountry(String country)
          Deprecated. please use setOriginalLocale(java.util.Locale) instead
 void setOriginalLanguage(String language)
          Deprecated. please use setOriginalLocale(java.util.Locale) instead
 void setOriginalLocale(Locale locale)
          Set the value for the original-language attribute, which is used for in the translation of the texts belonging to this unit.
 void setTransportable(boolean isTransportable)
          Deprecated. use method setDevelopmentComponent(Object, String, String) instead.
 

Field Detail

UNIT_ATTR_NAMESPACE

static final String UNIT_ATTR_NAMESPACE
Namespace of all unit attributes

See Also:
Constant Field Values

CREATED_BY

static final String CREATED_BY
Creator of the object

See Also:
Constant Field Values

CREATED_AT

static final String CREATED_AT
Creation time of the object

See Also:
Constant Field Values

LAST_CHANGED_BY

static final String LAST_CHANGED_BY
Last user who changed the object

See Also:
Constant Field Values

LAST_CHANGED_AT

static final String LAST_CHANGED_AT
Last time the object was changed

See Also:
Constant Field Values

RESPONSIBLE

static final String RESPONSIBLE
Responsible person

See Also:
Constant Field Values

COLLECTION

static final String COLLECTION
Collection

See Also:
Constant Field Values

DOMAIN

static final String DOMAIN
Domain

See Also:
Constant Field Values

ORIGINAL_LOCALE

static final String ORIGINAL_LOCALE
Original Locale

See Also:
Constant Field Values

DEVELOPMENT_COMPONENT_NAME

static final String DEVELOPMENT_COMPONENT_NAME
The name of the Development Component to which this unit is assigned. The Development Component is a transport unit used by software logistics.

This attribute can be set during object creation using IPcdContext.bind(javax.naming.Name, Object, javax.naming.directory.Attributes, int), but cannot be modified by method modifyUnitAttributes(ModificationItem[]). Changing the development component of existing objetcs has to be done by calling method setDevelopmentComponent(Object, String, String) instead.

For more details, please refer to the chapter on Versioning in the package description of com.sapportals.portal.pcd.gl.

See Also:
Constant Field Values

DEVELOPMENT_COMPONENT_VENDOR

static final String DEVELOPMENT_COMPONENT_VENDOR
The vendor (-id) of the Development Component to which this unit is assigned. The Development Component is a transport unit used by software logistics.

This attribute can be set during object creation using IPcdContext.bind(javax.naming.Name, Object, javax.naming.directory.Attributes, int), but cannot be modified by method modifyUnitAttributes(ModificationItem[]). Changing the development component of existing objetcs has to be done by calling method setDevelopmentComponent(Object, String, String) instead.

For more details, please refer to the chapter on Versioning in the package description of com.sapportals.portal.pcd.gl.

See Also:
Constant Field Values

SYSTEM_LOCAL_DEVELOPMENT_COMPONENT

static final String SYSTEM_LOCAL_DEVELOPMENT_COMPONENT
Defines the name of the built-in Development Component for system-local objects. These are objects that are not intended to be transported upon creation (e.g. for local tests or if the DC assignment is not known yet). These objects can be added to version-control (and the software logistic process) using the method setDevelopmentComponent(java.lang.Object, java.lang.String, java.lang.String) later on.

The DEVELOPMENT_COMPONENT_VENDOR attribute is empty for system-local objects.

For more details, please refer to the chapter on Versioning in the package description of com.sapportals.portal.pcd.gl.

TODO: clarify final value of this constant in SDIC (reserved name, etc.)

See Also:
Constant Field Values

SYSTEM_LOCAL_GENERATED_DEVELOPMENT_COMPONENT

static final String SYSTEM_LOCAL_GENERATED_DEVELOPMENT_COMPONENT
Defines the name of the built-in Development Component for generated system-local objects. These objects are created programmatically and are never intended to be transported by software logistics (e.g. runtime-objects like portal application profiles). These objects can not be added to version-control (and the software logistic process) later on.

The DEVELOPMENT_COMPONENT_VENDOR attribute is empty for generated system-local objects.

For more details, please refer to the chapter on Versioning in the package description of com.sapportals.portal.pcd.gl.

TODO: clarify final value of this constant in SDIC (reserved name, etc.)

See Also:
Constant Field Values

TRANSPORT_DEPENDENCIES

static final String TRANSPORT_DEPENDENCIES
Deprecated. use IPcdAttribute.TRANSPORT_DEPENDENCIES
Optional attribute for transportable objects. The String attribute contains a comma-separated list of unique access URLs of objects that the current object directly depends on.

Note that the dependencies have to be set on DCs for the NWDI based transport. Nevertheless, this information is useful for correlating the PCD object dependencies with the DC dependencies.

See Also:
Constant Field Values

IS_TEMPLATE

static final String IS_TEMPLATE
Optional attribute for units that serve as templates for others. This attribute is not inherited through the deltalink mechanism, and it is supported well in queries.

See Also:
Constant Field Values
Method Detail

getNameInNamespace

String getNameInNamespace()
                          throws NamingException
The name of the unit is returned.

Returns:
String
Throws:
NamingException

getLockHandle

ILockHandle getLockHandle()
                          throws NamingException
Returns the lock handle, which allows to lock or unlock this unit

Returns:
the respective ILockHandle
Throws:
NamingException

getUnitAttributes

IPcdAttributes getUnitAttributes()
                                 throws NamingException
Returns the unit attributes.

Returns:
All unit attributes of the object.
Throws:
NamingException

modifyUnitAttributes

void modifyUnitAttributes(ModificationItem[] mods)
                          throws NamingException
Modifies the unit attributes. This method takes into account all semantic checks that are required and that would be performed if the corresponding explicit setter methods were called.

Parameters:
mods -
Throws:
NamingException

getVersionControlInfo

IVersionControlInfo getVersionControlInfo()
                                          throws NamingException
Deprecated. version-control not fully supported; changes expected in future releases

Gets version control information for this unit.

Returns:
the version control info for this unit (never null).
Throws:
NamingException

checkOutForEdit

void checkOutForEdit(Object versionControlActivity,
                     boolean exclusive)
                     throws NamingException
Deprecated. version-control not fully supported; changes expected in future releases

Checks this unit out for edit into the specified version-control activity.

Parameters:
versionControlActivity - the activity (change list) used for the check-out operation in the version-control system. For convenience, it is also possible to pass null, if the activity is set in the JNDI environment of the context that was used to lookup this object. The constant for this environment variable is defined by com.sap.portal.directory.Constants.VERSION_CONTROL_ACTIVITY.
exclusive - if true, the object cannot be checked-out by other users; note that the implementation may check-out objects exclusively even if false is specified
Throws:
NamingException - if the object cannot be checked out

setDevelopmentComponent

void setDevelopmentComponent(Object versionControlActivity,
                             String developmentComponentVendor,
                             String developmentComponentName)
                             throws NamingException
Deprecated. version-control not fully supported; changes expected in future releases

Sets the Development Component of this unit.

If the current setting of the DEVELOPMENT_COMPONENT_NAME attribute is SYSTEM_LOCAL_DEVELOPMENT_COMPONENT, the object will be added to version control. If the object was already assigned to a real development component, this call will effectively move the corresponding resources in the DTR according to the new location. If the current setting of the DEVELOPMENT_COMPONENT_NAME attribute is SYSTEM_LOCAL_GENERATED_DEVELOPMENT_COMPONENT, an exception is thrown, because it is not possible to add generated objects to version control.

Parameters:
versionControlActivity - the activity (change list) used for this operation in the version-control system
developmentComponentVendor - the vendor-id for this development component
developmentComponentName - the name of this development component
Throws:
NamingException - if the object cannot be added to version-control

getCollection

String getCollection()
Get the value for the collection unit attribute, which is used for in the translation of the texts belonging to this unit.

Returns:
the value for the collection attribute as string, null if collection not set.

setCollection

void setCollection(String collection)
                   throws NamingException
Set the value for the collection unit attribute, which is used for in the translation of the texts belonging to this unit.

Parameters:
collection - the value for the collection attribute as string, null if the attribute should be removed (cleared).
Throws:
NamingException

getDomain

String getDomain()
Get the value for the domain unit attribute, which is used for in the translation of the texts belonging to this unit.

Returns:
the value for the domain attribute as string, null if domain is not set.

setDomain

void setDomain(String domain)
               throws NamingException
Set the value for the domain unit attribute, which is used for in the translation of the texts belonging to this unit.

Parameters:
domain - the value for the domain attribute as string, null if the attribute should be removed (cleared).
Throws:
NamingException

getOriginalLocale

Locale getOriginalLocale()
Get the value for the original-locale unit attribute, which is used for in the translation of the texts belonging to this unit.

Returns:
the value for the original locale null if no original locale is set.
See Also:
setOriginalLocale(java.util.Locale)

setOriginalLocale

void setOriginalLocale(Locale locale)
                       throws NamingException
Set the value for the original-language attribute, which is used for in the translation of the texts belonging to this unit.

Parameters:
locale - the new value for the original locale, null if the attribute should be removed (cleared).
Throws:
NamingException

getOriginalLanguage

String getOriginalLanguage()
Deprecated. please use getOriginalLocale() instead

Returns:
String

setOriginalLanguage

void setOriginalLanguage(String language)
                         throws NamingException
Deprecated. please use setOriginalLocale(java.util.Locale) instead

Parameters:
language -
Throws:
NamingException

getOriginalCountry

String getOriginalCountry()
Deprecated. please use getOriginalLocale() instead

Get the value for the country part of the original-locale attribute, which is used for the translation process of the texts that belonging to this unit.

Returns:
String

setOriginalCountry

void setOriginalCountry(String country)
                        throws NamingException
Deprecated. please use setOriginalLocale(java.util.Locale) instead

Parameters:
country -
Throws:
NamingException

isTransportable

boolean isTransportable()
Deprecated. evaluate the DEVELOPMENT_COMPONENT_NAME attribute instead

Returns true if this object is not explicitely marked as not transportable. All pcd generic layer objects are transportable by default. This is not desired in all use-cases. To prevent single objects from being transported, they can be explicitly marked as transportable or not transportable. Explicitly marking an object as not transportable prevents this object from being exported, as long as the generic transport is used for this type of object. Objects that use their own transport implementation might ignore this setting.

Returns:
boolean
See Also:
setTransportable(boolean)

setTransportable

void setTransportable(boolean isTransportable)
                      throws NamingException
Deprecated. use method setDevelopmentComponent(Object, String, String) instead.

Parameters:
isTransportable -
Throws:
NamingException
See Also:
isTransportable()
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS [sap.com] tc/epbc/pcd/pars/srvgldeprecated 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] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice