private void validateNameUniqueness(VolumeTemplate template) { if (objectManager.find(VolumeTemplate.class, VOLUME_TEMPLATE.REMOVED, null, VOLUME_TEMPLATE.STACK_ID, template.getStackId(), VOLUME_TEMPLATE.NAME, template.getName()).size() > 0) { throw new ValidationErrorException(ValidationErrorCodes.NOT_UNIQUE, "name"); } }
null, true); volumesData.put(volume.getName(), composeVolumeData);
VOLUME.REMOVED, null, VOLUME.NAME, template.getName()); if (volume == null) { throw new ServiceInstanceAllocateException("Failed to locate volume for instance of deployment unit ["
/** * {@inheritDoc} */ @Override public void from(io.cattle.platform.core.model.VolumeTemplate from) { setId(from.getId()); setName(from.getName()); setAccountId(from.getAccountId()); setKind(from.getKind()); setUuid(from.getUuid()); setDescription(from.getDescription()); setState(from.getState()); setCreated(from.getCreated()); setRemoved(from.getRemoved()); setRemoveTime(from.getRemoveTime()); setData(from.getData()); setDriver(from.getDriver()); setStackId(from.getStackId()); setExternal(from.getExternal()); setPerContainer(from.getPerContainer()); }