Examples of Holiday


Examples of org.mifosplatform.organisation.holiday.domain.Holiday

            validateInputDates(command);

            final Set<Office> offices = getSelectedOffices(command);

            final Holiday holiday = Holiday.createNew(offices, command);

            this.holidayRepository.save(holiday);

            return new CommandProcessingResultBuilder().withCommandId(command.commandId()).withEntityId(holiday.getId()).build();
        } catch (final DataIntegrityViolationException dve) {
            handleDataIntegrityIssues(command, dve);
            return CommandProcessingResult.empty();
        }
    }
View Full Code Here

Examples of org.mifosplatform.organisation.holiday.domain.Holiday

        try {
            this.context.authenticatedUser();
            this.fromApiJsonDeserializer.validateForUpdate(command.json());

            final Holiday holiday = this.holidayRepository.findOneWithNotFoundDetection(command.entityId());
            Map<String, Object> changes = holiday.update(command);

            validateInputDates(holiday.getFromDateLocalDate(), holiday.getToDateLocalDate(), holiday.getRepaymentsRescheduledToLocalDate());

            if (changes.containsKey(officesParamName)) {
                final Set<Office> offices = getSelectedOffices(command);
                final boolean updated = holiday.update(offices);
                if (!updated) {
                    changes.remove(officesParamName);
                }
            }

            this.holidayRepository.saveAndFlush(holiday);

            return new CommandProcessingResultBuilder().withEntityId(holiday.getId()).with(changes).build();
        } catch (final DataIntegrityViolationException dve) {
            handleDataIntegrityIssues(command, dve);
            return CommandProcessingResult.empty();
        }
    }
View Full Code Here

Examples of org.mifosplatform.organisation.holiday.domain.Holiday

    @Transactional
    @Override
    public CommandProcessingResult activateHoliday(final Long holidayId) {
        this.context.authenticatedUser();
        final Holiday holiday = this.holidayRepository.findOneWithNotFoundDetection(holidayId);

        holiday.activate();
        this.holidayRepository.saveAndFlush(holiday);
        return new CommandProcessingResultBuilder().withEntityId(holiday.getId()).build();
    }
View Full Code Here

Examples of org.mifosplatform.organisation.holiday.domain.Holiday

    @Transactional
    @Override
    public CommandProcessingResult deleteHoliday(final Long holidayId) {
        this.context.authenticatedUser();
        final Holiday holiday = this.holidayRepository.findOneWithNotFoundDetection(holidayId);
        holiday.delete();
        this.holidayRepository.saveAndFlush(holiday);
        return new CommandProcessingResultBuilder().withEntityId(holidayId).build();
    }
View Full Code Here

Examples of org.spoutcraft.client.special.Holiday

    }
   
    if (vip != null && vip.getCape() != null) {
      playerCloakUrl = vip.getCape();
    } else {
      Holiday holiday = Resources.getHoliday();
      if (holiday != null && holiday.getCape() != null) {
        playerCloakUrl = holiday.getCape();
      }
    }   
    return playerCloakUrl;
  }
View Full Code Here

Examples of org.spoutcraft.client.special.Holiday

  public MainMenu() {
    splashText = new GenericLabel(getSplashText());
    updateBackgrounds();

    Holiday holiday = Resources.getHoliday();
    if (holiday != null) {
      splashText.setText(holiday.getSplash());
    }

    // Randomize background order
    Random rand = new Random();
    // Randomize by swapping the first background with a random background in the list
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.