|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.zos.jdl.ComputedFactContext
public class ComputedFactContext
ComputedFactContext provides access to the evaluation context.
The context contains the Grid Objects that the constraint engine is using
to evaluate constraints. The ComputedFactContext provides
access to the current job instance, deployed job, user, resource, vm host,
repository grid objects if they are available in the current context.
The VmHost and Repository Grid Objects are only in the context for the evaluation of the provisioning constraints such as vmHost. The Job and Job Instance objects are only in the context for a resource or allocation constraint evaluation.
Example to retrieve the current job instance in which a computed fact is being executed during a resource constraint:
class myComputedFact(ComputedFact):
def compute(self):
ctx = self.getContext()
if ctx == None:
print "No context"
...
else:
jobInstance = ctx.getJobInstance()
if jobInstance == None:
print "No job instance in context"
...
else:
print "jobInstance.id=%s" % (jobInstance.getFact("jobinstance.id"))
...
| Method Summary | |
|---|---|
JobInfo |
getJob()
Retrieve the JobInfo Grid Object from the context for a
Computed Fact evaluation. |
JobInstanceInfo |
getJobInstance()
Retrieve the JobInstanceInfo Grid Object from the context for a
Computed Fact evaluation. |
RepositoryInfo |
getRepository()
Retrieve the RepositoryInfo Grid Object from the context for a
Computed Fact evaluation. |
ResourceInfo |
getResource()
Retrieve the ResourceInfo Grid Object from the context for a
Computed Fact evaluation. |
UserInfo |
getUser()
Retrieve the UserInfo Grid Object from the context for a
Computed Fact evaluation. |
VMHostInfo |
getVmHost()
Retrieve the VmHostInfo Grid Object from the context for a
Computed Fact evaluation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public UserInfo getUser()
UserInfo Grid Object from the context for a
Computed Fact evaluation.
The returned Grid Object allows read-only access to it's factset.
For example, when a computed fact is evaluated in the context of a
Start constraint, the returned UserInfo Grid Object provides
access to the factset of the user who started the job.
UserInfo Grid Object for this computed fact evaluation. None if object is not in the contextpublic JobInfo getJob()
JobInfo Grid Object from the context for a
Computed Fact evaluation.
The returned Grid Object allows read-only access to it's factset.
For example, when a computed fact is evaluated in the context of a
Start constraint, the returned JobInfo Grid Object provides
access to the factset of the deployed job.
JobInfo Grid Object for this computed fact evaluation. None if object is not in the contextpublic ResourceInfo getResource()
ResourceInfo Grid Object from the context for a
Computed Fact evaluation.
The returned Grid Object allows read-only access to it's factset.
For example, when a computed fact is evaluated in the context of a
resource constraint, the returned ResourceInfo Grid Object provides
access to the factset of the resource.
ResourceInfo Grid Object for this computed fact evaluation. None if object is not in the contextpublic JobInstanceInfo getJobInstance()
JobInstanceInfo Grid Object from the context for a
Computed Fact evaluation.
The returned Grid Object allows read-only access to it's factset.
For example, when a computed fact is evaluated in the context of a
Start constraint, the returned JobInstanceInfo Grid Object provides
access to the factset of the current job instance.
JobInstanceInfo representing a job instance for this computed fact evaluation. None if object is not in the contextpublic VMHostInfo getVmHost()
VmHostInfo Grid Object from the context for a
Computed Fact evaluation.
The returned Grid Object allows read-only access to it's factset.
For example, when a computed fact is evaluated in the context of a
vm host constraint, the returned VmHostInfo Grid Object provides
access to the factset of a vm host.
VmHostInfo Grid Object for this computed fact evaluation. None if object is not in the contextpublic RepositoryInfo getRepository()
RepositoryInfo Grid Object from the context for a
Computed Fact evaluation.
The returned Grid Object allows read-only access to it's factset.
For example, when a computed fact is evaluated in the context of a
repository constraint, the returned RepositoryInfo Grid Object provides
access to the factset of a repository.
RepositoryInfo representing a repository instance for this computed fact evaluation. None if object is not in the context
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||