001    package railo.runtime.schedule;
002    
003    import java.net.URL;
004    
005    import railo.commons.io.res.Resource;
006    import railo.commons.security.Credentials;
007    import railo.runtime.net.proxy.ProxyData;
008    import railo.runtime.type.dt.Date;
009    import railo.runtime.type.dt.Time;
010    
011    
012    /**
013     * a single scheduler task
014     */
015    public interface ScheduleTask {
016    
017        /**
018         * Field <code>OPERATION_HTTP_REQUEST</code>
019         */
020        public static final short OPERATION_HTTP_REQUEST = 0;
021    
022        /**
023         * Field <code>INTERVAL_ONCE</code>
024         */
025        public static final int INTERVAL_ONCE = 0;
026    
027        /**
028         * Field <code>INTERVAL_DAY</code>
029         */
030        public static final int INTERVAL_DAY = 1;
031    
032        /**
033         * Field <code>INTERVAL_WEEK</code>
034         */
035        public static final int INTERVAL_WEEK = 2;
036    
037        /**
038         * Field <code>INTERVAL_MONTH</code>
039         */
040        public static final int INTERVAL_MONTH = 3;
041    
042        /**
043         * @return Returns the credentials.
044         */
045        public abstract Credentials getCredentials();
046    
047        /**
048         * @return Returns has credentials.
049         */
050        public abstract boolean hasCredentials();
051    
052    
053        /**
054         * @return Returns the file.
055         */
056        public abstract Resource getResource();
057    
058        /**
059         * @return Returns the interval.
060         */
061        public abstract int getInterval();
062    
063        /**
064         * @return Returns the operation.
065         */
066        public abstract short getOperation();
067    
068        /**
069         * @return Returns the proxyHost.
070         */
071        public abstract ProxyData getProxyData();
072    
073    
074        /**
075         * @return Returns the resolveURL.
076         */
077        public abstract boolean isResolveURL();
078    
079        /**
080         * @return Returns the task.
081         */
082        public abstract String getTask();
083    
084        /**
085         * @return Returns the timeout.
086         */
087        public abstract long getTimeout();
088    
089        /**
090         * @return Returns the url.
091         */
092        public abstract URL getUrl();
093    
094        /**
095         * @param nextExecution
096         */
097        public abstract void setNextExecution(long nextExecution);
098    
099        /**
100         * @return Returns the nextExecution.
101         */
102        public abstract long getNextExecution();
103    
104        /**
105         * @return Returns the endDate.
106         */
107        public abstract Date getEndDate();
108    
109        /**
110         * @return Returns the startDate.
111         */
112        public abstract Date getStartDate();
113    
114        /**
115         * @return Returns the endTime.
116         */
117        public abstract Time getEndTime();
118    
119        /**
120         * @return Returns the startTime.
121         */
122        public abstract Time getStartTime();
123    
124        /**
125         * @return returns interval definition as String
126         */
127        public abstract String getIntervalAsString();
128    
129        /**
130         * @return Returns the strInterval.
131         */
132        public abstract String getStringInterval();
133    
134        /**
135         * @return Returns the publish.
136         */
137        public abstract boolean isPublish();
138    
139        /**
140         * @return Returns the valid.
141         */
142        public abstract boolean isValid();
143    
144        /**
145         * @param valid The valid to set.
146         */
147        public abstract void setValid(boolean valid);
148    
149            /**
150             * @return the hidden
151             */
152            public boolean isHidden();
153    
154            /**
155             * @param hidden the hidden to set
156             */
157            public void setHidden(boolean hidden);
158    
159            public boolean isPaused();
160    }