package nl.rutgerkok.blocklocker.profile;

import java.util.Date;

import nl.rutgerkok.blocklocker.protection.Protection;

import org.json.simple.JSONObject;

/**
 * Represents a profile. A profile is something that owns or is allowed access
 * to a {@link Protection}.
 *
 */
public interface Profile {

    /**
     * Gets the name of the profile as it should be displayed on signs.
     *
     * @return The name of the profile.
     */
    String getDisplayName();

    /**
     * Gets the object as it should be saved.
     *
     * @return The object as it should be saved.
     */
    JSONObject getSaveObject();

    /**
     * Gets whether this profile includes another profile. For example,
     * "[Everyone]" includes all other profiles, and "jeb_" includes everyone
     * with the name jeb_.
     *
     * @param other
     *            The other profile.
     * @return True if this profile includes the other profile, false otherwise.
     */
    boolean includes(Profile other);

    /**
     * Gets whether this profile is expired.
     * 
     * @param cutoffDate
     *            The cutoff date: there must be activity for this profile after
     *            the given date, or else it's considered expired.
     * @return True if the profile is expired, false otherwise.
     */
    boolean isExpired(Date cutoffDate);
}

@@ -64,64 +64,8 @@
 e;%0A%0A
-import nl.rutgerkok.blocklocker.protection.Protection;%0A%0A
 impo
@@ -142,75 +142,99 @@
  is 
-something that owns or is allowed access%0A * to a %7B@link Protection%7D
+usually a player, but it may also be a whole group or something abstract like%0A * %22Redstone%22
 .%0A *

Change JavaDoc of Profile