001/*
002 *  Copyright 2013 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.plugins.cart;
017
018import java.util.Date;
019import java.util.List;
020
021import org.ametys.core.user.UserIdentity;
022import org.ametys.runtime.i18n.I18nizableText;
023
024/**
025 * Interface representing the element of a {@link Cart}
026 *
027 */
028public interface CartElement
029{
030    /**
031     * Get the unique identifier of the element
032     * @return The unique identifier
033     */
034    public String getId();
035    
036    /**
037     * Get the element's title
038     * @return The title
039     */
040    public I18nizableText getTitle ();
041    
042    /**
043     * Get the element's description
044     * @return The description
045     */
046    public I18nizableText getDescription();
047    
048    /**
049     * Get the label of the groups
050     * @return the label of the groups
051     */
052    public List<I18nizableText> getGroups();
053    
054    /**
055     * Get the date of last modification
056     * @return the date of last modification
057     */
058    public Date getLastModified();
059    
060    /**
061     * Get the author
062     * @return The author
063     */
064    public UserIdentity getLastContributor();
065
066    /**
067     * Get the type of element
068     * @return The type
069     */
070    public String getType();
071    
072    /**
073     * Get glyph icon. If not null, small and medium icon will be ignored
074     * @return the path to small icon
075     */
076    public String getGlyphIcon();
077    
078    /**
079     * Get the path to small icon (16x16 pixels)
080     * @return the path to small icon
081     */
082    public String getSmallIcon();
083    
084    /**
085    * Get the path to medium icon (32x32 pixels)
086    * @return the path to medium icon
087    */
088    public String getMediumIcon();
089   
090}