Class RepositoryJobExecutionContext
- java.lang.Object
-
- org.onehippo.repository.scheduling.RepositoryJobExecutionContext
-
public class RepositoryJobExecutionContext extends Object
Context object containing operational information and helper objects for use byRepositoryJob
s to do their job.
-
-
Constructor Summary
Constructors Constructor Description RepositoryJobExecutionContext(javax.jcr.Session systemSession, Map<String,String> attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.jcr.Session
createSession(javax.jcr.Credentials credentials)
Create a session with the given credentials.javax.jcr.Session
createSystemSession()
Get a system session.String
getAttribute(String name)
Get an attribute value.Collection<String>
getAttributeNames()
javax.jcr.Session
getSession(javax.jcr.Credentials credentials)
Deprecated.usecreateSession(javax.jcr.Credentials)
insteadjavax.jcr.Session
getSystemSession()
Deprecated.usecreateSystemSession()
instead
-
-
-
Method Detail
-
getSession
@Deprecated public javax.jcr.Session getSession(javax.jcr.Credentials credentials) throws javax.jcr.LoginException, javax.jcr.RepositoryException
Deprecated.usecreateSession(javax.jcr.Credentials)
insteadGet a session with the given credentials. Caller must log out the returned session after use.- Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException
-
createSession
public javax.jcr.Session createSession(javax.jcr.Credentials credentials) throws javax.jcr.LoginException, javax.jcr.RepositoryException
Create a session with the given credentials. Caller must log out the returned session after use.- Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException
-
getSystemSession
@Deprecated public javax.jcr.Session getSystemSession() throws javax.jcr.LoginException, javax.jcr.RepositoryException
Deprecated.usecreateSystemSession()
insteadCreate a system session. Caller must log out the returned session after use.- Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException
-
createSystemSession
public javax.jcr.Session createSystemSession() throws javax.jcr.LoginException, javax.jcr.RepositoryException
Get a system session. Caller must log out the returned session after use.- Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException
-
getAttribute
public String getAttribute(String name)
Get an attribute value. You can pass attributes to this context object throughRepositoryJobInfo.setAttribute(String, String)
.- Parameters:
name
- the name of the attribute.- Returns:
- the attribute value associated with name.
-
getAttributeNames
public Collection<String> getAttributeNames()
- Returns:
- the collection of all the attribute names.
-
-