001/* 002 * Copyright 2010 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.cms.clientsideelement.styles; 017 018import java.util.List; 019import java.util.Set; 020 021/** 022 * A category of style. A style and files to import 023 */ 024public class StyleCategory 025{ 026 /** The name of the css file. See getBackOfficeCSSFile */ 027 protected Set<String> _boCSSFiles; 028 /** The name of the css file. See getInlineEditorCSSFile */ 029 protected Set<String> _inlineEditorCSSFiles; 030 /** The list of styles configured. See getStyles */ 031 protected List<Style> _styleList; 032 033 /** 034 * Build a style 035 * @param boCSSFiles cannot be null. 036 * @param inlineEditorCSSFiles cannot be null. 037 * @param styleList cannot be null. 038 */ 039 public StyleCategory(Set<String> boCSSFiles, Set<String> inlineEditorCSSFiles, List<Style> styleList) 040 { 041 _boCSSFiles = boCSSFiles; 042 _inlineEditorCSSFiles = inlineEditorCSSFiles; 043 _styleList = styleList; 044 } 045 046 /** 047 * Get the url of CSS files to import in the BO HMI to give to the style buttons the right appearance 048 * @return Contains absolute urls to CSS files 049 */ 050 public Set<String> getBackOfficeCSSFiles() 051 { 052 return _boCSSFiles; 053 } 054 055 /** 056 * Get the url of CSS files to import in the inline html editor to give the styles the right appearance 057 * @return Contains absolute urls to CSS files 058 */ 059 public Set<String> getInlineEditorCSSFiles() 060 { 061 return _inlineEditorCSSFiles; 062 } 063 064 /** 065 * Get the list of styles 066 * @return A non-null list of para 067 */ 068 public List<Style> getStyles() 069 { 070 return _styleList; 071 } 072}