net.sourceforge.javadpkg.plugin.cfg.DataEntry Maven / Gradle / Ivy
Show all versions of dpkg-maven-plugin Show documentation
/*
* dpkg - Debian Package library and the Debian Package Maven plugin
* (c) Copyright 2016 Gerrit Hohl
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package net.sourceforge.javadpkg.plugin.cfg;
import org.apache.maven.plugins.annotations.Parameter;
/**
*
* An entry in the {@link DataConfiguration}.
*
*
* @author Gerrit Hohl ([email protected])
* @version 1.0, 03.05.2016 by Gerrit Hohl
*/
public class DataEntry {
/** The source path. */
@Parameter(name = "sourcePath")
private String sourcePath;
/** The target path. */
@Parameter(name = "targetPath", required = true)
private String targetPath;
/** The symbolic link path. */
@Parameter(name = "symLinkPath")
private String symLinkPath;
/** The group ID. */
@Parameter(name = "groupId")
private Long groupId;
/** The group name. */
@Parameter(name = "groupName")
private String groupName;
/** The user ID. */
@Parameter(name = "userId")
private Long userId;
/** The user name. */
@Parameter(name = "userName")
private String userName;
/** The mode. */
@Parameter(name = "mode")
private Integer mode;
/** The flag if the directory should be included recursively. */
@Parameter(name = "recursive", defaultValue = "false")
private boolean recursive;
/** The flag if the file should be processed. */
@Parameter(name = "process", defaultValue = "false")
private boolean process;
/** The encoding for the processing. */
@Parameter(name = "encoding")
private String encoding;
/**
*
* Creates an entry.
*
*/
public DataEntry() {
super();
this.sourcePath = null;
this.targetPath = null;
this.symLinkPath = null;
this.groupId = null;
this.groupName = null;
this.userId = null;
this.userName = null;
this.mode = null;
this.recursive = false;
this.process = false;
this.encoding = null;
}
/**
*
* Creates an entry
*
*
* @param sourcePath
* The source path.
* @param targetPath
* The target path.
* @param symLinkPath
* The symbolic link path.
* @param groupId
* The group ID.
* @param groupName
* The group name.
* @param userId
* The user ID.
* @param userName
* The user name.
* @param mode
* The mode.
* @param recursive
* The flag if the directory should be included recursively.
* @param process
* The flag if the file should be processed.
* @param encoding
* The encoding for the processing.
*/
public DataEntry(String sourcePath, String targetPath, String symLinkPath, Long groupId, String groupName, Long userId,
String userName, Integer mode, boolean recursive, boolean process, String encoding) {
super();
this.sourcePath = sourcePath;
this.targetPath = targetPath;
this.symLinkPath = symLinkPath;
this.groupId = groupId;
this.groupName = groupName;
this.userId = userId;
this.userName = userName;
this.mode = mode;
this.recursive = recursive;
this.process = process;
this.encoding = encoding;
}
/**
*
* Returns the source path.
*
*
* @return The source path.
*/
public String getSourcePath() {
return this.sourcePath;
}
/**
*
* Sets the source path.
*
*
* @param sourcePath
* The source path.
*/
public void setSourcePath(String sourcePath) {
this.sourcePath = sourcePath;
}
/**
*
* Returns the target path.
*
*
* @return The target path.
*/
public String getTargetPath() {
return this.targetPath;
}
/**
*
* Sets the target path.
*
*
* @param targetPath
* The target path.
*/
public void setTargetPath(String targetPath) {
this.targetPath = targetPath;
}
/**
*
* Returns the symbolic link path.
*
*
* @return The symbolic link path.
*/
public String getSymLinkPath() {
return this.symLinkPath;
}
/**
*
* Sets the symbolic link path.
*
*
* @param symLinkPath
* The symbolic link path.
*/
public void setSymLinkPath(String symLinkPath) {
this.symLinkPath = symLinkPath;
}
/**
*
* Returns the group ID.
*
*
* @return The group ID.
*/
public Long getGroupId() {
return this.groupId;
}
/**
*
* Sets the group ID.
*
*
* @param groupId
* The group ID.
*/
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
/**
*
* Returns the group name.
*
*
* @return The group name.
*/
public String getGroupName() {
return this.groupName;
}
/**
*
* Sets the group name.
*
*
* @param groupName
* The group name.
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
*
* Returns the user ID.
*
*
* @return The user ID.
*/
public Long getUserId() {
return this.userId;
}
/**
*
* Sets the user ID.
*
*
* @param userId
* The user ID.
*/
public void setUserId(Long userId) {
this.userId = userId;
}
/**
*
* Returns the user name.
*
*
* @return The user name.
*/
public String getUserName() {
return this.userName;
}
/**
*
* Sets the user name.
*
*
* @param userName
* The user name.
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
*
* Returns the mode.
*
*
* @return The mode.
*/
public Integer getMode() {
return this.mode;
}
/**
*
* Sets the mode.
*
*
* @param mode
* The mode.
*/
public void setMode(Integer mode) {
this.mode = mode;
}
/**
*
* Returns the flag if the directory should be included recursively.
*
*
* This flag has only an effect if the source path is pointing on a
* directory.
*
*
* @return The flag: true
, if the directory should be included
* recursively, false
otherwise.
*/
public boolean isRecursive() {
return this.recursive;
}
/**
*
* Sets the flag if the directory should be included recursively.
*
*
* This flag has only an effect if the source path is pointing on a
* directory.
*
*
* @param recursive
* The flag: true
, if the directory should be
* included recursively, false
otherwise.
*/
public void setRecursive(boolean recursive) {
this.recursive = recursive;
}
/**
*
* Returns the flag if the file should be processed.
*
*
* This flag has only an effect if the source path is pointing on a regular
* file. Another possibility if the source path is pointing on a directory,
* but the recursive option is activated (see the {@link #isRecursive()}
* method). Then all found regular files are processed.
*
*
* All variables in that file will be replaced. Therefore it has to be a
* text file.
*
*
* @return The flag: true
, if the file should be processed,
* false
otherwise.
* @see #getEncoding()
*/
public boolean isProcess() {
return this.process;
}
/**
*
* Sets the flag if the file should be processed.
*
*
* This flag has only an effect if the source path is pointing on a regular
* file. Another possibility if the source path is pointing on a directory,
* but the recursive option is activated (see the {@link #isRecursive()}
* method). Then all found regular files are processed.
*
*
* All variables in that file will be replaced. Therefore it has to be a
* text file.
*
*
* @param process
* The flag: true
, if the file should be processed,
* false
otherwise.
* @see #setEncoding(String)
*/
public void setProcess(boolean process) {
this.process = process;
}
/**
*
* Returns the encoding of the file which should be processed.
*
*
* @return The encoding or null
, if the default encoding should
* be used.
* @see #isProcess()
*/
public String getEncoding() {
return this.encoding;
}
/**
*
* Sets the encoding of the file which should be processed.
*
*
* @param encoding
* The encoding or null
, if the default encoding
* should be used.
* @see #setProcess(boolean)
*/
public void setEncoding(String encoding) {
this.encoding = encoding;
}
}