org.apache.sling.event.impl.jobs
Class Utility

java.lang.Object
  extended by org.apache.sling.event.impl.jobs.Utility

public abstract class Utility
extends Object


Field Summary
static String PROPERTY_TIME
          Event property containing the time for job start and job finished events.
 
Constructor Summary
Utility()
           
 
Method Summary
static String filter(String nodeName)
          Filter the node name for not allowed characters and replace them.
static StringBuilder getAnonPath(Calendar now)
           
static String getUniquePath(String jobTopic, String jobId)
          Create a unique node path (folder and name) for the job.
static String md5(String data)
          Calculate an MD5 hash of the string given using 'utf-8' encoding.
static void sendNotification(EnvironmentComponent environment, String topic, org.osgi.service.event.Event job, Long time)
          Helper method for sending the notification events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_TIME

public static final String PROPERTY_TIME
Event property containing the time for job start and job finished events.

See Also:
Constant Field Values
Constructor Detail

Utility

public Utility()
Method Detail

filter

public static String filter(String nodeName)
Filter the node name for not allowed characters and replace them.

Parameters:
nodeName - The suggested node name.
Returns:
The filtered node name.

md5

public static String md5(String data)
Calculate an MD5 hash of the string given using 'utf-8' encoding.

Parameters:
data - the data to encode
Returns:
a hex encoded string of the md5 digested input

getUniquePath

public static String getUniquePath(String jobTopic,
                                   String jobId)
Create a unique node path (folder and name) for the job.


getAnonPath

public static StringBuilder getAnonPath(Calendar now)

sendNotification

public static void sendNotification(EnvironmentComponent environment,
                                    String topic,
                                    org.osgi.service.event.Event job,
                                    Long time)
Helper method for sending the notification events.



Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.