| | |
| | | * NOTE: the license file location must be kept in sync with build.xml and |
| | | * org.opends.quicksetup.LicenseFile. |
| | | */ |
| | | public class LicenseFile |
| | | class LicenseFile |
| | | { |
| | | /** |
| | | * Get the directory in which legal files are stored. |
| | |
| | | * the Legal directory in the top level installation directory |
| | | * <CODE>false</CODE> otherwise. |
| | | */ |
| | | static public boolean exists() |
| | | static boolean exists() |
| | | { |
| | | return getFile().exists(); |
| | | } |
| | |
| | | * |
| | | * @return the textual contents of the license file. |
| | | */ |
| | | static public String getText() |
| | | static String getText() |
| | | { |
| | | FileReader reader; |
| | | |
| | |
| | | * @return <CODE>true</CODE> if the license has been accepted by the user |
| | | * <CODE>false</CODE> otherwise. |
| | | */ |
| | | static public boolean getApproval() |
| | | static boolean getApproval() |
| | | { |
| | | return approved; |
| | | } |
| | |
| | | * @param p_approved |
| | | * the license approval status |
| | | */ |
| | | static public void setApproval(boolean p_approved) |
| | | static void setApproval(boolean p_approved) |
| | | { |
| | | approved = p_approved; |
| | | } |
| | |
| | | /** |
| | | * Create a file which indicates that the license has been approved. |
| | | */ |
| | | static public void createFileLicenseApproved() |
| | | static void createFileLicenseApproved() |
| | | { |
| | | if (getApproval()) |
| | | { |
| | |
| | | * @return <CODE>true</CODE> if the license had already been approved by the |
| | | * user <CODE>false</CODE> otherwise. |
| | | */ |
| | | static public boolean isAlreadyApproved() |
| | | static boolean isAlreadyApproved() |
| | | { |
| | | File f = |
| | | new File(getInstanceLegalDirectory() + File.separatorChar |