Package org.apache.sling.event.impl.jobs
Class Utility
java.lang.Object
org.apache.sling.event.impl.jobs.Utility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringCheck the job.static StringcheckJobTopic(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 JobImplRead a jobstatic org.osgi.service.event.EventtoEvent(org.apache.sling.event.jobs.Job job) Create an event from a jobstatic StringImproved toString method for a job.static StringtoString(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:
nullif the topic is syntactically correct otherwise an error description is returned
-
checkJob
Check the job.- Returns:
nullif 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.
-