www.element4solution.com

e4s.application
Class E4Client

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.util.E4String
          extended by e4s.application.E4Client
All Implemented Interfaces:
java.lang.Comparable

public class E4Client
extends E4String

The client is part of the application object data, and it is used to distinct between different companies or solutions, building some kind of a "chineese wall" between data of different entities.

Since:
JDK 1.4
See Also:
E4User, E4DBTable._XML_ATTR_CLIENT, T_E4S_CLIENT_Sel, E4ApplObj_Intf.getClient()

Field Summary
static E4DBColumnInfo CI_CLIENT
           
static E4DBColumnType COLUMN_DATATYPE
           
static E4DBColumnInfo COLUMN_INFO
           
static int COLUMN_LEN
           
static E4DBColumnName COLUMN_NAME
           
static java.lang.String TEMPLATE
           
 
Fields inherited from class e4s.util.E4String
CLASSNAME, m_maxsize, m_nullable, m_string
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 java.lang.String getClient_URL()
          Complete URL address for client specific data.
 java.lang.String getClient()
          Get E4Client value as String.
static E4Client getInstance(java.lang.String client)
           
 java.lang.String getRootPathAbsolute()
          Get the root path as absolute path for the server.
 java.lang.String getRootPathRelative()
          Get the root path as relative path for the server.
 java.lang.String getScrambledDirectoryName()
          This is a combination of the client and optionally a random number to make access to client data within the scope of the httproot path more difficult.
 java.lang.String getTemporaryDirectoryAbs()
           
 java.lang.String getTemporaryDirectoryAbs(boolean visible_to_httproot)
          Get temporary directory for that client (absolute path) to be used for file I/O, either visible to the web server (Apache) or not.
 java.lang.String getTemporaryDirectoryRel()
          Get temporary directory for that client (relative path) to be used as URL.
 
Methods inherited from class e4s.util.E4String
_equals, charAt, clone, compareTo, compareTo, compareTo, compareToIgnoreCase, compareToIgnoreCase, concat, concat, concat, concat, concat, cut, cut, endsWith, endsWith, equals, equals, equalsIgnoreCase, equalsIgnoreCase, fixed, fixedRight, getMaxSize, getNullable, getString, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, left, left, length, matches, matchesIgnoreCase, regionMatches, regionMatches, regionMatches, regionMatches, remove, removeSpaces, removeSpaces, replace, replace, replace, replace, replace, replaceIgnoreCase, right, right, setMaxSize, setNullable, setString, startsWith, startsWith, startsWith, startsWith, substring, substring, toCharArray, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, trim, validate
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COLUMN_NAME

public static final E4DBColumnName COLUMN_NAME

COLUMN_LEN

public static final int COLUMN_LEN
See Also:
Constant Field Values

CI_CLIENT

public static final E4DBColumnInfo CI_CLIENT

TEMPLATE

public static final java.lang.String TEMPLATE
See Also:
Constant Field Values

COLUMN_DATATYPE

public static final E4DBColumnType COLUMN_DATATYPE

COLUMN_INFO

public static final E4DBColumnInfo COLUMN_INFO
Method Detail

getInstance

public static E4Client getInstance(java.lang.String client)

getClient

public java.lang.String getClient()
Get E4Client value as String.

Returns:
the value of E4Client

getClient_URL

public java.lang.String getClient_URL()
Complete URL address for client specific data.

Returns:
E4Settings.getDocBase() + RELATIVE_ROOT_PATH + getClient()
See Also:
getRootPathAbsolute(), getRootPathRelative()

getRootPathAbsolute

public java.lang.String getRootPathAbsolute()
Get the root path as absolute path for the server. e.g. "c:\httproot\e4s\application\client.random\"

See Also:
#getRootPath(boolean), getRootPathRelative()

getRootPathRelative

public java.lang.String getRootPathRelative()
Get the root path as relative path for the server. Same as getRootPath(false).

See Also:
#getRootPath(boolean), getRootPathAbsolute()

getScrambledDirectoryName

public java.lang.String getScrambledDirectoryName()
This is a combination of the client and optionally a random number to make access to client data within the scope of the httproot path more difficult. For example, if the client is "DEMO" then this function might either return a value like "DEMO" (un-scrambled) or "DEMO.xyz123" (scrambled). When a client does not exist, the scrambled part will be created (including a directory), if the client exists and a directory exists un-scrambled, then the client does not have any scramled items, if the directory exists scrambled then that value will be overtaken for the client object. The RELATIVE_ROOT_PATH is not part of this value.

Returns:
the client name or the client name, a point and a rundom number
See Also:
RELATIVE_ROOT_PATH

getTemporaryDirectoryAbs

public java.lang.String getTemporaryDirectoryAbs(boolean visible_to_httproot)
Get temporary directory for that client (absolute path) to be used for file I/O, either visible to the web server (Apache) or not. Uses caching, when the value is changed within the system settings this might require server restart.

Parameters:
visible_to_httproot - if true, uses a temporary directory that is within the scope of the httpserver, can be used for e.g. scaled images that must be transparent to the webserver. But this also indicates the risk, that someone knowing the exact url can access this data. if false, and if defined under E4Settings.getSysTempPath() a non visible directory will be used instead.
Returns:
if visible_to_httproot: a concatenation of getRootPathAbsolute() and "temp", if not: a concatenation of E4Settings.getSysTempPath() and "client" and E4String.getString().
See Also:
getRootPathAbsolute(), getTemporaryDirectoryRel(), E4Settings.getSysTempPath()

getTemporaryDirectoryAbs

public java.lang.String getTemporaryDirectoryAbs()

getTemporaryDirectoryRel

public java.lang.String getTemporaryDirectoryRel()
Get temporary directory for that client (relative path) to be used as URL.

Returns:
a concatenation of getRootPathRelative() and "temp".
See Also:
getRootPathRelative(), getTemporaryDirectoryAbs()

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com