Package org.apache.sling.event.impl.jobs
Class Utility
java.lang.Object
org.apache.sling.event.impl.jobs.Utility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Check the job.static String
checkJobTopic
(Object jobTopic) Check if the job topic is a valid OSGI event name (see 113.3.1 of the OSGI spec)getSortedChildren
(org.slf4j.Logger logger, String type, Resource rsrc) Helper method to read all children of a resource and sort them by namestatic JobImpl
Read a jobstatic org.osgi.service.event.Event
toEvent
(org.apache.sling.event.jobs.Job job) Create an event from a jobstatic String
Improved toString method for a job.static String
toString
(org.apache.sling.event.jobs.Job job) Improved toString method for a job.
-
Constructor Details
-
Utility
public Utility()
-
-
Method Details
-
checkJobTopic
Check if the job topic is a valid OSGI event name (see 113.3.1 of the OSGI spec)- Returns:
null
if the topic is syntactically correct otherwise an error description is returned
-
checkJob
Check the job.- Returns:
null
if the topic topic is correct and all properties are serializable, otherwise an error description is returned
-
toEvent
public static org.osgi.service.event.Event toEvent(org.apache.sling.event.jobs.Job job) Create an event from a job- Parameters:
job
- The job- Returns:
- New event object.
-
toString
Improved toString method for a job. This method prints out the job topic and all of the properties. -
toString
Improved toString method for a job. This method prints out the job topic and all of the properties. -
readJob
Read a job -
getSortedChildren
Helper method to read all children of a resource and sort them by name- Parameters:
type
- The type of resources (for debugging)rsrc
- The parent resource- Returns:
- Sorted list of children.
-