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 java.lang.Object


Field Summary
static java.lang.String PROPERTY_TIME
          Event property containing the time for job start and job finished events.
 
Constructor Summary
Utility()
           
 
Method Summary
static java.lang.String filter(java.lang.String nodeName)
          Filter the node name for not allowed characters and replace them.
static java.lang.StringBuilder getAnonPath(java.util.Calendar now)
           
static java.lang.String getUniquePath(java.lang.String jobTopic, java.lang.String jobId)
          Create a unique node path (folder and name) for the job.
static java.lang.String md5(java.lang.String data)
          Calculate an MD5 hash of the string given using 'utf-8' encoding.
static void sendNotification(EnvironmentComponent environment, java.lang.String topic, org.osgi.service.event.Event job, java.lang.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 java.lang.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 java.lang.String filter(java.lang.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 java.lang.String md5(java.lang.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 java.lang.String getUniquePath(java.lang.String jobTopic,
                                             java.lang.String jobId)
Create a unique node path (folder and name) for the job.


getAnonPath

public static java.lang.StringBuilder getAnonPath(java.util.Calendar now)

sendNotification

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



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