/*
 * JBoss, Home of Professional Open Source.
 * Copyright 2014, Red Hat, Inc., and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package org.jboss.aesh.console.settings;

/**
 * <code>FileAccessPermission</code> defines file access permission like readable, writable.
 * 
 * <i>readable</i> and <i>writable</i> will be true by default.
 * 
 * @author Lin Gao <lgao@redhat.com>
 *
 */
public class FileAccessPermission {
    
    private boolean readable = true;
    
    private boolean readableOwnerOnly;
    
    private boolean writable = true;
    
    private boolean writableOwnerOnly;
    
    private boolean executable = false;
    
    private boolean executableOwnerOnly;
    
    /**
     * Default constructor
     */
    public FileAccessPermission() {
        super();
    }
    
    /**
     * @return the executable
     */
    public boolean isExecutable() {
        return executable;
    }

    /**
     * @param executable the executable to set
     */
    public void setExecutable(boolean executable) {
        this.executable = executable;
    }

    /**
     * @return the executableOwnerOnly
     */
    public boolean isExecutableOwnerOnly() {
        return executableOwnerOnly;
    }

    /**
     * @param executableOwnerOnly the executableOwnerOnly to set
     */
    public void setExecutableOwnerOnly(boolean executableOwnerOnly) {
        this.executableOwnerOnly = executableOwnerOnly;
    }

    /**
     * @return the readable
     */
    public boolean isReadable() {
        return readable;
    }

    /**
     * @param readable the readable to set
     */
    public void setReadable(boolean readable) {
        this.readable = readable;
    }

    /**
     * @return the readableOwnerOnly
     */
    public boolean isReadableOwnerOnly() {
        return readableOwnerOnly;
    }

    /**
     * @param readableOwnerOnly the readableOwnerOnly to set
     */
    public void setReadableOwnerOnly(boolean readableOwnerOnly) {
        this.readableOwnerOnly = readableOwnerOnly;
    }

    /**
     * @return the writable
     */
    public boolean isWritable() {
        return writable;
    }

    /**
     * @param writable the writable to set
     */
    public void setWritable(boolean writable) {
        this.writable = writable;
    }

    /**
     * @return the writableOwnerOnly
     */
    public boolean isWritableOwnerOnly() {
        return writableOwnerOnly;
    }

    /**
     * @param writableOwnerOnly the writableOwnerOnly to set
     */
    public void setWritableOwnerOnly(boolean writableOwnerOnly) {
        this.writableOwnerOnly = writableOwnerOnly;
    }
    
}

@@ -38,17 +38,16 @@
 n Source
-.
 %0A * Copy
@@ -60,17 +60,16 @@
 2014
-,
  Red Hat
 , In
@@ -68,30 +68,45 @@
  Hat
-,
  Inc.
-,
  and
- individual
+/or its affiliates and other
  con
@@ -149,14 +149,38 @@
 thor
+s
  tag
-s
 .
+ All rights reserved.%0A *
  See
@@ -202,22 +202,14 @@
 txt 
-file 
 in the
-%0A *
  dis
@@ -223,16 +223,19 @@
 on for a
+%0A *
  full li
@@ -278,131 +278,138 @@
 %0A * 
-This is free software; you can redistribute it and/or modify it%0A * under the terms of the GNU Lesser General Public
+Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the
  License
  as%0A
@@ -408,145 +408,170 @@
 ense
- as
+.
 %0A * 
-published by the Free Software Foundation; either version 2.1 of%0A * the License, or (at your option) any later version.%0A *%0A * This
+You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing,
  sof
@@ -575,19 +575,19 @@
 software
- is
+%0A *
  distrib
@@ -595,50 +595,64 @@
 ted 
-in the hope that it will be useful
+under the License is distributed on an %22AS IS%22 BASIS
 ,%0A *
- but
  WIT
@@ -660,440 +660,176 @@
 OUT 
-ANY 
 WARRANT
-Y; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this software; if not, write to the Free%0A * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA%0A * 02110-1301 USA, or see the FSF site: http://www.fsf.org
+IES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License
 .%0A *
@@ -968,25 +968,24 @@
 writable.%0A *
- 
 %0A * %3Ci%3Ereada
@@ -1039,17 +1039,16 @@
 ault.%0A *
- 
 %0A * @aut
@@ -1120,20 +1120,16 @@
 ssion %7B%0A
-    
 %0A    pri
@@ -1150,36 +1150,32 @@
 eadable = true;%0A
-    
 %0A    private boo
@@ -1190,36 +1190,32 @@
 dableOwnerOnly;%0A
-    
 %0A    private boo
@@ -1236,20 +1236,16 @@
 = true;%0A
-    
 %0A    pri
@@ -1272,28 +1272,24 @@
 eOwnerOnly;%0A
-    
 %0A    private
@@ -1317,20 +1317,16 @@
  false;%0A
-    
 %0A    pri
@@ -1359,20 +1359,16 @@
 erOnly;%0A
-    
 %0A    /**
@@ -1462,20 +1462,16 @@
 ;%0A    %7D%0A
-    
 %0A    /**
@@ -3289,15 +3289,11 @@
 ;%0A    %7D%0A
-    
 %0A%7D%0A

Fix license and checkstyle