se.entra.phantom.server.rconsole
Class AdminConfigResource

java.lang.Object
  extended by se.entra.phantom.server.VirtualPanelAdapter
      extended by se.entra.phantom.server.VirtualComponentAdapter
          extended by se.entra.phantom.server.rconsole.AdminConfigResource
All Implemented Interfaces:
VirtualComponentListener, VirtualPanelListener

public class AdminConfigResource
extends VirtualComponentAdapter

Handles a resource definition.


Field Summary
 
Fields inherited from interface se.entra.phantom.server.VirtualPanelListener
ICON_CRITICAL, ICON_INFORMATION, ICON_NOICON, ICON_QUERY, ICON_QUESTION, ICON_WARNING, MB_ABORTRETRYIGNORE, MB_CANCEL, MB_ENTER, MB_ENTERCANCEL, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL, MBID_CANCEL, MBID_DEFAULT, MBID_ENTER, MBID_IGNORE, MBID_NO, MBID_OK, MBID_RETRY, MBID_YES
 
Constructor Summary
AdminConfigResource(String[] data)
          Creates a resource from a string array from a list box.
AdminConfigResource(String[] data, Hashtable<String,AdminConfigProtection> protections)
          Creates a resource from a string array from a list box.
AdminConfigResource(String name, String data, Hashtable<String,AdminConfigProtection> protections)
          Creates a resource from a string in the INI file.
AdminConfigResource(VirtualPanel vp)
          Creates a resource from a panel.
 
Method Summary
static String checkOwnerSecurityGranted(AdminConfigResource owner, AdminConfigResource item)
          Checks two resources, an owner and a new item.
 boolean doesCGIExist()
          Checks if the CGI resource really is defined in server.ini.
 boolean doesFileResourceExist()
          Checks if the file resource really exists for a file resource (parsed or not).
 boolean doesResourceBelongToGroups()
          Checks if this resource has any active groups with users attached to it.
 String getClientCertificateAccessControlID()
          Checks if client certificate present on server is required for SSL or if a client certificate might be used for revocation.
 String getDescription()
          Gets the description.
 String getFileName()
          Gets the file name or class name.
 String getListBoxString()
          Gets the listbox string for this resource.
 String getName()
          Gets the name of the resource.
 String getRealm()
          Gets the realm string of this resource.
 String getRealmOrUnknown()
          Gets the realm string of this resource.
 AdminConfigSecureLogin getSecureLoginProfile()
          Gets the secure login profile instance for this access control.
 AdminConfigUser getUserDefinition(String userID)
          Gets a user configuration definition defined as member of a group for this resource.
 boolean hasProtection(String noAccess)
          Checks if the resource belongs to at least one group.
 boolean isAppletRedirectionEnabled()
          Checks if applet redirection is enabled.
 boolean isAuthenticationRequired()
          Checks if authentication is required.
 boolean isBasicAllowed()
          Checks if Basic authentication is allowed.
 boolean isCGIResource()
          Checks if this is a CGI resource.
 boolean isClientCertificateRequired()
          Checks if client certificate is required for SSL.
 boolean isDirectory()
          Checks if it is a file resource and a directory reference.
 boolean isDocumentRootReference()
          Checks if this is a reference to the root directory.
 boolean isDocumentUnparsed()
          Checks if the resource is an unparsed file system type.
 boolean isDomainAddressAllowed(SocketNameInterface sni)
          Checks if a connection is allowed or denied depending on the domain specification.
 boolean isFile()
          Checks if it is a file resource and a file reference (parsed, application or normal).
 boolean isFileNameEmpty()
          Checks if the file name is empty and this is a file resource (parsed or not).
 boolean isFileResource()
          Checks if it is a file resource (parsed or not).
 boolean isLoadBalanced()
          Checks if the resource is load balanced.
 boolean isLoadBalancedOnConcurrentUsers()
          Checks if this resource is based on Application (concurrent user count).
 boolean isNetPhantomApplicationResource()
          Checks if this is a NetPhantom Application resource.
 boolean isRedirectionResource()
          Checks if it's a redirection.
 boolean isRemoteApplicationResource()
          Checks if this is a Remote Application resource (RAPP).
 boolean isSSLRequired()
          Checks if SSL is required.
 boolean isStrongEncryptionRequired()
          Checks if strong SSL encryption is required.
 boolean isWEBResource()
          Checks if this is a WEB Application resource.
static void performListSelectionChange(VirtualPanel vp, VirtualCListBox list, int line, boolean hasSelection)
          Performs a list selection change in the resource definition panel.
 void setItem(IniFile ini)
          Sets the item in the ini file.
 
Methods inherited from class se.entra.phantom.server.VirtualComponentAdapter
onAction, onAction, onAction, onCheckedChange, onContentChanged, onContentChanged, onControlEvent, onFocusGained, onFocusLost, onMenuAction, onPropertyChange, onSelectionChanged
 
Methods inherited from class se.entra.phantom.server.VirtualPanelAdapter
onModalPanelCreate, onModalPanelProcessing, onPageActivated, onPanelClose, onPanelClosing, onPanelCreate, onPanelDestroy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface se.entra.phantom.server.VirtualPanelListener
onPageActivated, onPanelClose, onPanelClosing, onPanelCreate, onPanelDestroy
 

Constructor Detail

AdminConfigResource

public AdminConfigResource(VirtualPanel vp)
Creates a resource from a panel.


AdminConfigResource

public AdminConfigResource(String[] data)
                    throws IOException
Creates a resource from a string array from a list box.

Throws:
IOException - when the data doesn't have the correct format.

AdminConfigResource

public AdminConfigResource(String[] data,
                           Hashtable<String,AdminConfigProtection> protections)
                    throws IOException
Creates a resource from a string array from a list box.

Throws:
IOException - when the data doesn't have the correct format.

AdminConfigResource

public AdminConfigResource(String name,
                           String data,
                           Hashtable<String,AdminConfigProtection> protections)
                    throws IOException
Creates a resource from a string in the INI file.

Throws:
IOException - when the data doesn't have the correct format.
Method Detail

checkOwnerSecurityGranted

public static String checkOwnerSecurityGranted(AdminConfigResource owner,
                                               AdminConfigResource item)
Checks two resources, an owner and a new item. The new item must have the same or less security requirements imposed on it.

Returns:
null for OK, otherwise an error string.

performListSelectionChange

public static void performListSelectionChange(VirtualPanel vp,
                                              VirtualCListBox list,
                                              int line,
                                              boolean hasSelection)
Performs a list selection change in the resource definition panel.


isFileResource

public boolean isFileResource()
Checks if it is a file resource (parsed or not).


isLoadBalancedOnConcurrentUsers

public boolean isLoadBalancedOnConcurrentUsers()
Checks if this resource is based on Application (concurrent user count). The opposite, i.e. the normal way would be to use the web server queued event count.


isDocumentUnparsed

public boolean isDocumentUnparsed()
Checks if the resource is an unparsed file system type.


isNetPhantomApplicationResource

public boolean isNetPhantomApplicationResource()
Checks if this is a NetPhantom Application resource.


isCGIResource

public boolean isCGIResource()
Checks if this is a CGI resource.


isWEBResource

public boolean isWEBResource()
Checks if this is a WEB Application resource.


isRemoteApplicationResource

public boolean isRemoteApplicationResource()
Checks if this is a Remote Application resource (RAPP).


isRedirectionResource

public boolean isRedirectionResource()
Checks if it's a redirection.


doesCGIExist

public boolean doesCGIExist()
Checks if the CGI resource really is defined in server.ini. If not a CGI resource, the return code is always true.


getName

public String getName()
Gets the name of the resource.


doesFileResourceExist

public boolean doesFileResourceExist()
Checks if the file resource really exists for a file resource (parsed or not). If not a file resource, the return code is always true.


isFileNameEmpty

public boolean isFileNameEmpty()
Checks if the file name is empty and this is a file resource (parsed or not).

Returns:
true if the file name is empty and this is a file system resource.

getFileName

public String getFileName()
Gets the file name or class name.


isFile

public boolean isFile()
Checks if it is a file resource and a file reference (parsed, application or normal).

Returns:
false if not a file resource or it's not a file.

isDirectory

public boolean isDirectory()
Checks if it is a file resource and a directory reference.

Returns:
false if not a file resource or it's not a directory.

isDocumentRootReference

public boolean isDocumentRootReference()
Checks if this is a reference to the root directory.

Returns:
false if the resource is not file system or if it's not "/" as file name.

getSecureLoginProfile

public AdminConfigSecureLogin getSecureLoginProfile()
                                             throws Exception
Gets the secure login profile instance for this access control.

Returns:
null if none is defined.
Throws:
Exception - if the secure login profile cannot be found.

isSSLRequired

public boolean isSSLRequired()
Checks if SSL is required.


isStrongEncryptionRequired

public boolean isStrongEncryptionRequired()
Checks if strong SSL encryption is required.


isAuthenticationRequired

public boolean isAuthenticationRequired()
Checks if authentication is required.


isBasicAllowed

public boolean isBasicAllowed()
Checks if Basic authentication is allowed.


hasProtection

public boolean hasProtection(String noAccess)
Checks if the resource belongs to at least one group.


doesResourceBelongToGroups

public boolean doesResourceBelongToGroups()
Checks if this resource has any active groups with users attached to it.


getDescription

public String getDescription()
Gets the description.


isLoadBalanced

public boolean isLoadBalanced()
Checks if the resource is load balanced.


isAppletRedirectionEnabled

public boolean isAppletRedirectionEnabled()
Checks if applet redirection is enabled.


getUserDefinition

public AdminConfigUser getUserDefinition(String userID)
Gets a user configuration definition defined as member of a group for this resource. The group must be active in order to be returned, but not the user.

Returns:
null if not found.

getListBoxString

public String getListBoxString()
Gets the listbox string for this resource.


getRealm

public String getRealm()
Gets the realm string of this resource. This is used for WWW-authentication.


getRealmOrUnknown

public String getRealmOrUnknown()
Gets the realm string of this resource. This is used for WWW-authentication. The string is never empty, in this case "unknown" is returned.


isDomainAddressAllowed

public boolean isDomainAddressAllowed(SocketNameInterface sni)
Checks if a connection is allowed or denied depending on the domain specification.


isClientCertificateRequired

public boolean isClientCertificateRequired()
Checks if client certificate is required for SSL.


getClientCertificateAccessControlID

public String getClientCertificateAccessControlID()
Checks if client certificate present on server is required for SSL or if a client certificate might be used for revocation.

Returns:
null if not required, otherwise the access control name.

setItem

public void setItem(IniFile ini)
Sets the item in the ini file.



Phantom® and NetPhantom® are registered trademarks of Codectica Systems SARL.
© Copyright Codectica Systems SARL, 2008. All rights reserved.