com.sapportals.portal.pcd.gl

Interface IPcdNameFactory


public interface IPcdNameFactory

Provides miscellaneous factory methods for creating PCD names. Instances of IPcdName created by this factory class use string pooling to share name components. Note that using these shared instances for short-term purposes (one request-response cycle) may result in unnecessary memory consumption. For short-term purposes use CompositeName.

This interface is not intended to be implemented by clients.


Method Summary
 IPcdName createPcdName()
          Creates and returns an IPcdName instance using the PCD delimiter and standard PCD name validation.
 IPcdName createPcdName(int size)
          Creates and returns an IPcdName instance of the provided (initial) size.
 IPcdName createPcdName(int size, char delimiter, boolean validateName)
          Creates and returns an IPcdName instance using the given size and delimiter.
 IPcdName createPcdName(String name)
          Creates and returns an IPcdName representation of the provided name using the PCD delimiter and standard PCD name validation.
 IPcdName createPcdName(String name, char delimiter, boolean validateName)
          Creates and returns an IPcdName representation of the provided name, using the given delimiter.
 IPcdName createReadOnlyPcdName(String name)
          Creates and returns a read-only IPcdName representation of the provided name using the PCD delimiter and standard PCD name validation.
 IPcdName createReadOnlyPcdName(String name, char delimiter, boolean validateName)
          Creates and returns a read-only IPcdName representation of the provided name, using the given delimiter.
 

Method Detail

createPcdName

IPcdName createPcdName()
Creates and returns an IPcdName instance using the PCD delimiter and standard PCD name validation.

Returns:
returns an IPcdName instance

createPcdName

IPcdName createPcdName(int size)
Creates and returns an IPcdName instance of the provided (initial) size. using the PCD delimiter and standard PCD name validation.

Parameters:
size - (initial) size of the name
Returns:
an IPcdName instance of the provided (initial) size.

createPcdName

IPcdName createPcdName(String name)
                       throws InvalidNameException
Creates and returns an IPcdName representation of the provided name using the PCD delimiter and standard PCD name validation.

Parameters:
name - String representation of the name to be parsed (not null)
Returns:
an IPcdName representation of the provided name
Throws:
InvalidNameException - if the given name is invalid

createReadOnlyPcdName

IPcdName createReadOnlyPcdName(String name)
                               throws InvalidNameException
Creates and returns a read-only IPcdName representation of the provided name using the PCD delimiter and standard PCD name validation. All modifying operations on a read-only name throw a runtime exception.

Parameters:
name - String representation of the name to be parsed (not null)
Returns:
a read-only IPcdName representation of the provided name
Throws:
InvalidNameException - if the given name is invalid

createPcdName

IPcdName createPcdName(int size,
                       char delimiter,
                       boolean validateName)
Creates and returns an IPcdName instance using the given size and delimiter. If name validation is required, standard PCD validation will be used.

Parameters:
size - (initial) size of the name
delimiter - a character that will be used as the delimiter in the returned name
validateName - defines if name components will be validated when added. If true, standard PCD name validation will be used.
Returns:
an IPcdName instance using the given size and delimiter

createPcdName

IPcdName createPcdName(String name,
                       char delimiter,
                       boolean validateName)
                       throws InvalidNameException
Creates and returns an IPcdName representation of the provided name, using the given delimiter. If name validation is required, standard PCD validation will be used.

Parameters:
name - String representation of the name to be parsed (not null)
delimiter - a character that will be used as the delimiter in the returned name
validateName - defines if name components will be validated when added. If true, standard PCD name validation will be used.
Returns:
an IPcdName representation of the provided name, using the given delimiter.
Throws:
InvalidNameException - if the given name is invalid and name validation is enabled (validateName is true).

createReadOnlyPcdName

IPcdName createReadOnlyPcdName(String name,
                               char delimiter,
                               boolean validateName)
                               throws InvalidNameException
Creates and returns a read-only IPcdName representation of the provided name, using the given delimiter. If name validation is required, standard PCD validation will be used. All modifying operations on a read-only name throw a runtime exception.

Parameters:
name - (initial) size of the name
delimiter - a character that will be used as the delimiter in the returned name
validateName - defines if name components will be validated when added. If true, standard PCD name validation will be used.
Returns:
a read-only IPcdName representation of the provided name, using the given delimiter
Throws:
InvalidNameException - if the given name is invalid and name validation is enabled (validateName is true).
Access Rights

This class can be accessed from:


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


Copyright 2011 SAP AG Complete Copyright Notice