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.time.ZonedDateTime;
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 creation date
056     * @return the creation date
057     */
058    public ZonedDateTime getCreationDate();
059    
060    /**
061     * Get the author
062     * @return The author
063     */
064    public UserIdentity getCreator();
065    
066    /**
067     * Get the date of last modification
068     * @return the date of last modification
069     */
070    public ZonedDateTime getLastModified();
071    
072    /**
073     * Get the last contributor
074     * @return The last contributor
075     */
076    public UserIdentity getLastContributor();
077
078    /**
079     * Get the type of element
080     * @return The type
081     */
082    public String getType();
083    
084    /**
085     * Get glyph icon. If not null, small and medium icon will be ignored
086     * @return the path to small icon
087     */
088    public String getGlyphIcon();
089    
090    /**
091     * Get the path to small icon (16x16 pixels)
092     * @return the path to small icon
093     */
094    public String getSmallIcon();
095    
096    /**
097    * Get the path to medium icon (32x32 pixels)
098    * @return the path to medium icon
099    */
100    public String getMediumIcon();
101   
102}