acq:serials:sketches
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
acq:serials:sketches [2007/11/19 07:21] – art | acq:serials:sketches [2022/02/10 13:34] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Serials Checkin and Pattern Maintenance - some notes====== | ||
+ | //These is a proposed implementation at this point, serials may not necessarily work like this// | ||
+ | |||
+ | Serials maintenance is handled under // | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The //cycles// that identify a pattern for a serial are defined individually, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The recurrence definition is handled as an expandable list of options, and exceptions are associated with predefined calendars. So, for example, if a library does count holidays in determining whether a serial claim is warranted, one calendar can maintain this information. Further exceptions can also be placed when the cycle is associated with a subscription. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Any number of cycles can be associated with a subscription. A //claim delay// is used to identify the period of time to wait before initiating a claim. Addition exceptions can also be made using a calendar associated with this instance of the cycle. If a cycle is defined for a virtual resource, an option is to identify a web mechanism for checking the title' | ||
+ | |||
+ | The job scheduler uses an [[http:// | ||
+ | |||
+ | //work out permissions | ||
+ | GenericDelegator delegator = dctx.getDelegator(); | ||
+ | LocalDispatcher dispatcher = dctx.getDispatcher(); | ||
+ | GenericValue userLogin = (GenericValue) context.get(" | ||
+ | Security security = dctx.getSecurity(); | ||
+ | Locale locale = (Locale) context.get(" | ||
+ | | ||
+ | if (! security.hasEntityPermission(" | ||
+ | return ServiceUtil.returnError(UtilProperties.getMessage(" | ||
+ | " | ||
+ | } | ||
+ | | ||
+ | //check patterns | ||
+ | List transactions = null; | ||
+ | try { | ||
+ | List conditions = UtilMisc.toList( | ||
+ | new EntityExpr(" | ||
+ | new EntityExpr(" | ||
+ | UtilDateTime.nowTimestamp()), | ||
+ | new EntityExpr(" | ||
+ | ); | ||
+ | transactions = delegator.findByAnd(" | ||
+ | } catch( GenericEntityException e ) { | ||
+ | Debug.logError(e.getMessage(), | ||
+ | return ServiceUtil.returnError(e.getMessage()); | ||
+ | } | ||
+ | | ||
+ | //invoke service to deal with titles due to be received | ||
+ | Map input = UtilMisc.toMap(" | ||
+ | for (Iterator iter = transactions.iterator(); | ||
+ | GenericValue transaction = (GenericValue) iter.next(); | ||
+ | input.put(" | ||
+ | try { | ||
+ | Map results = dispatcher.runSync(" | ||
+ | if (ServiceUtil.isError(results)) { | ||
+ | Debug.logError(" | ||
+ | transaction.get(" | ||
+ | ServiceUtil.getErrorMessage(results), | ||
+ | } | ||
+ | } catch( GenericServiceException e ) { | ||
+ | Debug.logError(e, | ||
+ | transaction.get(" | ||
+ | e.getMessage(), | ||
+ | } | ||
+ | } | ||
+ | return ServiceUtil.returnSuccess(); |