// Copyright 1998 The Open Group Research Institute.  All rights reserved.
// Copyright 1999 Memesoft.  All rights reserved.

package krb5.lib.ccache;

import krb5.lib.*;

/**
 * File credentials cache information
 */
public class FileCCacheInfo extends CCacheInfo implements Cloneable {

	/**
	 * File name
	 */
    String fileName;

	/**
	 * Create file ?
	 */
    boolean createFile;

    // File must already exist.
	/**
	 * Class constructor - File must already exist
	 *
	 * @param name is of type String
	 */
    FileCCacheInfo(String name) {
        fileName = name;
        createFile = false;
    }

    // File must not already exist
	/**
	 * Class constructor - File must not already exist.
	 *
	 * @param name is of type String
	 * @param principalName is of type PrincipalName
	 */
    FileCCacheInfo(String name, PrincipalName principalName) {
        super(principalName);
        fileName = name;
        createFile = true;
    }

	/**
	 * Returns file name
	 *
	 * @return String is a result
	 */
    public String getFileName() {
        return fileName;
    }

	/**
	 * Clones a copy of the object
	 *
	 * @return Object is a result
	 */
    public Object clone() {
        return super.clone();
    }
}