public abstract class Utility extends Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static String |
checkJob(Object jobTopic,
Map<String,Object> properties)
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)
|
static List<org.apache.sling.api.resource.Resource> |
getSortedChildren(org.slf4j.Logger logger,
String type,
org.apache.sling.api.resource.Resource rsrc)
Helper method to read all children of a resource and sort them by name
|
static JobImpl |
readJob(org.slf4j.Logger logger,
org.apache.sling.api.resource.Resource resource)
Read a job
|
static org.osgi.service.event.Event |
toEvent(org.apache.sling.event.jobs.Job job)
Create an event from a job
|
static String |
toString(org.apache.sling.event.jobs.Job job)
Improved toString method for a job.
|
static String |
toString(String jobTopic,
Map<String,Object> properties)
Improved toString method for a job.
|
public static String checkJobTopic(Object jobTopic)
null if the topic is syntactically correct otherwise an error description is returnedpublic static String checkJob(Object jobTopic, Map<String,Object> properties)
null if the topic topic is correct and all properties are serializable,
otherwise an error description is returnedpublic static org.osgi.service.event.Event toEvent(org.apache.sling.event.jobs.Job job)
job - The jobpublic static String toString(String jobTopic, Map<String,Object> properties)
public static String toString(org.apache.sling.event.jobs.Job job)
public static JobImpl readJob(org.slf4j.Logger logger, org.apache.sling.api.resource.Resource resource)
public static List<org.apache.sling.api.resource.Resource> getSortedChildren(org.slf4j.Logger logger, String type, org.apache.sling.api.resource.Resource rsrc)
type - The type of resources (for debugging)rsrc - The parent resourceCopyright © 2007–2023 The Apache Software Foundation. All rights reserved.