com.ontimize.locator
Class PermissionSecureReferenceLocator
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.ontimize.locator.SecureReferenceLocator
com.ontimize.locator.PermissionSecureReferenceLocator
- All Implemented Interfaces:
- ClientPermissionManager, ConnectionOptimizer, EntityReferenceLocator, INoticeSendMails, INoticeSystem, java.rmi.Remote, RemoteApplicationPreferenceReferencer, com.ontimize.ols.RemoteLControl, com.ontimize.ols.RemoteLControlAdministration, com.ontimize.ols.RemoteLOk, RemotelyManageable, RemoteReportReferencer, SecureEntityReferenceLocator, java.io.Serializable, ServerPermissionManager, ServerReferenceLocator, UtilReferenceLocator, XMLClientProvider, XMLFormProvider
- Direct Known Subclasses:
- DelegationSecurePermissionSecureReferenceLocator
- public class PermissionSecureReferenceLocator
- extends SecureReferenceLocator
- implements ClientPermissionManager, ServerPermissionManager, com.ontimize.ols.RemoteLControl
- See Also:
- Serialized Form
| Fields inherited from class com.ontimize.locator.SecureReferenceLocator |
ADMIN_PASSWORD, ADMIN_USER, ALLOW_CERTIFICATE_LOGIN, attachmentEntity, attachmentPath, baseLogFileName, buffWriterLog, CA_CERTIFICATES_PROP, CHECK_SESSIONS_TIME, checkSessionsTime, CLASS_ELEMENT, clientWatchUserList, CLOSE_WAIT_TIME, closedServer, compressionEnabled, compressionThresholds, CRL_CERTIFICATES_PROP, currentUserList, databaseEntityManager, defaultNoticeDestinyEntityClass, defaultNoticeEntityClass, domain, DOMAIN, encrypt, entitiesClass, fileLogExtension, fileWriterLog, FORM_MANAGER_PROVIDER_ENTITY, FORM_MANAGER_PROVIDER_ENTITY_FORM_NAME_COLUMN, FORM_MANAGER_PROVIDER_ENTITY_ID_COLUMN, FORM_MANAGER_PROVIDER_ENTITY_INTERACTION_MANAGER_COLUMN, FORM_PROVIDER_ENTITY, FORM_PROVIDER_ENTITY_FORMNAME_COLUMN, FORM_PROVIDER_ENTITY_FORMXML_COLUMN, formManagerProviderEntity, formManagerProviderEntityFormNameColumn, formManagerProviderEntityIdColumn, formManagerProviderEntityInteractionManagerColumn, formProviderEntity, formProviderEntityFormNameColumn, formProviderEntityFormXMLColumn, ID_CARD_COLUMN, idCardColumn, idHostList, isZipLogFile, JAAS_CONFIG_FILE, jaasconfigfile, kdc, KDC, krealm, KREALM, lastSessionAccessTimeList, lcms, LDAP_HOST, LDAP_PORT, LDAP_SSL, LDAP_USERDN_KEY, ldaphost, ldapport, ldapSSL, loadedEntities, LOG_BUFFER_SIZE, LOG_FILE, logBuffer, logBufferSize, logFile, LOGIN_ENTITY, loginEntity, logSessionEvents, logStreamErr, logStreamOut, manager, MAX_INACTIVE_SESSION_TIME, MAX_LOG_FILE_SIZE, maximumLogFileSize, maximumSessionTime, maximumUsers, MAXUSERS, MENU_PROVIDER_ENTITY, MENU_PROVIDER_ENTITY_XML_COLUMN, menuProviderEntity, menuProviderEntityXMLColumn, messagesBuffer, MIN_COMPRESSION_THRESHOLD, MISSING_PARAMETER, MULTICONNECTION_MANAGER, multiConnectionManager, multiConnectionManagerPath, NAME_ELEMENT, NOTICE_ENTITY_DESTINY_NAME, NOTICE_ENTITY_NAME, noticeEntity, noticesPath, noticeSystem, oneSessionAllowed, PACKAGE, packageS, PARAM_ELEMENT, pathProperties, port, PREFERENCE_CLASS, PRINTING_TEMPLATE_ENTITY, printingTemplatesEntity, PRIVATE_REPORT_STORE, privilegedId, propertiesEntities, REMOTE_OPERATION_MANAGER, REMOTE_PREFERENCES_CONFIGURATION_FILE, REMOTE_REFERENCE_ELEMENT, REMOTE_REFERENCES, REMOTE_REFERENCES_ELEMENT, remoteReferenceClassNames, remoteReferenceInstances, remoteReferenceParameters, remoteStoreList, REPORT_STORE, REPORT_STORE_PATH, reportEntities, RESTART_COMMAND, rOperationManager, rPrefs, SEARCH_USER, SEARCH_USER_PASSWORD, SEARCH_USER_STRING, searchUser, searchUserPassword, searchUserString, sendMailThread, serverTimeZone, startSessionTimeList, testRE, updateListThread, USE_APPLICATION_USER, useApplicationUser, USER_DNS_STRING, userDNString, userIdList, userInfoListModel, VALUE_ELEMENT, watchDog, xmlDynamicMenu, ZIP_LOG_FILE |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Fields inherited from interface com.ontimize.util.notice.INoticeSystem |
INTERNAL_NOTICE_PERIOD, MAIL_CONF_PROPERTIES, NOTICE_CONTENT, NOTICE_CREATE_DATE, NOTICE_DELETE_RECEIVE_NOTICE, NOTICE_DELETE_SEND_NOTICE, NOTICE_DESTINY_KEY, NOTICE_ENTITY_DESTINY_TABLE_DB, NOTICE_ENTITY_TABLE_DB, NOTICE_FORCE_READ, NOTICE_FROM_PARAMETER, NOTICE_KEY, NOTICE_MAILTO_PARAMETER, NOTICE_MESSAGE_COLUMN_NAME, NOTICE_MESSAGE_TYPE_COLUMN_NAME, NOTICE_OTHER_COLUMNS, NOTICE_READ, NOTICE_READ_DATE, NOTICE_RESPONSE_REQUEST, NOTICE_SEND, NOTICE_SEND_DATE, NOTICE_SEND_MAIL, NOTICE_SUBJECT, NOTICE_SYSTEM, NOTICE_TO_PARAMETER, PROP_NOTICE_CLASS_MAIL, PROP_NOTICE_CONFIG_DEFAULT_TEMPLATE, PROP_NOTICE_CONFIG_MAIL, PROP_NOTICE_CONFIG_REQUEST_TEMPLATE, PROP_NOTICE_CONFIG_TEMPLATES, PROP_NOTICE_ENTITY_DESTINY_NAME, PROP_NOTICE_ENTITY_NAME, SEND_MAIL_PERIOD |
|
Constructor Summary |
PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p)
|
PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p,
boolean su)
|
PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p,
boolean su,
java.lang.String loginEntity)
|
PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p,
boolean su,
java.lang.String loginEntity,
java.lang.String permissionEntity,
java.lang.String clientPermissionColumn,
java.lang.String serverPermissionColumn,
java.util.Vector entityNames)
|
PermissionSecureReferenceLocator(int port,
java.util.Hashtable parameters)
Calls to super() to initialize some parameters and additionally checks
permission and profile parameters.
|
|
Method Summary |
boolean |
checkActionPermission(java.lang.String entity,
java.lang.String action,
int sessionId,
long time)
Checks if the specified user has permissions to execute an action in the
specified entity |
void |
endSession(int sessionId)
This method finishes a client session. |
java.lang.String |
getBussinesCalendarFile()
|
EntityResult |
getClientPermissions(java.util.Hashtable userKeys,
int userId)
Gets an object representing client permissions. |
java.lang.String |
getClientPermissionsColumn()
|
EntityResult |
getEntityList(int sessionId)
|
java.util.Hashtable |
getParameters(int sessionId)
|
PermissionGroupInfo[] |
getPermissionGroupsInfo()
|
PermissionInfo |
getPermissionInfo(java.lang.String entity,
java.lang.String action,
int sessionId)
|
java.lang.String |
getProfileColumn()
|
java.lang.String |
getProfileEntity()
|
protected java.lang.StringBuffer |
getServerPermissions(java.util.Hashtable userKeys)
|
EntityResult |
getServerPermissions(java.util.Hashtable userKeys,
int sessionId)
Get the user permissions |
java.lang.String |
getServerPermissionsColumn()
|
long |
getTime()
|
protected java.lang.StringBuffer |
getUserProfileServerPermissions(java.util.Hashtable profileKeys)
|
EntityResult |
getUserProfileServerPermissions(java.util.Hashtable profileKeys,
int sessionId)
Get the permission definition for a specified profile |
void |
installClientPermissions(java.util.Hashtable userKeys,
int sessionId)
Sets the client permissions. |
protected void |
installServerPermissions(int sessionId,
java.lang.StringBuffer permissions)
|
protected void |
installServerSecurityManager()
|
protected java.util.Hashtable |
joinClientPermissions(java.util.List permissions)
|
protected java.util.Hashtable |
joinServerPermissions(java.util.List permissions)
|
protected EntityResult |
queryGroupPermission(java.util.Hashtable userKeys,
java.lang.String columnName)
|
InitialContext |
retrieveInitialContext(int sessionId,
java.util.Hashtable params)
|
EntityResult |
setServerPermissions(java.util.Hashtable keys,
int sessionId,
java.util.Hashtable permissions)
|
EntityResult |
setServerPermissions(java.util.Hashtable keys,
int sessionId,
java.lang.StringBuffer permissions)
Sets the server permissions value |
EntityResult |
setUserProfileServerPermissions(java.util.Hashtable profileKeys,
java.lang.StringBuffer permissions,
int sessionId)
|
int |
startSession(java.lang.String user,
java.lang.String password,
ClientWatch cw)
Method to start a client session. |
protected int |
startTemporalAdminitrationSession(java.lang.String user,
java.lang.String password)
|
java.util.Hashtable |
updateL(java.util.Hashtable h,
int sessionId)
|
| Methods inherited from class com.ontimize.locator.SecureReferenceLocator |
addRemoteReportStore, checkLogFileChange, checkNoticeAsSend, checkNoticeSent, checkToken, closeLockedConnections, closeServer, closeServer, closeSession, closeSession, configureConnectionManager, configureMultiConnectionManager, configureRemoteReference, configureRemoteReferences, createConnectionManager, createDatabaseEntityManager, createRemoteReference, endAdministrationSession, finishAdministrationRemoteSession, flushLogBuffer, forceFinishSession, freeServerResources, generatePrivilegedId, getAttachmentEntity, getCertificateFromText, getConnectedSessionIds, getConnectedUsers, getConnectionInfo, getConnectionManager, getDataCompressionThreshold, getDEBUGValueRemote, getDefaultPackage, getEntity, getEntity, getEntityReference, getEntityReference, getEntityReferenceFromServer, getFormManagerParameters, getInternalNotices, getLastNCharactersFromLogFile, getLContent, getLInfoObject, getLoadedEntities, getLoadedEntities, getLogFile, getLoginEntityName, getLValue, getMessages, getNewMailNotice, getNextLogFileIndex, getNodeValue, getNoticeEntity, getNoticeEntityDestinyName, getNoticeEntityName, getNoticeTypes, getParameters, getPasswordFromCert, getPasswordFromCert, getPrintingTemplateEntity, getRemoteApplicationPreferences, getRemoteOperationManager, getRemotePreferencesFile, getRemoteReference, getRemoteReference, getRemoteReportStore, getReportEntityNames, getSentNotices, getSerial, getServerTimeZone, getSessionId, getSessionInfo, getSpecialEntity, getStartSessionTime, getSystemInfo, getToken, getUser, getUserFromCert, getUserFromCert, getUserId, getUserIds, getUserInfoListModel, getXMLForm, getXMLMenu, hasSession, hasSession, isAllowCertificateLogin, isDevelopementL, isLDAPUser, isMultiConnectionManager, isValidCertificateText, loadEntity, localAuthenticate, ok, ok, ok, ping, reloadXMLMenu, removeEntity, removeEntity, removeEntity, removeReceivedNotices, removeSentNotices, restartServer, sendMessage, sendMessage, sendMessageToAll, sendNotice, setCompressionEnabled, setDataCompressionThreshold, setDEBUGValueRemote, setMultiConnectionManager, setNoticesRead, setRemotePreferencesFile, setSessionIdLastAccessTime, startAdministrationRemoteSession, startCertificateSession, startSessionInner, stopServer, testConnectionSpeed, updateL, updateListInfo, zipLogFile |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PERMISSION_GROUP_DEFINITION
public static final java.lang.String PERMISSION_GROUP_DEFINITION
- See Also:
- Constant Field Values
permissionEntity
protected java.lang.String permissionEntity
profileEntity
protected java.lang.String profileEntity
clientPermissionsColumn
protected java.lang.String clientPermissionsColumn
serverPermissionsColumn
protected java.lang.String serverPermissionsColumn
userGroupsEntityName
protected java.lang.String userGroupsEntityName
permissionGroupKeyColumnName
protected java.lang.String permissionGroupKeyColumnName
profileColumn
protected java.lang.String profileColumn
entityNames
protected java.util.Vector entityNames
licensePermission
protected java.lang.String licensePermission
serverSecurityManagerClass
protected java.lang.String serverSecurityManagerClass
businessCalendarFile
protected java.lang.String businessCalendarFile
locale
protected java.util.Locale locale
definitionPermissionsGroupsFile
protected java.lang.String definitionPermissionsGroupsFile
PermissionSecureReferenceLocator
public PermissionSecureReferenceLocator(int port,
java.util.Hashtable parameters)
throws java.lang.Exception
- Calls to super() to initialize some parameters and additionally checks
permission and profile parameters.
- Parameters:
port - the portparameters - the Hashtable with parameters
| attribute |
values |
default |
required |
meaning |
| PermissionEntity |
|
User |
yes |
Permission entity name
|
| ProfileEntity |
|
UserProfile |
no |
Profile entity name |
| ProfileColumn |
|
Profile |
no |
User profile column name. Usually this is a common column
between user entity and profile entity. |
| ClientPermissionColumn |
|
ClientPermission |
yes |
Name of the column which stores the xml with client
permission description |
| ServerPermissionColumn |
|
ServerPermission |
yes |
Name of the column which stores the xml with the server
permission description |
| PermissionGroupDefinition |
|
|
no |
Name of the file for defines the permission groups. |
| ServerSecurityManagerClass |
|
|
no |
Complete name of the ServerSecurityManager class.
This class must extends ServerSecurityManager and must
have an empty constructor. |
| BusinessCalendarFile |
|
|
no |
File name for the business calendar, the file format is the
same as bundles, for example: com.ontimize.filename. |
- Throws:
java.lang.Exception - when Exception occurs
PermissionSecureReferenceLocator
public PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p,
boolean su,
java.lang.String loginEntity,
java.lang.String permissionEntity,
java.lang.String clientPermissionColumn,
java.lang.String serverPermissionColumn,
java.util.Vector entityNames)
throws java.lang.Exception
PermissionSecureReferenceLocator
public PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p)
throws java.lang.Exception
PermissionSecureReferenceLocator
public PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p,
boolean su)
throws java.lang.Exception
PermissionSecureReferenceLocator
public PermissionSecureReferenceLocator(DatabaseConnectionManager dbManager,
java.lang.String pe,
int p,
boolean su,
java.lang.String loginEntity)
throws java.lang.Exception
startSession
public int startSession(java.lang.String user,
java.lang.String password,
ClientWatch cw)
throws java.lang.Exception
- Description copied from interface:
EntityReferenceLocator
- Method to start a client session. Entity reference locator returns an
integer value that must be used in all entity requests.
- Specified by:
startSession in interface EntityReferenceLocator- Overrides:
startSession in class SecureReferenceLocator
- Throws:
java.lang.Exception
getClientPermissions
public EntityResult getClientPermissions(java.util.Hashtable userKeys,
int userId)
throws java.lang.Exception
- Description copied from interface:
ClientPermissionManager
- Gets an object representing client permissions.
- Specified by:
getClientPermissions in interface ClientPermissionManager
- Parameters:
userKeys - This parameters allow to identify the user. In local locator is
not needed and can be a null value.userId -
- Returns:
-
- Throws:
java.lang.Exception
installClientPermissions
public void installClientPermissions(java.util.Hashtable userKeys,
int sessionId)
throws java.lang.Exception
- Description copied from interface:
ClientPermissionManager
- Sets the client permissions. Creates a
ClientSecurityManager
object with all permissions information for the specified user.
- Specified by:
installClientPermissions in interface ClientPermissionManager
- Parameters:
userKeys - Keys to identify the usersessionId - User session identifier
- Throws:
java.lang.Exception
endSession
public void endSession(int sessionId)
throws java.lang.Exception
- Description copied from interface:
EntityReferenceLocator
- This method finishes a client session. When this method is called, the
entity reference locator does not provide more entity references to this
client identifier.
- Specified by:
endSession in interface EntityReferenceLocator- Overrides:
endSession in class SecureReferenceLocator
- Throws:
java.lang.Exception
getEntityList
public EntityResult getEntityList(int sessionId)
throws java.lang.Exception
- Specified by:
getEntityList in interface ServerPermissionManager
- Throws:
java.lang.Exception
getProfileColumn
public java.lang.String getProfileColumn()
getProfileEntity
public java.lang.String getProfileEntity()
getClientPermissionsColumn
public java.lang.String getClientPermissionsColumn()
getServerPermissionsColumn
public java.lang.String getServerPermissionsColumn()
queryGroupPermission
protected EntityResult queryGroupPermission(java.util.Hashtable userKeys,
java.lang.String columnName)
throws java.lang.Exception
- Throws:
java.lang.Exception
setServerPermissions
public EntityResult setServerPermissions(java.util.Hashtable keys,
int sessionId,
java.util.Hashtable permissions)
throws java.lang.Exception
- Throws:
java.lang.Exception
setServerPermissions
public EntityResult setServerPermissions(java.util.Hashtable keys,
int sessionId,
java.lang.StringBuffer permissions)
throws java.lang.Exception
- Description copied from interface:
ServerPermissionManager
- Sets the server permissions value
- Specified by:
setServerPermissions in interface ServerPermissionManager
- Parameters:
keys - Keys to identify the usersessionId - User session identifierpermissions - XML value to describes the server permissions
- Returns:
-
- Throws:
java.lang.Exception
getServerPermissions
public EntityResult getServerPermissions(java.util.Hashtable userKeys,
int sessionId)
throws java.lang.Exception
- Description copied from interface:
ServerPermissionManager
- Get the user permissions
- Specified by:
getServerPermissions in interface ServerPermissionManager
- Parameters:
userKeys - Keys to identify the usersessionId - User session identifier
- Returns:
-
- Throws:
java.lang.Exception
getServerPermissions
protected java.lang.StringBuffer getServerPermissions(java.util.Hashtable userKeys)
joinServerPermissions
protected java.util.Hashtable joinServerPermissions(java.util.List permissions)
throws java.lang.Exception
- Throws:
java.lang.Exception
joinClientPermissions
protected java.util.Hashtable joinClientPermissions(java.util.List permissions)
throws java.lang.Exception
- Throws:
java.lang.Exception
installServerSecurityManager
protected void installServerSecurityManager()
installServerPermissions
protected void installServerPermissions(int sessionId,
java.lang.StringBuffer permissions)
throws java.lang.Exception
- Throws:
java.lang.Exception
setUserProfileServerPermissions
public EntityResult setUserProfileServerPermissions(java.util.Hashtable profileKeys,
java.lang.StringBuffer permissions,
int sessionId)
- Specified by:
setUserProfileServerPermissions in interface ServerPermissionManager
getUserProfileServerPermissions
public EntityResult getUserProfileServerPermissions(java.util.Hashtable profileKeys,
int sessionId)
throws java.lang.Exception
- Description copied from interface:
ServerPermissionManager
- Get the permission definition for a specified profile
- Specified by:
getUserProfileServerPermissions in interface ServerPermissionManager
- Parameters:
profileKeys - Keys to identify a profilesessionId - User session identifier
- Returns:
-
- Throws:
java.lang.Exception
getUserProfileServerPermissions
protected java.lang.StringBuffer getUserProfileServerPermissions(java.util.Hashtable profileKeys)
getTime
public long getTime()
throws java.lang.Exception
- Specified by:
getTime in interface ClientPermissionManager
- Throws:
java.lang.Exception
checkActionPermission
public boolean checkActionPermission(java.lang.String entity,
java.lang.String action,
int sessionId,
long time)
throws java.lang.Exception
- Description copied from interface:
ServerPermissionManager
- Checks if the specified user has permissions to execute an action in the
specified entity
- Specified by:
checkActionPermission in interface ServerPermissionManager
- Parameters:
entity - Entity nameaction - Action to checksessionId - User session identifiertime -
- Returns:
-
- Throws:
java.lang.Exception
getPermissionGroupsInfo
public PermissionGroupInfo[] getPermissionGroupsInfo()
throws java.lang.Exception
- Specified by:
getPermissionGroupsInfo in interface ServerPermissionManager
- Throws:
java.lang.Exception
getBussinesCalendarFile
public java.lang.String getBussinesCalendarFile()
getPermissionInfo
public PermissionInfo getPermissionInfo(java.lang.String entity,
java.lang.String action,
int sessionId)
throws java.lang.Exception
- Specified by:
getPermissionInfo in interface ServerPermissionManager
- Throws:
java.lang.Exception
getParameters
public java.util.Hashtable getParameters(int sessionId)
throws java.lang.Exception
- Specified by:
getParameters in interface com.ontimize.ols.RemoteLControl
- Throws:
java.lang.Exception
updateL
public java.util.Hashtable updateL(java.util.Hashtable h,
int sessionId)
throws java.lang.Exception
- Specified by:
updateL in interface com.ontimize.ols.RemoteLControl
- Throws:
java.lang.Exception
startTemporalAdminitrationSession
protected int startTemporalAdminitrationSession(java.lang.String user,
java.lang.String password)
throws java.lang.Exception
- Overrides:
startTemporalAdminitrationSession in class SecureReferenceLocator
- Throws:
java.lang.Exception
retrieveInitialContext
public InitialContext retrieveInitialContext(int sessionId,
java.util.Hashtable params)
throws java.lang.Exception
- Specified by:
retrieveInitialContext in interface UtilReferenceLocator- Overrides:
retrieveInitialContext in class SecureReferenceLocator
- Throws:
java.lang.Exception