Package org.ametys.plugins.cart
Class ResourceElement
- java.lang.Object
-
- org.ametys.plugins.cart.ResourceElement
-
- All Implemented Interfaces:
CartElement
public class ResourceElement extends Object implements CartElement
Implementation of aCartElement
wrapping aResource
-
-
Constructor Summary
Constructors Constructor Description ResourceElement(Resource resource)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I18nizableText
getDescription()
Get the element's descriptionString
getGlyphIcon()
Get glyph icon.List<I18nizableText>
getGroups()
Get the label of the groupsString
getId()
Get the unique identifier of the elementUserIdentity
getLastContributor()
Get the authorDate
getLastModified()
Get the date of last modificationString
getMediumIcon()
Get the path to medium icon (32x32 pixels)Resource
getResource()
Get the resourceString
getSmallIcon()
Get the path to small icon (16x16 pixels)I18nizableText
getTitle()
Get the element's titleString
getType()
Get the type of element
-
-
-
Constructor Detail
-
ResourceElement
public ResourceElement(Resource resource)
Constructor- Parameters:
resource
- The resource
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:CartElement
Get the unique identifier of the element- Specified by:
getId
in interfaceCartElement
- Returns:
- The unique identifier
-
getTitle
public I18nizableText getTitle()
Description copied from interface:CartElement
Get the element's title- Specified by:
getTitle
in interfaceCartElement
- Returns:
- The title
-
getDescription
public I18nizableText getDescription()
Description copied from interface:CartElement
Get the element's description- Specified by:
getDescription
in interfaceCartElement
- Returns:
- The description
-
getGroups
public List<I18nizableText> getGroups()
Description copied from interface:CartElement
Get the label of the groups- Specified by:
getGroups
in interfaceCartElement
- Returns:
- the label of the groups
-
getLastModified
public Date getLastModified()
Description copied from interface:CartElement
Get the date of last modification- Specified by:
getLastModified
in interfaceCartElement
- Returns:
- the date of last modification
-
getLastContributor
public UserIdentity getLastContributor()
Description copied from interface:CartElement
Get the author- Specified by:
getLastContributor
in interfaceCartElement
- Returns:
- The author
-
getType
public String getType()
Description copied from interface:CartElement
Get the type of element- Specified by:
getType
in interfaceCartElement
- Returns:
- The type
-
getGlyphIcon
public String getGlyphIcon()
Description copied from interface:CartElement
Get glyph icon. If not null, small and medium icon will be ignored- Specified by:
getGlyphIcon
in interfaceCartElement
- Returns:
- the path to small icon
-
getSmallIcon
public String getSmallIcon()
Description copied from interface:CartElement
Get the path to small icon (16x16 pixels)- Specified by:
getSmallIcon
in interfaceCartElement
- Returns:
- the path to small icon
-
getMediumIcon
public String getMediumIcon()
Description copied from interface:CartElement
Get the path to medium icon (32x32 pixels)- Specified by:
getMediumIcon
in interfaceCartElement
- Returns:
- the path to medium icon
-
getResource
public Resource getResource()
Get the resource- Returns:
- The resource
-
-