
org.nuiton.topia.service.migration.version.TMSVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of topia-extension-migration Show documentation
Show all versions of topia-extension-migration Show documentation
ObServe ToPIA Migration service module
The newest version!
package org.nuiton.topia.service.migration.version;
/*
* #%L
* ObServe Toolkit :: ToPIA Migration service
* %%
* Copyright (C) 2017 - 2018 IRD, Ultreia.io
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* .
* #L%
*/
import org.apache.commons.lang3.StringUtils;
import org.nuiton.version.Version;
import org.nuiton.version.Versions;
import java.io.Serializable;
/**
* @author Tony Chemit - [email protected]
*/
public class TMSVersion implements Serializable {
private static final long serialVersionUID = 1L;
private String version;
public TMSVersion() {
}
public TMSVersion(String version) {
if (StringUtils.isEmpty(version)) {
throw new IllegalArgumentException("version parameter can not be null nor empty.");
}
this.version = version;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public Version toVersion() {
return StringUtils.isEmpty(version) ? null : Versions.valueOf(version);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy