|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.services.util.Names
Utility classes needed to support consistent naming behavior.
| Field Summary | |
static int |
UNIX
UNIX operating system. |
static int |
UNKNOWN
Unknown operating system. |
static int |
WEBDAV
WebDAV |
static int |
WINDOWS
Windows operating system. |
static int |
ZOS_HFS
z/OS HFS operating system. |
static int |
ZOS_PDS
z/OS PDS operating system. |
| Method Summary | |
static String |
mapNameToFilesystem(String name,
int hostOS,
String prefix,
String suffix)
Map the object name to a file system path. |
static String |
mapNameToSASVariableName(String name,
Collection existingNames)
Map the parameter name to a valid SAS variable name. |
static String |
mapUrlToFilesystem(String url,
int hostOS,
String prefix,
String suffix)
Map the object SBIP URLto a file system path. |
static String |
trimName(String name)
Trim leading and trailing space and control characters. |
static boolean |
validateOMRObjectName(String name,
boolean throwException)
Test for a valid Metadata Repository object name. |
static boolean |
validateParameterName(String name,
boolean throwException)
Test for valid parameter name or parameter group name. |
static boolean |
validateSASVariableName(String name,
boolean throwException)
Test for valid SAS variable name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int UNKNOWN
public static final int WINDOWS
public static final int UNIX
public static final int ZOS_HFS
public static final int ZOS_PDS
public static final int WEBDAV
| Method Detail |
public static String mapNameToFilesystem(String name,
int hostOS,
String prefix,
String suffix)
throws IllegalArgumentException
name - The name to map to a file system path.hostOS - The host operating system. Valid values include
UNKNOWN,WINDOWS,UNIX,
ZOS_HFS,ZOS_PDSand WEBDAV.prefix - The prefix to use when creating the file system path.suffix - The suffix to use when creating the file system path.String The file system path.IllegalArgumentException - If a null name is
specified or if an invalid host operating system value is
specified.
public static String mapUrlToFilesystem(String url,
int hostOS,
String prefix,
String suffix)
throws IllegalArgumentException
url - The url to map to a file system path.hostOS - The host operating system. Valid values include
UNKNOWN,WINDOWS,UNIX,
ZOS_HFS,ZOS_PDSand WEBDAV.prefix - The prefix to use when creating the file system path.suffix - The suffix to use when creating the file system path.String The file system path.IllegalArgumentException - If an invalid SBIP URL is specified.
public static String mapNameToSASVariableName(String name,
Collection existingNames)
throws IllegalArgumentException
name - The name to map to a SAS variable name.existingNames - Is an optional collection containingg all
pre-existing parameters so that the method can avoid name
collisions. A value of null for this Collection would disable
any name collision checking.String the SAS variable name.IllegalArgumentException - If a null name is
specified.
public static boolean validateOMRObjectName(String name,
boolean throwException)
throws IllegalArgumentException
nullname - The name to validatethrowException - indicates whether to throw an exception if the
value is not valid.boolean is true if this is a valid
name; is false if the name contains an illegal
character or is too long.IllegalArgumentException - If the throwException parameter is
true and the name is invalid.
public static boolean validateParameterName(String name,
boolean throwException)
throws IllegalArgumentException
name - The name to validate.throwException - indicates whether to throw an exception if the
value is not valid.boolean is true if this is a valid
name; is false if the name contains an illegal
character or is too long.IllegalArgumentException - If the throwException parameter is
true and the name is invalid.
public static boolean validateSASVariableName(String name,
boolean throwException)
throws IllegalArgumentException
name - The SAS variable name to validate.throwException - indicates whether to throw an exception if the
value is not valid.boolean is true if this is a valid
name; is false if the name contains an illegal
character or is too long.IllegalArgumentException - If the throwException parameter is
code>true and the name is invalid.
public static String trimName(String name)
throws IllegalArgumentException
name - The name to trim.String The trimmed name.IllegalArgumentException - If a null name is
specified.
|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||