com.sapportals.wcm.repository

Class NameInfo

java.lang.Object
  extended by com.sapportals.wcm.repository.NameInfo

public class NameInfo
extends Object

This object contains information about the restrictions for resource and collection names of a specific repository. This information should be provided by any repository via the IRepositoryManager.getNameInfo() method.

The implementation of this object ensures that the WCM framework's restrictions are added. The WCM framework enforced the following restrictions on the namespace of all repositories for new resources and collections. Reserved/forbidden characters in resource and collection names: '/', '\', '?' Maximum length of name and path: 2048 characters

Copyright 2004 SAP AG


Constructor Summary
NameInfo(char[] resNameChars, char[] collNameChars, int maxNameLength, int maxPathLength)
          Construct a new name info
NameInfo(NameInfo obj, char[] resNameChars, String[] deniedExtensions, boolean noExtension)
          From the given NameInfo object constructs a new object and adds the restricted extensions and characters to it
 
Method Summary
 void checkExtension(String name, IResource resource)
           
 void checkName(String name)
           
 void checkName(String name, IResource res)
           
 String[] getDeniedExtensions()
           
 int getMaxNameLength()
          Returns the maximum length for resource names
 int getMaxPathLength()
          Returns the maximum path length
 char[] getReservedCollectionNameChars()
          Returns the array of reserved or forbidden characters in collection names
 char[] getReservedResourceNameChars()
          Returns the array of reserved or forbidden characters in resource names
 boolean isNoExtension()
           
 void setDeniedExtensions(String[] deniedExtensions)
           
 void setNoExtension(boolean noExtension)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameInfo

public NameInfo(char[] resNameChars,
                char[] collNameChars,
                int maxNameLength,
                int maxPathLength)
Construct a new name info

Parameters:
resNameChars - An array of reserved or forbidden characters in resource names
collNameChars - An array of reserved or forbidden characters in collection names
maxNameLength - The maximum length for resource names.
maxPathLength - The maximum path length. The max. path length will not be checked by the framework.

NameInfo

public NameInfo(NameInfo obj,
                char[] resNameChars,
                String[] deniedExtensions,
                boolean noExtension)
From the given NameInfo object constructs a new object and adds the restricted extensions and characters to it

Parameters:
obj - existing NameInfo object
resNameChars - additional characters to restrict
deniedExtensions - additional extensions to restrict
noExtension - flag which is true if resource names without extensions are denied
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getReservedResourceNameChars

public char[] getReservedResourceNameChars()
Returns the array of reserved or forbidden characters in resource names

Returns:
reservedResourceNameChars

getReservedCollectionNameChars

public char[] getReservedCollectionNameChars()
Returns the array of reserved or forbidden characters in collection names

Returns:
reservedCollectionNameChars

getMaxNameLength

public int getMaxNameLength()
Returns the maximum length for resource names

Returns:
maxNameLength

getMaxPathLength

public int getMaxPathLength()
Returns the maximum path length

Returns:
maxPathLength

checkName

public void checkName(String name)
               throws InvalidNameException
Throws:
InvalidNameException

checkName

public void checkName(String name,
                      IResource res)
               throws InvalidNameException
Throws:
InvalidNameException

checkExtension

public void checkExtension(String name,
                           IResource resource)
                    throws WcmException
Throws:
WcmException

getDeniedExtensions

public String[] getDeniedExtensions()

setDeniedExtensions

public void setDeniedExtensions(String[] deniedExtensions)

isNoExtension

public boolean isNoExtension()

setNoExtension

public void setNoExtension(boolean noExtension)
Access Rights

This class can be accessed from:


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 2014 SAP AG Complete Copyright Notice