public class NoticeEntity extends DefaultTableEntity implements INoticeEntity
TableEntity.AttachmentReceiving, TableEntity.FileInfo, TableEntity.FileInfoList, TableEntity.Receiving| Modifier and Type | Field and Description |
|---|---|
protected String |
entityDestinyName |
static String |
INTERNAL_NOTICE_PERIOD |
static String |
MAIL_CONF_PROPERTIES |
static String |
NOTICE_CONTENT
Notice entity column name which specifies the notice content
|
static String |
NOTICE_CREATE_DATE
Notice entity column name that specifies the notice generation date
|
static String |
NOTICE_DELETE_RECEIVE_NOTICE
This column sets the received notice as deleted
|
static String |
NOTICE_DELETE_SEND_NOTICE
This column sets the sent notices as deleted
|
static String |
NOTICE_DESTINY_KEY
Key name of the notice destiny entity.
|
static String |
NOTICE_ENTITY_DESTINY_TABLE_DB |
static String |
NOTICE_ENTITY_TABLE_DB |
static String |
NOTICE_FORCE_READ
Notice entity column name which indicates if this is a mandatory read
notice
|
static String |
NOTICE_FROM_PARAMETER
Column name of the notices entity where is stored the name of the user
that generates the notice
|
static String |
NOTICE_KEY
Notice entity key
|
static String |
NOTICE_MAILTO_PARAMETER
Destiny entity column name which the mail addresses the notices are send
to are stored in
|
static String |
NOTICE_MESSAGE_COLUMN_NAME |
static String |
NOTICE_MESSAGE_TYPE_COLUMN_NAME |
static String |
NOTICE_OTHER_COLUMNS |
static String |
NOTICE_READ
Destiny entity column name which indicates if this notice has been read
(this column is only used for internal notices)
|
static String |
NOTICE_READ_DATE
Destiny entity column name which indicates the notice read date
|
static String |
NOTICE_RESPONSE_REQUEST
Notices entity column name which indicates if this notice requests
confirmation (0 = without response request)
|
static String |
NOTICE_SEND
Destiny entity column name which indicates if this notice has been sent,
when notice is internal notice this columns indicates if destiny user has
queried the notice.
|
static String |
NOTICE_SEND_DATE
Destiny entity column name which specifies the notice sent date
|
static String |
NOTICE_SEND_MAIL
Destiny entity column name which indicates if this notice must be send in
a email (0 = internal notice, 1= email notice)
|
static String |
NOTICE_SUBJECT
Notice entity column name which specifies se notice subject
|
static String |
NOTICE_SYSTEM
Parameter that must exists in the reference locator (local and remote) to
allow that all notices threads start.
|
static String |
NOTICE_TO_PARAMETER
Column name of the destiny entity where user name is stored
|
static String |
PROP_NOTICE_CLASS_MAIL |
static String |
PROP_NOTICE_CONFIG_DEFAULT_TEMPLATE |
static String |
PROP_NOTICE_CONFIG_MAIL |
static String |
PROP_NOTICE_CONFIG_REQUEST_TEMPLATE |
static String |
PROP_NOTICE_CONFIG_TEMPLATES |
static String |
PROP_NOTICE_ENTITY_DESTINY_NAME |
static String |
PROP_NOTICE_ENTITY_NAME |
static String |
SEND_MAIL_PERIOD |
propsalias, aliasPropertiesParser, aliasReverse, ASTERISK, ATTACHMENT_FILE_DESCRIPTION_COLUMN, ATTACHMENT_FILE_NAME_COLUMN, ATTACHMENT_FILE_NAME_KEYS, ATTACHMENT_FILE_ORIGINAL_NAME_COLUMN, ATTACHMENT_FILE_ORIGINAL_PATH_COLUMN, ATTACHMENT_FILE_PATH, ATTACHMENT_FILE_SIZE_COLUMN, ATTACHMENT_SEPARATOR, ATTACHMENT_TABLE, attachmentFileNameColumn, attachmentFileNameKeys, attachmentFilePath, attachmentFileSizeColumn, attachTable, auditorLog, AUTOCONFIGURATION, AUTONUMERICAL, autonumericalColumn, calendar, checkOperationResult, columnNames, COLUMNS, connectionRequestTime, COUNT_COLUMNS, countColumns, dataChangeListeners, dBLocalErrorMessage, defaultEntityScriptManagerClassName, DELETE_ACTION, DELETE_KEYS, deleteKeys, descendantColumnsOrder, descriptionAttachmentFileColumn, enableScripting, entitiesPropertiesParser, entitiesTableAttribute, entityName, entityScripting, FETCH_SIZE, fetchSize, FILE_COLUMNS, fileInfoList, FORCE_DISTINCT, forceDistinct, GENERATED_KEY, generatedKeyList, hOtherLocaleTablesColumns, hOtherLocaleTablesKey, INSERT_ACTION, INSERT_AUTOMATICLY_ATTACHMENT, INSERT_COLUMNS, INSERT_KEYS, insertAttachmentAutomatically, insertColumn, insertKeys, INTERROG, keys, KEYS, LIMIT_QUERY_OTHERS_ENTITIES, limitQueryOthersEntities, LOCALE_COLUMNS, LOCALE_TABLE, localeTable, locator, LOG_KEYS, logDelete, logInsert, logkeys, logQuery, logUpdate, M_ERROR_OPERATION, M_IT_HAS_NOT_CHANGED_ANY_RECORD, M_LICENSE_PERMISSION_ERROR, M_TEMPORALY_RESTRICTED_BY_PERMISSION_ACTION, M_YOU_DO_NOT_HAVE_PERMISSION_TO_EXECUTE_ACTION, manager, maxConnectionWaitTime, oneToOneMode, orderColumns, originalAttachmentFileNameColumn, originalAttachmentFilePathColumn, OTHER_ENTITIES, OTHER_LOCALE_TABLES, OTHER_LOCALE_TABLES_COLUMNS, OTHER_LOCALE_TABLES_KEY, othersEntities, PERCENT, PRINCIPAL_COLUMNS, PRINCIPAL_KEYS, PRINCIPAL_TABLE, principalColumnNames, principalKeyName, principalTable, privilegedId, properties, propertiesPath, QUERY_ACTION, QUERY_TABLE, queryTable, receivedAttachmentFile, receivedTempFiles, RECORD_OPERATIONS, registeredDispatcher, REPORT_ADVANCED_QUERY_COLUMNS, REPORT_ADVANCED_QUERY_TYPES, reportAvancedQueryColumns, reportAvancedQueryTypes, SECONDARY_COLUMNS, SECONDARY_KEYS, SECONDARY_TABLE, secondaryColumnsNames, secondaryKeyName, secondaryTable, sendAttachmentFile, SORT, SORT_DESC, table, TABLE, TABLE_ATTRIBUTE_ENTITIES, tempFiles, TRUNCATE_DATE_DEFAULT_VALUE, TRUNCATE_DATES, truncateDates, UNDERSCORE, UPDATE_ACTION, UPDATE_COLUMNS, UPDATE_KEYS, updateColumn, updateKeys, USE_SETSTRING_LONG_STRINGS, useAlwaysTableAttributeEntities, vLocaleColumns, vOtherLocaleTables, WILDCARD_COLUMNS, wildcardColumnsref| Constructor and Description |
|---|
NoticeEntity(EntityReferenceLocator locator,
DatabaseConnectionManager databaseManager,
int port,
String props) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkNoticeSent(Object idNotice)
Marks a notices as sent and update the date sent
|
void |
checkNoticeSent(Object idNotice,
TableEntity entityTo,
int sessionId,
Connection con)
Marks a notices as sent and update the date sent
|
EntityResult |
getInternalNotices(int sessionId,
boolean unsend,
boolean unread,
boolean deleted)
Gets all the records for the user with the specified sessionId and set
these messages as read and update the sent date
|
EntityResult |
getInternalNotices(int sessionId,
boolean unsend,
boolean unread,
boolean deleted,
Connection con) |
EntityResult |
getNewMailNotice()
Get the information about e-mail notices that have not been already sent
|
EntityResult |
getNewMailNotice(int sessionId,
Connection con) |
EntityResult |
getSentNotices(int sessionId,
Boolean deleted) |
EntityResult |
getSentNotices(int sessionId,
Boolean deleted,
Connection con) |
protected void |
insertDestiny(Hashtable kv,
Object noticeKey,
int sessionId,
Connection con)
Insert all the destinations of the notice
|
protected EntityResult |
joinInformation(EntityResult noticesData,
EntityResult destinationParams,
String[] simpleParams,
Object unionKey)
Completes the information of the notice data with the destination values.
|
protected void |
readProperties(String path)
Loads a Properties object located in
path using
this.getClass().getClassLoader().getResource(path). |
protected void |
readPropertiesChanges(URL urlProp) |
void |
removeReceivedNotices(int sessionId,
Vector noticeskeys)
Sets the specified notices for the specified user as removed.
|
void |
removeReceivedNotices(int sessionId,
Vector noticeskeys,
Connection con)
Sets the specified notices for the specified user as removed.
|
void |
removeSentNotices(int sessionId,
Vector noticesKeys)
Set the specified notices as deleted but does not remove them from the
database
|
void |
removeSentNotices(int sessionId,
Vector noticesKeys,
Connection con) |
void |
sentNotices(Hashtable kv,
int sessionId,
boolean request)
Inserts the notice in the notice table and insert all destinies in
destiny notice table
All message fields are inserted and a new field using the template for this notice type is created and also inserted in the notice table |
void |
sentNotices(Hashtable kv,
int sessionId,
boolean request,
Connection con) |
protected EntityResult |
setMessageAddress(EntityResult noticesData,
EntityResult destinyParams)
Sets a vector with the addresses to send a notice (mail or not)
|
void |
setNoticesRead(int sessionId,
Vector readNotices)
Set all the specified notices as read
|
void |
setNoticesRead(int sessionId,
Vector readNotices,
Connection con) |
getExtendedAliasPropertiesName, getExtendedPropertiesName, loadAliasFile, readProperties, setNameaddEntityDataChangeListener, buildConditionsString, cancelReceiving, checkAmbiguousColumns, checkAvailableLocaleTables, checkBasicExpresionLocalesInKv, checkBasicExpresionLocalesInKv, checkConditionsWithTablePreffix, checkDeleteKeys, checkFinishedSession, checkInsertKeys, checkLocalesInKV, checkOrderColumns, checkOtherLocaleTables, checkPermissions, checkUpdateKeys, configureReverseAlias, connect, connect, createAdvancedEntityResultForSessionId, createAdvancedEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityScriptManager, delete, delete, deleteAttachmentFile, deleteAttachmentFile, deleteHOtherLocaleTablesAlias, deleteLocaleColumns, deleteMultipleTableAttributesColumns, disconnect, disconnect, dispatcherAttribute, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executeStatement, filterAttributes, filterKeys, finishReceiving, fireDataChangeEvent, fireDataChangeEvent, fireTransactionDataChangeEvent, fireTransactionDataChangeEvent, generatedKeysToEntityResult, generateRandomId, getActions, getAliasForColumn, getAttachmentFileNameForKeys, getAttachmentFilePath, getAttachmentFilePath, getAutonumericalColumn, getBaseEntityName, getBytes, getColumnForAlias, getColumnListForAvancedQuery, getColumns, getColumnsWithoutLocale, getConditionsWithTablePreffix, getContidionsWithoutFilterKeys, getDatabaseConnectionManager, getDeleteKeys, getDescOrderColumns, getDescription, getEntityPrivilegedId, getEntityReference, getErrorMessage, getExtension, gethOtherLocaleTablesColumns, getInsertKeys, getJoinConditions, getKeys, getKeysVector, getLocaleColumnsFromTable, getLocaleIdFromSession, getLocaleTableName, getLocaleTableName, getMetadata, getName, getOrderColumns, getPrivilegedId, getPropertiesPath, getQueryRecordNumber, getQueryRecordNumber, getQueryTable, getSchemaQueryTable, getSchemaTable, getSecondaryColumnsWithoutKey, getSize, getSQLTypesFromMetaData, getStringsOn, getSubGroupValues, getSubGroupValues, getTable, getTypeFromMetadata, getUpdateColumns, getUpdateKeys, getUser, getValidAttributes, getValidDeletingKeysValues, getValidInsertingAttributesValues, getValidQueryingKeysValues, getValidUpdatingAttributesValues, getValidUpdatingKeysValues, getvLocaleColumns, getWildCardColumns, insert, insert, insertAutonumericalAlias, insertInLocaleTableLocaleColumns, insertInLocaleTablesForOneToOne, insertLocaleColumn, insertOtherEntities, isBinaryType, loadAliasFile, logToLogKeys, logUpdate, modifyBexpWithOtherLocaleTableAlias, modifyBexpWithOtherLocaleTableAlias, parseProperties, parseStringValue, particularizeConditions, performExtendedAliasProperties, performExtendedProperties, postDelete, postInsert, postUpdate, preDelete, preInsert, prepareToReceive, prepareToReceive, prepareToReceive, prepareToTransfer, prepareToTransfer, preUpdate, processColumnsWithoutLocale, processFileColumnsAttributes, processFileColumnsAttributes, processFileResults, processingMultipleValueAttributes, processingReferenceDataFieldAttributes, processingReferenceDataFieldAttributes, processMultipleAttributeKey, processMultipleTableAttribute, processMultipleTableAttribute, processOtherEntities, processValidLocaleColumnsValues, putBytes, query, query, query, query, query, queryOtherEntities, readProperties, registerAttributeDispatcher, reloadScripts, removeEntityDataChangeListener, replaceAliasByColumn, replaceAliasByColumn, replaceAliasByColumn, replaceAliasByColumn, replaceAliasByColumn, replaceColumnByAlias, replaceColumnByAlias, replaceColumnByAlias, replaceColumnByAlias, replaceColumnByAliasKeepColumns, resultSetToEntityResult, resultSetToEntityResult, resultSetToEntityResult, retrieveDataToInsert, setLimitQueryOthersEntities, setObject, setObject, setPrivilegedId, tagAttributes, tagAttributesWithoutAlias, tagKeysValues, toVectorOfBooleans, truncateDataToHour_00_00_00, truncateDateToMinutes, update, update, updateAttachmentValues, updateInLocaleTablesForOneToOne, updateLocaleColumns, vectorToStringSeparateBySemicolonclone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogprotected String entityDestinyName
public static String NOTICE_SYSTEM
public static String PROP_NOTICE_ENTITY_NAME
public static String PROP_NOTICE_ENTITY_DESTINY_NAME
public static String PROP_NOTICE_CONFIG_MAIL
public static String PROP_NOTICE_CLASS_MAIL
public static String PROP_NOTICE_CONFIG_TEMPLATES
public static String PROP_NOTICE_CONFIG_DEFAULT_TEMPLATE
public static String PROP_NOTICE_CONFIG_REQUEST_TEMPLATE
public static String MAIL_CONF_PROPERTIES
public static String INTERNAL_NOTICE_PERIOD
public static String SEND_MAIL_PERIOD
public static String NOTICE_ENTITY_TABLE_DB
public static String NOTICE_ENTITY_DESTINY_TABLE_DB
public static String NOTICE_MESSAGE_TYPE_COLUMN_NAME
public static String NOTICE_OTHER_COLUMNS
public static String NOTICE_KEY
public static String NOTICE_DESTINY_KEY
public static String NOTICE_TO_PARAMETER
public static String NOTICE_FROM_PARAMETER
public static String NOTICE_MAILTO_PARAMETER
public static String NOTICE_RESPONSE_REQUEST
public static String NOTICE_SEND_MAIL
public static String NOTICE_READ
public static String NOTICE_READ_DATE
public static String NOTICE_SEND
public static String NOTICE_CREATE_DATE
public static String NOTICE_SEND_DATE
public static String NOTICE_SUBJECT
public static String NOTICE_CONTENT
public static String NOTICE_FORCE_READ
public static String NOTICE_DELETE_SEND_NOTICE
public static String NOTICE_DELETE_RECEIVE_NOTICE
public static String NOTICE_MESSAGE_COLUMN_NAME
public NoticeEntity(EntityReferenceLocator locator, DatabaseConnectionManager databaseManager, int port, String props) throws Exception
Exceptionprotected void readProperties(String path) throws Exception
TableEntitypath using
this.getClass().getClassLoader().getResource(path).TableEntity.readProperties(Properties, URL)readProperties in class TableEntitypath - path from which the properties will be loadedExceptionprotected void readPropertiesChanges(URL urlProp)
public EntityResult getSentNotices(int sessionId, Boolean deleted, Connection con) throws Exception
sessionId - deleted - Exceptionpublic EntityResult getSentNotices(int sessionId, Boolean deleted) throws Exception
getSentNotices in interface INoticeEntitysessionId - deleted - Exceptionpublic void sentNotices(Hashtable kv, int sessionId, boolean request) throws Exception
sentNotices in interface INoticeEntitykv - sessionId - Exceptionpublic void sentNotices(Hashtable kv, int sessionId, boolean request, Connection con) throws Exception
Exceptionprotected void insertDestiny(Hashtable kv, Object noticeKey, int sessionId, Connection con) throws Exception
kv - notice information including the NOTICE TO parameternoticeKey - Key of the inserted noticesessionId - con - Exceptionpublic EntityResult getInternalNotices(int sessionId, boolean unsend, boolean unread, boolean deleted) throws Exception
getInternalNotices in interface INoticeEntitysessionId - unsend - unread - deleted - Exceptionpublic EntityResult getInternalNotices(int sessionId, boolean unsend, boolean unread, boolean deleted, Connection con) throws Exception
Exceptionpublic void setNoticesRead(int sessionId,
Vector readNotices)
throws Exception
setNoticesRead in interface INoticeEntitysessionId - User identifierreadNotices - List with the keys of the notices to updateExceptionpublic void setNoticesRead(int sessionId,
Vector readNotices,
Connection con)
throws Exception
Exceptionpublic EntityResult getNewMailNotice() throws Exception
getNewMailNotice in interface INoticeEntityExceptionpublic EntityResult getNewMailNotice(int sessionId, Connection con) throws Exception
Exceptionpublic void checkNoticeSent(Object idNotice, TableEntity entityTo, int sessionId, Connection con) throws Exception
idNotice - entityTo - sessionId - con - Exceptionpublic void checkNoticeSent(Object idNotice) throws Exception
checkNoticeSent in interface INoticeEntityidNotice - Exceptionpublic void removeSentNotices(int sessionId,
Vector noticesKeys)
throws Exception
removeSentNotices in interface INoticeEntitysessionId - noticesKeys - Exceptionpublic void removeSentNotices(int sessionId,
Vector noticesKeys,
Connection con)
throws Exception
Exceptionpublic void removeReceivedNotices(int sessionId,
Vector noticeskeys)
throws Exception
INoticeEntityremoveReceivedNotices in interface INoticeEntityExceptionpublic void removeReceivedNotices(int sessionId,
Vector noticeskeys,
Connection con)
throws Exception
sessionId - noticeskeys - con - Exceptionprotected EntityResult joinInformation(EntityResult noticesData, EntityResult destinationParams, String[] simpleParams, Object unionKey)
simpleParams
list and if this parameters already exist uses only the first occurrence.noticesData - EntityReusult to completedestinationParams - New information to addsimpleParams - Keys of the parameters to add from the destinationParams to
noticeDataunionKey - Name of the key to math the both Objectsprotected EntityResult setMessageAddress(EntityResult noticesData, EntityResult destinyParams)
noticesData - destinyParams - Copyright © 2016 Imatia Innovation S.L.. All rights reserved.