| java.lang.Object org.sakaiproject.email.impl.BaseDigestService
All known Subclasses: org.sakaiproject.email.impl.DbDigestService,
Inner Class :protected interface Storage | |
Field Summary | |
final protected static long | PERIOD How long to wait between runnable runs (ms). | protected List | m_digestQueue The queue of digests waiting to be added (DigestMessage). | protected String | m_lastSendPeriod The time period last time the sendDigests() was called. | protected String | m_relativeAccessPoint The initial portion of a relative access point URL. | protected boolean | m_sendDigests True if we are in the mode of sending out digests, false if we are waiting. | protected Storage | m_storage Storage manager for this service. | protected Thread | m_thread The thread I run my periodic clean and report on. | protected boolean | m_threadStop My thread's quit flag. |
Method Summary | |
public DigestEdit | add(String id) | public void | cancel(DigestEdit edit) | public void | commit(DigestEdit edit) | protected TimeRange | computeRange(Time time) Compute a time range based on a specific time. | public void | destroy() Returns to uninitialized state. | public void | digest(String to, String subject, String body) | protected String | digestId(String ref) Access the digest id extracted from a digest reference.
Parameters: ref - The digest reference string. | public String | digestReference(String id) Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The digest id string. | public DigestEdit | edit(String id) | abstract protected EmailService | emailService() | abstract protected EventTrackingService | eventTrackingService() | protected BaseDigest | findDigest(String id) | protected String | getAccessPoint(boolean relative) Access the partial URL that forms the root of resource URLs.
Parameters: relative - if true, form within the access path only (i.e. | public Time | getDate(Entity r) | public Digest | getDigest(String id) | public List | getDigests() | public String | getOwnerId(Entity r) | public void | init() Final initialization, once all dependencies are set. | public boolean | isDraft(Entity r) | public Entity | newContainer(String ref) | public Entity | newContainer(Element element) | public Entity | newContainer(Entity other) | public Edit | newContainerEdit(String ref) | public Edit | newContainerEdit(Element element) | public Edit | newContainerEdit(Entity other) | public Entity | newResource(Entity container, String id, Object[] others) | public Entity | newResource(Entity container, Element element) | public Entity | newResource(Entity container, Entity other) | public Edit | newResourceEdit(Entity container, String id, Object[] others) | public Edit | newResourceEdit(Entity container, Element element) | public Edit | newResourceEdit(Entity container, Entity other) | abstract protected Storage | newStorage() Construct storage for this service. | protected void | processQueue() Attempt to process all the queued digest requests. | public void | remove(DigestEdit edit) | public void | run() Run the clean and report thread. | abstract protected SecurityService | securityService() | protected void | send(String id, List msgs, TimeRange period) | protected void | sendDigests() If it's time, send out any digested messages. | abstract protected ServerConfigurationService | serverConfigurationService() | abstract protected SessionManager | sessionManager() | protected void | start() Start the clean and report thread. | protected void | stop() Stop the clean and report thread. | public Object[] | storageFields(Entity r) | abstract protected TimeService | timeService() | protected void | unlock(String lock, String resource) Check security permission. | protected boolean | unlockCheck(String lock, String resource) Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. | abstract protected UserDirectoryService | userDirectoryService() |
PERIOD | final protected static long PERIOD(Code) | | How long to wait between runnable runs (ms).
|
m_digestQueue | protected List m_digestQueue(Code) | | The queue of digests waiting to be added (DigestMessage).
|
m_lastSendPeriod | protected String m_lastSendPeriod(Code) | | The time period last time the sendDigests() was called.
|
m_relativeAccessPoint | protected String m_relativeAccessPoint(Code) | | The initial portion of a relative access point URL.
|
m_sendDigests | protected boolean m_sendDigests(Code) | | True if we are in the mode of sending out digests, false if we are waiting.
|
m_storage | protected Storage m_storage(Code) | | Storage manager for this service.
|
m_thread | protected Thread m_thread(Code) | | The thread I run my periodic clean and report on.
|
m_threadStop | protected boolean m_threadStop(Code) | | My thread's quit flag.
|
computeRange | protected TimeRange computeRange(Time time)(Code) | | Compute a time range based on a specific time.
The time range that encloses the specific time. |
destroy | public void destroy()(Code) | | Returns to uninitialized state.
|
digestId | protected String digestId(String ref)(Code) | | Access the digest id extracted from a digest reference.
Parameters: ref - The digest reference string. The the digest id extracted from a digest reference. |
digestReference | public String digestReference(String id)(Code) | | Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The digest id string. The the internal reference which can be used to access the resource from within the system. |
emailService | abstract protected EmailService emailService()(Code) | | the EmailService collaborator. |
getAccessPoint | protected String getAccessPoint(boolean relative)(Code) | | Access the partial URL that forms the root of resource URLs.
Parameters: relative - if true, form within the access path only (i.e. starting with /content) the partial URL that forms the root of resource URLs. |
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
newStorage | abstract protected Storage newStorage()(Code) | | Construct storage for this service.
|
processQueue | protected void processQueue()(Code) | | Attempt to process all the queued digest requests. Ones that cannot be processed now will be returned to the queue.
|
run | public void run()(Code) | | Run the clean and report thread.
|
securityService | abstract protected SecurityService securityService()(Code) | | the MemoryServiSecurityServicece collaborator. |
send | protected void send(String id, List msgs, TimeRange period)(Code) | | Send a single digest message
Parameters: id - The use id to send the message to. Parameters: msgs - The List (DigestMessage) of message to digest. Parameters: period - The time period of the digested messages. |
sendDigests | protected void sendDigests()(Code) | | If it's time, send out any digested messages. Send once daily, after a certiain time of day (local time).
|
sessionManager | abstract protected SessionManager sessionManager()(Code) | | the SessionManager collaborator. |
start | protected void start()(Code) | | Start the clean and report thread.
|
stop | protected void stop()(Code) | | Stop the clean and report thread.
|
timeService | abstract protected TimeService timeService()(Code) | | the TimeService collaborator. |
unlock | protected void unlock(String lock, String resource) throws PermissionException(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access |
unlockCheck | protected boolean unlockCheck(String lock, String resource)(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. true if allowd, false if not |
|
|