001    /**
002     * Copyright 2005-2011 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.kew.api.preferences;
017    
018    import java.io.Serializable;
019    import java.util.Collection;
020    import java.util.Map;
021    
022    import javax.xml.bind.annotation.XmlAccessType;
023    import javax.xml.bind.annotation.XmlAccessorType;
024    import javax.xml.bind.annotation.XmlAnyElement;
025    import javax.xml.bind.annotation.XmlElement;
026    import javax.xml.bind.annotation.XmlRootElement;
027    import javax.xml.bind.annotation.XmlType;
028    
029    import org.kuali.rice.core.api.mo.AbstractDataTransferObject;
030    import org.kuali.rice.core.api.mo.ModelBuilder;
031    import org.kuali.rice.kew.api.KewApiConstants;
032    import org.w3c.dom.Element;
033    
034    /**
035     * An immutable data transfer object implementing {@link PreferencesContract}.
036     *
037     * p>When loaded, Preferences could be in a state where they require being saved to the database.
038     * If this is the case then {{@link #requiresSave} will evaluate to true.
039     *
040     * @see PreferencesContract
041     *
042     * @author Kuali Rice Team (rice.collab@kuali.org)
043     */
044    @XmlRootElement(name = Preferences.Constants.ROOT_ELEMENT_NAME)
045    @XmlAccessorType(XmlAccessType.NONE)
046    @XmlType(name = Preferences.Constants.TYPE_NAME)
047    public final class Preferences extends AbstractDataTransferObject implements PreferencesContract {
048    
049        private static final long serialVersionUID = 642820621349964439L;
050    
051        @XmlElement(name = Elements.REQUIRES_SAVE)
052        private final boolean requiresSave;
053        @XmlElement(name = Elements.EMAIL_NOTIFICATION)
054        private final String emailNotification;
055        @XmlElement(name = Elements.NOTIFY_PRIMARY_DELEGATION)
056        private final String notifyPrimaryDelegation;
057        @XmlElement(name = Elements.NOTIFY_SECONDARY_DELEGATION)
058        private final String notifySecondaryDelegation;
059        @XmlElement(name = Elements.OPEN_NEW_WINDOW)
060        private final String openNewWindow;
061        @XmlElement(name = Elements.SHOW_ACTION_REQUESTED)
062        private final String showActionRequested;
063        @XmlElement(name = Elements.SHOW_DATE_CREATED)
064        private final String showDateCreated;
065        @XmlElement(name = Elements.SHOW_DOCUMENT_STATUS)
066        private final String showDocumentStatus;
067        @XmlElement(name = Elements.SHOW_APP_DOC_STATUS)
068        private final String showAppDocStatus;
069        @XmlElement(name = Elements.SHOW_DOC_TYPE)
070        private final String showDocType;
071        @XmlElement(name = Elements.SHOW_INITIATOR)
072        private final String showInitiator;
073        @XmlElement(name = Elements.SHOW_DOC_TITLE)
074        private final String showDocTitle;
075        @XmlElement(name = Elements.SHOW_WORKGROUP_REQUEST)
076        private final String showWorkgroupRequest;
077        @XmlElement(name = Elements.SHOW_DELEGATOR)
078        private final String showDelegator;
079        @XmlElement(name = Elements.SHOW_CLEAR_FYI)
080        private final String showClearFyi;
081        @XmlElement(name = Elements.PAGE_SIZE)
082        private final String pageSize;
083        @XmlElement(name = Elements.REFRESH_RATE)
084        private final String refreshRate;
085        @XmlElement(name = Elements.COLOR_SAVED)
086        private final String colorSaved;
087        @XmlElement(name = Elements.COLOR_INITIATED)
088        private final String colorInitiated;
089        @XmlElement(name = Elements.COLOR_DISAPPROVED)
090        private final String colorDisapproved;
091        @XmlElement(name = Elements.COLOR_ENROUTE)
092        private final String colorEnroute;
093        @XmlElement(name = Elements.COLOR_APPROVED)
094        private final String colorApproved;
095        @XmlElement(name = Elements.COLOR_FINAL)
096        private final String colorFinal;
097        @XmlElement(name = Elements.COLOR_DISAPPROVE_CANCEL)
098        private final String colorDisapproveCancel;
099        @XmlElement(name = Elements.COLOR_PROCESSED)
100        private final String colorProcessed;
101        @XmlElement(name = Elements.COLOR_EXCEPTION)
102        private final String colorException;
103        @XmlElement(name = Elements.COLOR_CANCELED)
104        private final String colorCanceled;
105        @XmlElement(name = Elements.DELEGATOR_FILTER)
106        private final String delegatorFilter;
107        @XmlElement(name = Elements.USE_OUTBOX)
108        private final String useOutbox;
109        @XmlElement(name = Elements.SHOW_DATE_APPROVED)
110        private final String showDateApproved;
111        @XmlElement(name = Elements.SHOW_CURRENT_NODE)
112        private final String showCurrentNode;
113        @XmlElement(name = Elements.PRIMARY_DELEGATE_FILTER)
114        private final String primaryDelegateFilter;
115        @XmlElement(name = Elements.NOTIFY_ACKNOWLEDGE)
116        private final String notifyAcknowledge;
117        @XmlElement(name = Elements.NOTIFY_APPROVE)
118        private final String notifyApprove;
119        @XmlElement(name = Elements.NOTIFY_COMPLETE)
120        private final String notifyComplete;
121        @XmlElement(name = Elements.NOTIFY_FYI)
122        private final String notifyFYI;
123    
124        @SuppressWarnings("unused")
125        @XmlAnyElement
126        private final Collection<Element> _futureElements = null;
127    
128        private Preferences() {
129            this.emailNotification = null;
130            this.notifyPrimaryDelegation = null;
131            this.notifySecondaryDelegation = null;
132            this.openNewWindow = null;
133            this.showActionRequested = null;
134            this.showDateCreated = null;
135            this.showDocumentStatus = null;
136            this.showAppDocStatus = null;
137            this.showDocType = null;
138            this.showInitiator = null;
139            this.showDocTitle = null;
140            this.showWorkgroupRequest = null;
141            this.showDelegator = null;
142            this.showClearFyi = null;
143            this.pageSize = null;
144            this.refreshRate = null;
145            this.colorSaved = null;
146            this.colorInitiated = null;
147            this.colorDisapproved = null;
148            this.colorEnroute = null;
149            this.colorApproved = null;
150            this.colorFinal = null;
151            this.colorDisapproveCancel = null;
152            this.colorProcessed = null;
153            this.colorException = null;
154            this.colorCanceled = null;
155            this.delegatorFilter = null;
156            this.useOutbox = null;
157            this.showDateApproved = null;
158            this.showCurrentNode = null;
159            this.primaryDelegateFilter = null;
160            this.notifyAcknowledge = null;
161            this.notifyApprove =  null;
162            this.notifyComplete = null;
163            this.notifyFYI = null;
164            
165            this.requiresSave = false;
166        }
167    
168        public Preferences(Builder builder) {
169            this.emailNotification = builder.getEmailNotification();
170            this.notifyPrimaryDelegation = builder.getNotifyPrimaryDelegation();
171            this.notifySecondaryDelegation = builder.getNotifySecondaryDelegation();
172            this.openNewWindow = builder.getOpenNewWindow();
173            this.showActionRequested = builder.getShowActionRequested();
174            this.showDateCreated = builder.getShowDateCreated();
175            this.showDocumentStatus = builder.getShowDocumentStatus();
176            this.showAppDocStatus = builder.getShowAppDocStatus();
177            this.showDocType = builder.getShowDocType();
178            this.showInitiator = builder.getShowInitiator();
179            this.showDocTitle = builder.getShowDocTitle();
180            this.showWorkgroupRequest = builder.getShowWorkgroupRequest();
181            this.showDelegator = builder.getShowDelegator();
182            this.showClearFyi = builder.getShowClearFyi();
183            this.pageSize = builder.getPageSize();
184            this.refreshRate = builder.getRefreshRate();
185            this.colorSaved = builder.getColorSaved();
186            this.colorInitiated = builder.getColorInitiated();
187            this.colorDisapproved = builder.getColorDisapproved();
188            this.colorEnroute = builder.getColorEnroute();
189            this.colorApproved = builder.getColorApproved();
190            this.colorFinal = builder.getColorFinal();
191            this.colorDisapproveCancel = builder.getColorDisapproveCancel();
192            this.colorProcessed = builder.getColorProcessed();
193            this.colorException = builder.getColorException();
194            this.colorCanceled = builder.getColorCanceled();
195            this.delegatorFilter = builder.getDelegatorFilter();
196            this.useOutbox = builder.getUseOutbox();
197            this.showDateApproved = builder.getShowDateApproved();
198            this.showCurrentNode = builder.getShowCurrentNode();
199            this.primaryDelegateFilter = builder.getPrimaryDelegateFilter();
200            this.requiresSave = builder.isRequiresSave();
201            this.notifyAcknowledge = builder.getNotifyAcknowledge();
202            this.notifyApprove = builder.getNotifyApprove();
203            this.notifyComplete = builder.getNotifyComplete();
204            this.notifyFYI = builder.getNotifyFYI();
205        }
206    
207        public boolean isRequiresSave() {
208            return requiresSave;
209        }
210    
211        public String getEmailNotification() {
212            return emailNotification;
213        }
214    
215        public String getNotifyPrimaryDelegation() {
216            return notifyPrimaryDelegation;
217        }
218    
219        public String getNotifySecondaryDelegation() {
220            return notifySecondaryDelegation;
221        }
222    
223        public String getOpenNewWindow() {
224            return openNewWindow;
225        }
226    
227        public String getShowActionRequested() {
228            return showActionRequested;
229        }
230    
231        public String getShowDateCreated() {
232            return showDateCreated;
233        }
234    
235        public String getShowDocumentStatus() {
236            return showDocumentStatus;
237        }
238    
239        public String getShowAppDocStatus() {
240            return showAppDocStatus;
241        }
242    
243        public String getShowDocType() {
244            return showDocType;
245        }
246    
247        public String getShowInitiator() {
248            return showInitiator;
249        }
250    
251        public String getShowDocTitle() {
252            return showDocTitle;
253        }
254    
255        public String getShowWorkgroupRequest() {
256            return showWorkgroupRequest;
257        }
258    
259        public String getShowDelegator() {
260            return showDelegator;
261        }
262    
263        public String getShowClearFyi() {
264            return showClearFyi;
265        }
266    
267        public String getPageSize() {
268            return pageSize;
269        }
270    
271        public String getRefreshRate() {
272            return refreshRate;
273        }
274    
275        public String getColorSaved() {
276            return colorSaved;
277        }
278    
279        public String getColorInitiated() {
280            return colorInitiated;
281        }
282    
283        public String getColorDisapproved() {
284            return colorDisapproved;
285        }
286    
287        public String getColorEnroute() {
288            return colorEnroute;
289        }
290    
291        public String getColorApproved() {
292            return colorApproved;
293        }
294    
295        public String getColorFinal() {
296            return colorFinal;
297        }
298    
299        public String getColorDisapproveCancel() {
300            return colorDisapproveCancel;
301        }
302    
303        public String getColorProcessed() {
304            return colorProcessed;
305        }
306    
307        public String getColorException() {
308            return colorException;
309        }
310    
311        public String getColorCanceled() {
312            return colorCanceled;
313        }
314    
315        public String getDelegatorFilter() {
316            return delegatorFilter;
317        }
318    
319        public String getUseOutbox() {
320            return useOutbox;
321        }
322    
323        public String getShowDateApproved() {
324            return showDateApproved;
325        }
326    
327        public String getShowCurrentNode() {
328            return showCurrentNode;
329        }
330    
331        public String getPrimaryDelegateFilter() {
332            return primaryDelegateFilter;
333        }
334    
335        public String getNotifyComplete() {
336            return this.notifyComplete;
337        }
338    
339        public String getNotifyApprove() {
340            return this.notifyApprove;
341        }
342    
343        public String getNotifyAcknowledge() {
344            return this.notifyAcknowledge;
345        }
346    
347        public String getNotifyFYI() {
348            return this.notifyFYI;
349        }
350    
351        public boolean isUsingOutbox() {
352            if (this.getUseOutbox() != null && this.getUseOutbox().equals(Constants.PREFERENCES_YES_VAL)) {
353                return true;
354            }
355            return false;
356        }
357    
358        public final static class Builder
359                implements Serializable, ModelBuilder, PreferencesContract
360        {
361    
362            private boolean requiresSave = false;
363    
364            private String emailNotification;
365            private String notifyPrimaryDelegation;
366            private String notifySecondaryDelegation;
367            private String openNewWindow;
368            private String showActionRequested;
369            private String showDateCreated;
370            private String showDocumentStatus;
371            private String showAppDocStatus;
372            private String showDocType;
373            private String showInitiator;
374            private String showDocTitle;
375            private String showWorkgroupRequest;
376            private String showDelegator;
377            private String showClearFyi;
378            private String pageSize;
379            private String refreshRate;
380            private String colorSaved;
381            private String colorInitiated;
382            private String colorDissaproved;
383            private String colorEnroute;
384            private String colorApproved;
385            private String colorFinal;
386            private String colorDissapproveCancel;
387            private String colorProccessed;
388            private String colorException;
389            private String colorCanceled;
390            private String delegatorFilter;
391            private String useOutbox;
392            private String showDateApproved;
393            private String showCurrentNode;
394            private String primaryDelegateFilter;
395            private String notifyAcknowledge;
396            private String notifyApprove;
397            private String notifyComplete;
398            private String notifyFYI;
399    
400            private Builder() {
401    
402            }
403    
404            private Builder(String emailNotification, String notifyPrimaryDelegation, String notifySecondaryDelegation,
405                    String openNewWindow, String showActionRequested, String showDateCreated, String showDocumentStatus,
406                    String showAppDocStatus, String showDocType, String showInitiator, String showDocTitle,
407                    String showWorkgroupRequest, String showDelegator, String showClearFyi, String pageSize, String refreshRate,
408                    String colorSaved, String colorInitiated, String colorDissaproved, String colorEnroute,
409                    String colorApproved, String colorFinal, String colorDissapproveCancel, String colorProccessed,
410                    String colorException, String colorCanceled, String delegatorFilter, String useOutbox,
411                    String showDateApproved, String showCurrentNode, String primaryDelegateFilter, String notifyAcknowledge,
412                    String notifyApprove, String notifyComplete, String notifyFYI, boolean requiresSave) {
413                this.emailNotification = emailNotification;
414                this.notifyPrimaryDelegation = notifyPrimaryDelegation;
415                this.notifySecondaryDelegation = notifySecondaryDelegation;
416                this.openNewWindow = openNewWindow;
417                this.showActionRequested = showActionRequested;
418                this.showDateCreated = showDateCreated;
419                this.showDocumentStatus = showDocumentStatus;
420                this.showAppDocStatus = showAppDocStatus;
421                this.showDocType = showDocType;
422                this.showInitiator = showInitiator;
423                this.showDocTitle = showDocTitle;
424                this.showWorkgroupRequest = showWorkgroupRequest;
425                this.showDelegator = showDelegator;
426                this.showClearFyi = showClearFyi;
427                this.pageSize = pageSize;
428                this.refreshRate = refreshRate;
429                this.colorSaved = colorSaved;
430                this.colorInitiated = colorInitiated;
431                this.colorDissaproved = colorDissaproved;
432                this.colorEnroute = colorEnroute;
433                this.colorApproved = colorApproved;
434                this.colorFinal = colorFinal;
435                this.colorDissapproveCancel = colorDissapproveCancel;
436                this.colorProccessed = colorProccessed;
437                this.colorException = colorException;
438                this.colorCanceled = colorCanceled;
439                this.delegatorFilter = delegatorFilter;
440                this.useOutbox = useOutbox;
441                this.showDateApproved = showDateApproved;
442                this.showCurrentNode = showCurrentNode;
443                this.primaryDelegateFilter = primaryDelegateFilter;
444                this.requiresSave = requiresSave;
445                this.notifyAcknowledge = notifyAcknowledge;
446                this.notifyApprove = notifyApprove;
447                this.notifyComplete = notifyComplete;
448                this.notifyFYI = notifyFYI;
449            }
450    
451            public Preferences build() {
452                return new Preferences(this);
453            }
454    
455            public static Builder create() {
456                return new Builder();
457            }
458    
459            public static Builder create(String emailNotification, String notifyPrimaryDelegation, String notifySecondaryDelegation,
460                    String openNewWindow, String showActionRequested, String showDateCreated, String showDocumentStatus,
461                    String showAppDocStatus, String showDocType, String showInitiator, String showDocTitle,
462                    String showWorkgroupRequest, String showDelegator, String showClearFyi, String pageSize, String refreshRate,
463                    String colorSaved, String colorInitiated, String colorDissaproved, String colorEnroute,
464                    String colorApproved, String colorFinal, String colorDissapproveCancel, String colorProccessed,
465                    String colorException, String colorCanceled, String delegatorFilter, String useOutbox,
466                    String showDateApproved, String showCurrentNode, String primaryDelegateFilter, String notifyAcknowledge,
467                    String notifyApprove, String notifyComplete, String notifyFYI, boolean requiresSave) {
468                return new Builder(emailNotification, notifyPrimaryDelegation, notifySecondaryDelegation, openNewWindow, showActionRequested, showDateCreated,
469                        showDocumentStatus, showAppDocStatus, showDocType, showInitiator, showDocTitle, showWorkgroupRequest,  showDelegator, showClearFyi,
470                        pageSize, refreshRate, colorSaved, colorInitiated, colorDissaproved, colorEnroute, colorApproved, colorFinal, colorDissapproveCancel,
471                        colorProccessed, colorException, colorCanceled, delegatorFilter, useOutbox, showDateApproved, showCurrentNode, primaryDelegateFilter,
472                        notifyAcknowledge, notifyApprove, notifyComplete, notifyFYI, requiresSave);
473            }
474    
475            public static Builder create(PreferencesContract contract) {
476                if (contract == null) {
477                    throw new IllegalArgumentException("contract was null");
478                }
479                Builder builder = create(contract.getEmailNotification(), contract.getNotifyPrimaryDelegation(), contract.getNotifySecondaryDelegation(), contract.getOpenNewWindow(),
480                        contract.getShowActionRequested(), contract.getShowDateCreated(), contract.getShowDocumentStatus(), contract.getShowAppDocStatus(), contract.getShowDocType(),
481                        contract.getShowInitiator(), contract.getShowDocTitle(), contract.getShowWorkgroupRequest(), contract.getShowDelegator(), contract.getShowClearFyi(),
482                        contract.getPageSize(), contract.getRefreshRate(), contract.getColorSaved(), contract.getColorInitiated(), contract.getColorDisapproved(),
483                        contract.getColorEnroute(), contract.getColorApproved(), contract.getColorFinal(), contract.getColorDisapproveCancel(), contract.getColorProcessed(),
484                        contract.getColorException(), contract.getColorCanceled(), contract.getDelegatorFilter(), contract.getUseOutbox(), contract.getShowDateApproved(),
485                        contract.getShowCurrentNode(), contract.getPrimaryDelegateFilter(), contract.getNotifyAcknowledge(), contract.getNotifyApprove(), contract.getNotifyComplete(),
486                        contract.getNotifyFYI(), contract.isRequiresSave());
487                return builder;
488            }
489    
490            public static Builder create(Map<String, String> map, boolean requiresSave) {
491                Builder builder = create(map.get(KEYS.EMAIL_NOTIFICATION), map.get(KEYS.NOTIFY_PRIMARY_DELEGATION), map.get(KEYS.NOTIFY_SECONDARY_DELEGATION), map.get(KEYS.OPEN_NEW_WINDOW),
492                        map.get(KEYS.SHOW_ACTION_REQUESTED), map.get(KEYS.SHOW_DATE_CREATED), map.get(KEYS.SHOW_DOCUMENT_STATUS), map.get(KEYS.SHOW_APP_DOC_STATUS), map.get(KEYS.SHOW_DOC_TYPE),
493                        map.get(KEYS.SHOW_INITIATOR), map.get(KEYS.SHOW_DOC_TITLE), map.get(KEYS.SHOW_GROUP_REQUEST), map.get(KEYS.SHOW_DELEGATOR), map.get(KEYS.SHOW_CLEAR_FYI),
494                        map.get(KEYS.PAGE_SIZE), map.get(KEYS.REFRESH_RATE), map.get(KEYS.COLOR_SAVED), map.get(KEYS.COLOR_INITIATED), map.get(KEYS.COLOR_DISAPPROVED),
495                        map.get(KEYS.COLOR_ENROUTE), map.get(KEYS.COLOR_APPROVED), map.get(KEYS.COLOR_FINAL), map.get(KEYS.COLOR_DISAPPROVE_CANCEL), map.get(KEYS.COLOR_PROCESSED),
496                        map.get(KEYS.COLOR_EXCEPTION), map.get(KEYS.COLOR_CANCELED), map.get(KEYS.DELEGATOR_FILTER), map.get(KEYS.USE_OUT_BOX), map.get(KEYS.SHOW_DATE_APPROVED),
497                        map.get(KEYS.SHOW_CURRENT_NODE), map.get(KEYS.PRIMARY_DELEGATE_FILTER), map.get(KEYS.NOTIFY_ACKNOWLEDGE), map.get(KEYS.NOTIFY_APPROVE), map.get(KEYS.NOTIFY_COMPLETE),
498                        map.get(KEYS.NOTIFY_FYI), requiresSave);
499                return builder;
500            }
501    
502            public synchronized boolean isRequiresSave() {
503                return requiresSave;
504            }
505    
506            public synchronized void setRequiresSave(boolean requiresSave) {
507                this.requiresSave = requiresSave;
508            }
509    
510            public synchronized String getEmailNotification() {
511                return emailNotification;
512            }
513    
514            public synchronized void setEmailNotification(String emailNotification) {
515                this.emailNotification = emailNotification;
516            }
517    
518            public synchronized String getNotifyPrimaryDelegation() {
519                return notifyPrimaryDelegation;
520            }
521    
522            public synchronized void setNotifyPrimaryDelegation(String notifyPrimaryDelegation) {
523                this.notifyPrimaryDelegation = notifyPrimaryDelegation;
524            }
525    
526            public synchronized String getNotifySecondaryDelegation() {
527                return notifySecondaryDelegation;
528            }
529    
530            public synchronized void setNotifySecondaryDelegation(String notifySecondaryDelegation) {
531                this.notifySecondaryDelegation = notifySecondaryDelegation;
532            }
533    
534            public synchronized String getOpenNewWindow() {
535                return openNewWindow;
536            }
537    
538            public synchronized void setOpenNewWindow(String openNewWindow) {
539                this.openNewWindow = openNewWindow;
540            }
541    
542            public synchronized String getShowActionRequested() {
543                return showActionRequested;
544            }
545    
546            public synchronized void setShowActionRequested(String showActionRequested) {
547                this.showActionRequested = showActionRequested;
548            }
549    
550            public synchronized String getShowDateCreated() {
551                return showDateCreated;
552            }
553    
554            public synchronized void setShowDateCreated(String showDateCreated) {
555                this.showDateCreated = showDateCreated;
556            }
557    
558            public synchronized String getShowDocumentStatus() {
559                return showDocumentStatus;
560            }
561    
562            public synchronized void setShowDocumentStatus(String showDocumentStatus) {
563                this.showDocumentStatus = showDocumentStatus;
564            }
565    
566            public synchronized  String getShowAppDocStatus() {
567                return showAppDocStatus;
568            }
569    
570            public synchronized void setShowAppDocStatus(String showAppDocStatus) {
571                this.showAppDocStatus = showAppDocStatus;
572            }
573    
574            public synchronized String getShowDocType() {
575                return showDocType;
576            }
577    
578            public synchronized void setShowDocType(String showDocType) {
579                this.showDocType = showDocType;
580            }
581    
582            public synchronized String getShowInitiator() {
583                return showInitiator;
584            }
585    
586            public synchronized void setShowInitiator(String showInitiator) {
587                this.showInitiator = showInitiator;
588            }
589    
590            public synchronized String getShowDocTitle() {
591                return showDocTitle;
592            }
593    
594            public synchronized void setShowDocTitle(String showDocTitle) {
595                this.showDocTitle = showDocTitle;
596            }
597    
598            public synchronized String getShowWorkgroupRequest() {
599                return showWorkgroupRequest;
600            }
601    
602            public synchronized void setShowWorkgroupRequest(String showWorkgroupRequest) {
603                this.showWorkgroupRequest = showWorkgroupRequest;
604            }
605    
606            public synchronized String getShowDelegator() {
607                return showDelegator;
608            }
609    
610            public synchronized void setShowDelegator(String showDelegator) {
611                this.showDelegator = showDelegator;
612            }
613    
614            public synchronized String getShowClearFyi() {
615                return showClearFyi;
616            }
617    
618            public synchronized void setShowClearFyi(String showClearFyi) {
619                this.showClearFyi = showClearFyi;
620            }
621    
622            public synchronized String getPageSize() {
623                return pageSize;
624            }
625    
626            public synchronized void setPageSize(String pageSize) {
627                this.pageSize = pageSize;
628            }
629    
630            public synchronized String getRefreshRate() {
631                return refreshRate;
632            }
633    
634            public synchronized void setRefreshRate(String refreshRate) {
635                this.refreshRate = refreshRate;
636            }
637    
638            public synchronized String getColorSaved() {
639                return colorSaved;
640            }
641    
642            public synchronized void setColorSaved(String colorSaved) {
643                this.colorSaved = colorSaved;
644            }
645    
646            public synchronized String getColorInitiated() {
647                return colorInitiated;
648            }
649    
650            public synchronized void setColorInitiated(String colorInitiated) {
651                this.colorInitiated = colorInitiated;
652            }
653    
654            public synchronized String getColorDisapproved() {
655                return colorDissaproved;
656            }
657    
658            public synchronized void setColorDissaproved(String colorDissaproved) {
659                this.colorDissaproved = colorDissaproved;
660            }
661    
662            public synchronized String getColorEnroute() {
663                return colorEnroute;
664            }
665    
666            public synchronized void setColorEnroute(String colorEnroute) {
667                this.colorEnroute = colorEnroute;
668            }
669    
670            public synchronized String getColorApproved() {
671                return colorApproved;
672            }
673    
674            public synchronized void setColorApproved(String colorApproved) {
675                this.colorApproved = colorApproved;
676            }
677    
678            public synchronized String getColorFinal() {
679                return colorFinal;
680            }
681    
682            public synchronized void setColorFinal(String colorFinal) {
683                this.colorFinal = colorFinal;
684            }
685    
686            public synchronized String getColorDisapproveCancel() {
687                return colorDissapproveCancel;
688            }
689    
690            public synchronized void setColorDissapproveCancel(String colorDissapproveCancel) {
691                this.colorDissapproveCancel = colorDissapproveCancel;
692            }
693    
694            public synchronized String getColorProcessed() {
695                return colorProccessed;
696            }
697    
698            public synchronized void setColorProccessed(String colorProccessed) {
699                this.colorProccessed = colorProccessed;
700            }
701    
702            public synchronized String getColorException() {
703                return colorException;
704            }
705    
706            public synchronized void setColorException(String colorException) {
707                this.colorException = colorException;
708            }
709    
710            public synchronized String getColorCanceled() {
711                return colorCanceled;
712            }
713    
714            public synchronized void setColorCanceled(String colorCanceled) {
715                this.colorCanceled = colorCanceled;
716            }
717    
718            public synchronized String getDelegatorFilter() {
719                return delegatorFilter;
720            }
721    
722            public synchronized void setDelegatorFilter(String delegatorFilter) {
723                this.delegatorFilter = delegatorFilter;
724            }
725    
726            public synchronized String getUseOutbox() {
727                return useOutbox;
728            }
729    
730            public synchronized void setUseOutbox(String useOutbox) {
731                this.useOutbox = useOutbox;
732            }
733    
734            public synchronized String getShowDateApproved() {
735                return showDateApproved;
736            }
737    
738            public synchronized void setShowDateApproved(String showDateApproved) {
739                this.showDateApproved = showDateApproved;
740            }
741    
742            public synchronized String getShowCurrentNode() {
743                return showCurrentNode;
744            }
745    
746            public synchronized void setShowCurrentNode(String showCurrentNode) {
747                this.showCurrentNode = showCurrentNode;
748            }
749    
750            public synchronized String getPrimaryDelegateFilter() {
751                return primaryDelegateFilter;
752            }
753    
754            public synchronized void setPrimaryDelegateFilter(String primaryDelegateFilter) {
755                this.primaryDelegateFilter = primaryDelegateFilter;
756            }
757    
758            public synchronized String getNotifyAcknowledge() {
759                return this.notifyAcknowledge;
760            }
761    
762            public synchronized void setNotifyAcknowledge(String notifyAcknowledge) {
763                this.notifyAcknowledge = notifyAcknowledge;
764            }
765    
766            public synchronized String getNotifyApprove() {
767                return this.notifyApprove;
768            }
769    
770            public synchronized void setNotifyApprove(String notifyApprove) {
771                this.notifyApprove = notifyApprove;
772            }
773    
774            public synchronized String getNotifyComplete() {
775                return this.notifyComplete;
776            }
777    
778            public synchronized void setNotifyComplete(String notifyComplete) {
779                this.notifyComplete = notifyComplete;
780            }
781    
782            public synchronized String getNotifyFYI() {
783                return this.notifyFYI;
784            }
785    
786            public synchronized void setNotifyFYI(String notifyFYI) {
787                this.notifyFYI = notifyFYI;
788            }
789        }
790    
791        static class Constants {
792            static final String ROOT_ELEMENT_NAME = "preferences";
793            static final String TYPE_NAME = "PreferencesType";
794            static final String PREFERENCES_YES_VAL = "yes";
795        }
796    
797        /**
798         * A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
799         *
800         */
801        static class Elements {
802    
803            static final String REQUIRES_SAVE = "requiresSave";
804            static final String EMAIL_NOTIFICATION = "emailNotification";
805            static final String NOTIFY_PRIMARY_DELEGATION = "notifyPrimaryDelegation";
806            static final String NOTIFY_SECONDARY_DELEGATION = "notifySecondaryDelegation";
807            static final String OPEN_NEW_WINDOW = "openNewWindow";
808            static final String SHOW_ACTION_REQUESTED = "showActionRequested";
809            static final String SHOW_DATE_CREATED = "showDateCreated";
810            static final String SHOW_DOCUMENT_STATUS = "showDocumentStatus";
811            static final String SHOW_APP_DOC_STATUS = "showAppDocStatus";
812            static final String SHOW_DOC_TYPE = "showDocType";
813            static final String SHOW_INITIATOR = "showInitiator";
814            static final String SHOW_DOC_TITLE = "showDocTitle";
815            static final String SHOW_WORKGROUP_REQUEST = "showWorkgroupRequest";
816            static final String SHOW_DELEGATOR = "showDelegator";
817            static final String SHOW_CLEAR_FYI = "showClearFyi";
818            static final String PAGE_SIZE = "pageSize";
819            static final String REFRESH_RATE = "refreshRate";
820            static final String COLOR_SAVED = "colorSaved";
821            static final String COLOR_INITIATED = "colorInitiated";
822            static final String COLOR_DISAPPROVED = "colorDisapproved";
823            static final String COLOR_ENROUTE = "colorEnroute";
824            static final String COLOR_APPROVED = "colorApproved";
825            static final String COLOR_FINAL = "colorFinal";
826            static final String COLOR_DISAPPROVE_CANCEL = "colorDisapproveCancel";
827            static final String COLOR_PROCESSED = "colorProcessed";
828            static final String COLOR_EXCEPTION = "colorException";
829            static final String COLOR_CANCELED = "colorCanceled";
830            static final String DELEGATOR_FILTER = "delegatorFilter";
831            static final String USE_OUTBOX = "useOutbox";
832            static final String SHOW_DATE_APPROVED = "showDateApproved";
833            static final String SHOW_CURRENT_NODE = "showCurrentNode";
834            static final String PRIMARY_DELEGATE_FILTER = "primaryDelegateFilter";
835            static final String NOTIFY_ACKNOWLEDGE = "notifyAcknowledge";
836            static final String NOTIFY_APPROVE = "notifyApprove";
837            static final String NOTIFY_COMPLETE = "notifyCompelte";
838            static final String NOTIFY_FYI = "notifyFYI";
839        }
840    
841        public static class KEYS {
842            public static final String COLOR_DISAPPROVED = "DOCUMENT_STATUS_COLOR_D";
843            public static final String COLOR_DISAPPROVE_CANCEL = "DOCUMENT_STATUS_COLOR_C";
844            public static final String COLOR_APPROVED = "DOCUMENT_STATUS_COLOR_A";
845            public static final String COLOR_CANCELED = "DOCUMENT_STATUS_COLOR_X";
846            public static final String COLOR_SAVED = "DOCUMENT_STATUS_COLOR_S";
847            public static final String COLOR_ENROUTE = "DOCUMENT_STATUS_COLOR_R";
848            public static final String COLOR_PROCESSED = "DOCUMENT_STATUS_COLOR_P";
849            public static final String COLOR_INITIATED = "DOCUMENT_STATUS_COLOR_I";
850            public static final String COLOR_FINAL = "DOCUMENT_STATUS_COLOR_F";
851            public static final String COLOR_EXCEPTION = "DOCUMENT_STATUS_COLOR_E";
852            public static final String REFRESH_RATE = "REFRESH_RATE";
853            public static final String OPEN_NEW_WINDOW = "OPEN_ITEMS_NEW_WINDOW";
854            public static final String SHOW_DOC_TYPE = "DOC_TYPE_COL_SHOW_NEW";
855            public static final String SHOW_DOC_TITLE = "TITLE_COL_SHOW_NEW";
856            public static final String SHOW_ACTION_REQUESTED = "ACTION_REQUESTED_COL_SHOW_NEW";
857            public static final String SHOW_INITIATOR = "INITIATOR_COL_SHOW_NEW";
858            public static final String SHOW_DELEGATOR = "DELEGATOR_COL_SHOW_NEW";
859            public static final String SHOW_DATE_CREATED = "DATE_CREATED_COL_SHOW_NEW";
860            public static final String SHOW_DOCUMENT_STATUS = "DOCUMENT_STATUS_COL_SHOW_NEW";
861            public static final String SHOW_APP_DOC_STATUS = "APP_DOC_STATUS_COL_SHOW_NEW";
862            public static final String SHOW_GROUP_REQUEST = "WORKGROUP_REQUEST_COL_SHOW_NEW";
863            public static final String SHOW_CLEAR_FYI = "CLEAR_FYI_COL_SHOW_NEW";
864            public static final String PAGE_SIZE = "ACTION_LIST_SIZE_NEW";
865            public static final String EMAIL_NOTIFICATION = "EMAIL_NOTIFICATION";
866            public static final String NOTIFY_PRIMARY_DELEGATION = "EMAIL_NOTIFY_PRIMARY";
867            public static final String NOTIFY_SECONDARY_DELEGATION = "EMAIL_NOTIFY_SECONDARY";
868            public static final String DEFAULT_COLOR = "white";
869            public static final String DEFAULT_ACTION_LIST_SIZE = "10";
870            public static final String DEFAULT_REFRESH_RATE = "15";
871            public static final String ERR_KEY_REFRESH_RATE_WHOLE_NUM = "preferences.refreshRate";
872            public static final String ERR_KEY_ACTION_LIST_PAGE_SIZE_WHOLE_NUM = "preferences.pageSize";
873            public static final String DELEGATOR_FILTER = "DELEGATOR_FILTER";
874            public static final String PRIMARY_DELEGATE_FILTER = "PRIMARY_DELEGATE_FILTER";
875            public static final String USE_OUT_BOX = "USE_OUT_BOX";
876            public static final String SHOW_DATE_APPROVED = "LAST_APPROVED_DATE_COL_SHOW_NEW";
877            public static final String SHOW_CURRENT_NODE = "CURRENT_NODE_COL_SHOW_NEW";
878            public static final String NOTIFY_ACKNOWLEDGE = "NOTIFY_ACKNOWLEDGE";
879            public static final String NOTIFY_APPROVE = "NOTIFY_APPROVE";
880            public static final String NOTIFY_COMPLETE = "NOTIFY_COMPLETE";
881            public static final String NOTIFY_FYI = "NOTIFY_FYI";
882        }
883    
884        public static class Cache {
885            public static final String NAME = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0 + "/" + Preferences.Constants.TYPE_NAME;
886        }
887    
888    }