001/*
002        $Id: SystemItem.java 3207 2009-04-09 06:48:11Z gregory $
003
004        Copyright (C) 2006 Gregory Vincic, Olle Mansson
005        Copyright (C) 2007 Gregory Vincic
006
007        This file is part of Proteios.
008        Available at http://www.proteios.org/
009
010        Proteios is free software; you can redistribute it and/or modify it
011        under the terms of the GNU General Public License as published by
012        the Free Software Foundation; either version 2 of the License, or
013        (at your option) any later version.
014
015        Proteios is distributed in the hope that it will be useful, but
016        WITHOUT ANY WARRANTY; without even the implied warranty of
017        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
018        General Public License for more details.
019
020        You should have received a copy of the GNU General Public License
021        along with this program; if not, write to the Free Software
022        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
023        02111-1307, USA.
024*/
025package org.proteios.core;
026
027/**
028        A <code>SystemItem</code> is an item which has an
029        additional systemwide unique id in the form of string. 
030        A system id is required when we need to make sure that we can 
031        get a specific item without knowing the numeric id. Example of 
032        such items are the root user and the everyone group.
033        <p>
034        Items with a system id can only be created during installation
035        and cannot be removed.
036        <p>
037        
038        <b>Reference implementation</b><br>
039        <pre class="code">
040public String getSystemId()
041{
042   return getData().getSystemId();
043}
044public boolean isSystemItem()
045{
046   return getSystemId() != null;
047}
048</pre>
049
050        @author Nicklas
051        @version 2.0
052        @base.modified $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
053*/
054public interface SystemItem
055        extends Identifiable
056{
057        /**
058                Get the system id for the item.
059                @return The id of the item or null if it is not a system item
060        */
061        public String getSystemId();
062        
063        /**
064                Check if the item is a system item or not. A system item have a non-null
065                value for the system id.
066                @return TRUE if this item is a system item, FALSE otherwise
067        */
068        public boolean isSystemItem();
069
070}