001package org.apache.maven.wagon.repository;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import java.io.Serializable;
023
024/**
025 * Describes the permissions to set on files uploaded to the repository.
026 *
027 * @author Brett Porter
028 *
029 */
030public class RepositoryPermissions implements Serializable
031{
032    /**
033     * Repository group name.
034     */
035    private String group;
036
037    /**
038     * Repository directory mode. Modes can be in either textual (ugo+rx) or octal (755) form.
039     */
040    private String directoryMode;
041
042    /**
043     * Repository file mode. Modes can be in either textual (ugo+rx) or octal (644) form.
044     */
045    private String fileMode;
046
047    /**
048     * Get the repository directory mode to which an artifact will belong to after
049     * deployment. Not all protocols permit the changing of the mode.
050     *
051     * @return mode
052     */
053    public String getDirectoryMode()
054    {
055        return directoryMode;
056    }
057
058    /**
059     * Set the repository directory mode for the deployed artifact.
060     *
061     * @param directoryMode repository directory mode for deployed artifacts
062     */
063    public void setDirectoryMode( final String directoryMode )
064    {
065        this.directoryMode = directoryMode;
066    }
067
068    /**
069     * Get the repository file mode to which an artifact will belong to after
070     * deployment. Not all protocols permit the changing of the artifact mode.
071     *
072     * @return repository group name
073     */
074    public String getFileMode()
075    {
076        return fileMode;
077    }
078
079    /**
080     * Set the repository file mode for the deployed artifact.
081     *
082     * @param fileMode repository file mode for deployed artifacts
083     */
084    public void setFileMode( final String fileMode )
085    {
086        this.fileMode = fileMode;
087    }
088
089    /**
090     * Get the repository group name to which an artifact will belong to after
091     * deployment. Not all protocols permit the changing of the artifact
092     * group.
093     *
094     * @return repository group name
095     */
096    public String getGroup()
097    {
098        return group;
099    }
100
101    /**
102     * Set the repository group name for the deployed artifact.
103     *
104     * @param group repository group for deployed artifacts
105     */
106    public void setGroup( final String group )
107    {
108        this.group = group;
109    }
110
111}