core-api/src/main/java/org/arrowhead/wp5/core/impl/FlexOfferAgent.java
@Override
	public void createFlexOfferSchedule(int flexOfferId,
			FlexOfferSchedule flexOfferSchedule) throws FlexOfferException {

		FlexOffer fo = this.getFlexOffer(flexOfferId);

		if (fo != null) {
			if (flexOfferSchedule != null && flexOfferSchedule.isCorrect(fo)) {
				fo.setState(FlexOfferState.Assigned);
				fo.setFlexOfferSchedule(flexOfferSchedule);
				String derId = this.getDerIdFromFlexOffer(flexOfferId);
				AbstractDER ader = this.getAgentDer(Integer.parseInt(derId));
				ader.updateSchedule(fo);
			} else
				throw new FlexOfferException(
						"The flex-offer schedule is incorrect!");
		}
		this.foLst.onFlexOfferScheduleUpdate(fo);
	}
/**
	 * This is called to create a schedule for a given FOA flex-offer
	 */
This is called to create a schedule for a given FOA flex-offer
This is called to create a schedule for a given FOA flex - offer
@Override
	public void createFlexOfferSchedule(int flexOfferId,
			FlexOfferSchedule flexOfferSchedule) throws FlexOfferException {
		FlexOffer fo = this.getFlexOffer(flexOfferId);
		if (fo != null) {
			if (flexOfferSchedule != null && flexOfferSchedule.isCorrect(fo)) {
				fo.setState(FlexOfferState.Assigned);
				fo.setFlexOfferSchedule(flexOfferSchedule);
				String derId = this.getDerIdFromFlexOffer(flexOfferId);
				AbstractDER ader = this.getAgentDer(Integer.parseInt(derId));
				ader.updateSchedule(fo);
			} else
				throw new FlexOfferException(
						"The flex-offer schedule is incorrect!");
		}
		this.foLst.onFlexOfferScheduleUpdate(fo);
	}
@ Override public void createFlexOfferSchedule ( int flexOfferId , FlexOfferSchedule flexOfferSchedule ) throws FlexOfferException { FlexOffer fo = this . getFlexOffer ( flexOfferId ) ; if ( fo != null ) { if ( flexOfferSchedule != null && flexOfferSchedule . isCorrect ( fo ) ) { fo . setState ( FlexOfferState . Assigned ) ; fo . setFlexOfferSchedule ( flexOfferSchedule ) ; String derId = this . getDerIdFromFlexOffer ( flexOfferId ) ; AbstractDER ader = this . getAgentDer ( Integer . parseInt ( derId ) ) ; ader . updateSchedule ( fo ) ; } else throw new FlexOfferException ( "The flex-offer schedule is incorrect!" ) ; } this . foLst . onFlexOfferScheduleUpdate ( fo ) ; }
This is called to create a schedule for a given FOA flex-offer
This is called to create a schedule for a given FOA flex - offer