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(Session systemSession, Map<String,String> attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Session
createSession(Credentials credentials)
Create a session with the given credentials.Session
createSystemSession()
Get a system session.String
getAttribute(String name)
Get an attribute value.Collection<String>
getAttributeNames()
Session
getSession(Credentials credentials)
Deprecated.usecreateSession(javax.jcr.Credentials)
insteadSession
getSystemSession()
Deprecated.usecreateSystemSession()
instead
-
-
-
Method Detail
-
getSession
@Deprecated public Session getSession(Credentials credentials) throws LoginException, RepositoryException
Deprecated.usecreateSession(javax.jcr.Credentials)
insteadGet a session with the given credentials. Caller must log out the returned session after use.- Throws:
LoginException
RepositoryException
-
createSession
public Session createSession(Credentials credentials) throws LoginException, RepositoryException
Create a session with the given credentials. Caller must log out the returned session after use.- Throws:
LoginException
RepositoryException
-
getSystemSession
@Deprecated public Session getSystemSession() throws LoginException, RepositoryException
Deprecated.usecreateSystemSession()
insteadCreate a system session. Caller must log out the returned session after use.- Throws:
LoginException
RepositoryException
-
createSystemSession
public Session createSystemSession() throws LoginException, RepositoryException
Get a system session. Caller must log out the returned session after use.- Throws:
LoginException
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.
-
-