uk.ac.soton.itinnovation.grid.service.sla.upgrade.v5_1_x.model
Class SLA5_1alpha

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.types.GridResource
      extended by uk.ac.soton.itinnovation.grid.service.sla.upgrade.v5_1_x.model.SLA5_1alpha

public class SLA5_1alpha
extends GridResource


Constructor Summary
SLA5_1alpha()
          Empty constructor required by Hibernate.
SLA5_1alpha(SLATemplate slat, org.apache.axis.message.addressing.EndpointReferenceType account, Calendar time, String label)
           
 
Method Summary
 void addActivity(Activity5_1alpha activity)
           
 void addConstraint(Constraint5_1alpha constraint)
           
 void addPermittedService(PermittedService service)
           
 void addPricingTerm(PricingTerm5_1alpha pricingTerm)
           
 void addUsageReport(Usage report)
          Add the report to the appropriate UsageSummary (creating it if it does not exist).
 void addUsageSummary(UsageSummary5_1alpha u)
           
 void closeNoActivities()
           
 boolean constrains(Metric metric)
           
 void continueActivityNoCheck(org.apache.axis.message.addressing.EndpointReferenceType activityEPR, Set<Constraint5_1alpha> actConstraints)
           
 org.apache.axis.message.addressing.EndpointReferenceType getAccount()
           
 Set<Activity5_1alpha> getActivities()
          Return all activities in this SLA, regardless of their state.
 TimePeriod getBillingPeriod()
           
 List<PeriodBill> getBills(GregorianCalendar now)
          Return all unbilled periods.
 Set<Metric> getConstrainedMetrics()
           
 Set<Constraint5_1alpha> getConstraints()
           
 List<Constraint5_1alpha> getConstraints(Metric metric)
           
 String getCurrency()
           
 GregorianCalendar getEndTime()
           
 List<PeriodBill> getFinalBills(GregorianCalendar now)
          Return all unbilled periods and the final bill for a partial period.
 GregorianCalendar getLastBillTime()
           
 List<PeriodBill> getPartialBill(GregorianCalendar now)
          Return subscription bill and usage bill from last bill time to now.
 Set<PermittedService> getPermittedServices()
           
 Set<Metric> getPricedMetrics()
           
 Set<PricingTerm5_1alpha> getPricingTerms()
           
 List<PricingTerm5_1alpha> getPricingTerms(Metric metric)
           
 Set<Constraint5_1alpha> getPublicConstraints()
           
 double getRate(Metric metric, GregorianCalendar time)
          Find the rate of use of resource "metric" at the time
 double getRateIncrease(Metric metric, GregorianCalendar start, GregorianCalendar end)
          Find the gross rate increase of use of resource "metric" between the two times
 double getRateIncreaseSafe(Metric metric, GregorianCalendar start, GregorianCalendar end)
           
 double getRateSafe(Metric metric, GregorianCalendar time)
           
 ResourcePool5_1alpha getResourcePool()
           
 String getResourceType()
          Return the PBAC type of the resource.
 GregorianCalendar getStartTime()
           
 SLAState getState()
           
 BigDecimal getSubscriptionFee()
           
 SLATemplate getTerms()
           
 double getUsage(Metric metric, GregorianCalendar time)
          Find the amount of resource "metric" used up to the time
 double getUsage(Metric metric, GregorianCalendar start, GregorianCalendar end)
          Find the amount of resource "metric" used between the two times
 List<UsageSummaryElement5_1alpha> getUsageEvents(Metric metric, GregorianCalendar start, GregorianCalendar end)
           
 Set<Metric> getUsageMetrics()
          Get the Set of Metrics that have had Usage reported in this SLA.
 double getUsageSafe(Metric metric, GregorianCalendar time)
           
 double getUsageSafe(Metric metric, GregorianCalendar start, GregorianCalendar end)
           
 UsageSummary5_1alpha getUsageSummary(Metric metric)
           
 Set<UsageSummary5_1alpha> getUsageSummarys()
           
 UsageSummary5_1alpha getUsageSummarySafe(Metric metric)
           
 Iterator<Activity5_1alpha> iterateActivities()
          Get an iterator for all the Activities in this SLA, ordered most recent startTimeDate first.
 boolean permitsEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
           
 void sendBills(List<PeriodBill> bills)
           
 void setAccount(org.apache.axis.message.addressing.EndpointReferenceType account)
           
 void setActivities(Set<Activity5_1alpha> argActivities)
           
 void setBillingPeriod(TimePeriod argBillingPeriod)
           
 void setConstraints(Set<Constraint5_1alpha> argConstraints)
           
 void setCurrency(String argCurrency)
           
 void setEndTime(GregorianCalendar argEndTime)
           
 void setLastBillTime(GregorianCalendar argLastBillTime)
           
 void setPermittedServices(Set<PermittedService> argPermittedServices)
           
 void setPricingTerms(Set<PricingTerm5_1alpha> argPricingTerms)
           
 void setResourcePool(ResourcePool5_1alpha argResourcePool)
          The ResourcePool.addSLA() method calls this method.
 void setStartTime(GregorianCalendar argStartTime)
           
 void setState(SLAState argState)
           
 void setSubscriptionFee(BigDecimal fee)
           
 void setUsageSummarys(Set<UsageSummary5_1alpha> argUsageSummarys)
           
 Activity5_1alpha startActivityNoCheck(org.apache.axis.message.addressing.EndpointReferenceType activityEPR, Set<Constraint5_1alpha> actConstraints)
           
 
Methods inherited from class uk.ac.soton.itinnovation.grid.service.types.GridResource
equalsByValue, getLabel, getManagementResource, getResourceID, includeInGetResources, setLabel, setManagementResource, setResourceID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLA5_1alpha

public SLA5_1alpha()
Empty constructor required by Hibernate.


SLA5_1alpha

public SLA5_1alpha(SLATemplate slat,
                   org.apache.axis.message.addressing.EndpointReferenceType account,
                   Calendar time,
                   String label)
Method Detail

getResourceType

public String getResourceType()
Description copied from class: GridResource
Return the PBAC type of the resource.

Specified by:
getResourceType in class GridResource

getTerms

public SLATemplate getTerms()
                     throws GridFailureException
Throws:
GridFailureException

getAccount

public org.apache.axis.message.addressing.EndpointReferenceType getAccount()

setAccount

public void setAccount(org.apache.axis.message.addressing.EndpointReferenceType account)

getPermittedServices

public Set<PermittedService> getPermittedServices()

setPermittedServices

public void setPermittedServices(Set<PermittedService> argPermittedServices)

getActivities

public Set<Activity5_1alpha> getActivities()
Return all activities in this SLA, regardless of their state.


setActivities

public void setActivities(Set<Activity5_1alpha> argActivities)

getConstraints

public Set<Constraint5_1alpha> getConstraints()

setConstraints

public void setConstraints(Set<Constraint5_1alpha> argConstraints)

getPublicConstraints

public Set<Constraint5_1alpha> getPublicConstraints()

getPricingTerms

public Set<PricingTerm5_1alpha> getPricingTerms()

setPricingTerms

public void setPricingTerms(Set<PricingTerm5_1alpha> argPricingTerms)

getUsageSummarys

public Set<UsageSummary5_1alpha> getUsageSummarys()

setUsageSummarys

public void setUsageSummarys(Set<UsageSummary5_1alpha> argUsageSummarys)

getStartTime

public GregorianCalendar getStartTime()

setStartTime

public void setStartTime(GregorianCalendar argStartTime)

getEndTime

public GregorianCalendar getEndTime()

setEndTime

public void setEndTime(GregorianCalendar argEndTime)

getBillingPeriod

public TimePeriod getBillingPeriod()

setBillingPeriod

public void setBillingPeriod(TimePeriod argBillingPeriod)

getState

public SLAState getState()

setState

public void setState(SLAState argState)

getLastBillTime

public GregorianCalendar getLastBillTime()

setLastBillTime

public void setLastBillTime(GregorianCalendar argLastBillTime)

getSubscriptionFee

public BigDecimal getSubscriptionFee()

setSubscriptionFee

public void setSubscriptionFee(BigDecimal fee)

getResourcePool

public ResourcePool5_1alpha getResourcePool()

setResourcePool

public void setResourcePool(ResourcePool5_1alpha argResourcePool)
The ResourcePool.addSLA() method calls this method.


getCurrency

public String getCurrency()

setCurrency

public void setCurrency(String argCurrency)

addPermittedService

public void addPermittedService(PermittedService service)

addActivity

public void addActivity(Activity5_1alpha activity)

addConstraint

public void addConstraint(Constraint5_1alpha constraint)

getConstraints

public List<Constraint5_1alpha> getConstraints(Metric metric)

addPricingTerm

public void addPricingTerm(PricingTerm5_1alpha pricingTerm)

getPricingTerms

public List<PricingTerm5_1alpha> getPricingTerms(Metric metric)

addUsageSummary

public void addUsageSummary(UsageSummary5_1alpha u)

getUsageMetrics

public Set<Metric> getUsageMetrics()
Get the Set of Metrics that have had Usage reported in this SLA.


getConstrainedMetrics

public Set<Metric> getConstrainedMetrics()

getPricedMetrics

public Set<Metric> getPricedMetrics()

getUsageSummary

public UsageSummary5_1alpha getUsageSummary(Metric metric)

getUsageSummarySafe

public UsageSummary5_1alpha getUsageSummarySafe(Metric metric)

getUsageEvents

public List<UsageSummaryElement5_1alpha> getUsageEvents(Metric metric,
                                                        GregorianCalendar start,
                                                        GregorianCalendar end)

addUsageReport

public void addUsageReport(Usage report)
Add the report to the appropriate UsageSummary (creating it if it does not exist). This should be called by the Activity.addUsageReport() method rather than directly. It has the side-effect of adding the usage report to the resourcePool.


getUsage

public double getUsage(Metric metric,
                       GregorianCalendar start,
                       GregorianCalendar end)
Find the amount of resource "metric" used between the two times


getUsageSafe

public double getUsageSafe(Metric metric,
                           GregorianCalendar start,
                           GregorianCalendar end)

getUsage

public double getUsage(Metric metric,
                       GregorianCalendar time)
Find the amount of resource "metric" used up to the time


getUsageSafe

public double getUsageSafe(Metric metric,
                           GregorianCalendar time)

getRate

public double getRate(Metric metric,
                      GregorianCalendar time)
Find the rate of use of resource "metric" at the time


getRateSafe

public double getRateSafe(Metric metric,
                          GregorianCalendar time)

getRateIncrease

public double getRateIncrease(Metric metric,
                              GregorianCalendar start,
                              GregorianCalendar end)
Find the gross rate increase of use of resource "metric" between the two times


getRateIncreaseSafe

public double getRateIncreaseSafe(Metric metric,
                                  GregorianCalendar start,
                                  GregorianCalendar end)

startActivityNoCheck

public Activity5_1alpha startActivityNoCheck(org.apache.axis.message.addressing.EndpointReferenceType activityEPR,
                                             Set<Constraint5_1alpha> actConstraints)

continueActivityNoCheck

public void continueActivityNoCheck(org.apache.axis.message.addressing.EndpointReferenceType activityEPR,
                                    Set<Constraint5_1alpha> actConstraints)

getBills

public List<PeriodBill> getBills(GregorianCalendar now)
Return all unbilled periods.


getFinalBills

public List<PeriodBill> getFinalBills(GregorianCalendar now)
Return all unbilled periods and the final bill for a partial period.


getPartialBill

public List<PeriodBill> getPartialBill(GregorianCalendar now)
Return subscription bill and usage bill from last bill time to now.


sendBills

public void sendBills(List<PeriodBill> bills)
               throws GridFailureException
Throws:
GridFailureException

permitsEPR

public boolean permitsEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)

constrains

public boolean constrains(Metric metric)

closeNoActivities

public void closeNoActivities()

iterateActivities

public Iterator<Activity5_1alpha> iterateActivities()
Get an iterator for all the Activities in this SLA, ordered most recent startTimeDate first. Calling next() on the iterator returned will evict each previous Activity. Must have a current session.



Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.