001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.jetspeed.om.page.psml;
019:
020: import java.util.Map;
021: import java.util.HashMap;
022:
023: import org.apache.jetspeed.om.page.Fragment;
024:
025: /**
026: * @version $Id: DefaultsImpl.java 516448 2007-03-09 16:25:47Z ate $
027: */
028: public class DefaultsImpl {
029:
030: private String skin = null;
031: private Map decoratorMap = new HashMap();
032:
033: /**
034: * getSkin
035: *
036: * @return skin name used in decorators
037: */
038: public String getSkin() {
039: return this .skin;
040: }
041:
042: /**
043: * setSkin
044: *
045: * @param skin name used in decorators
046: */
047: public void setSkin(String skin) {
048: this .skin = skin;
049: }
050:
051: /**
052: * getDecorator
053: *
054: * @param type Fragment.LAYOUT or Fragment.PORTLET constants
055: * @return decorator name
056: */
057: public String getDecorator(String type) {
058: return (String) decoratorMap.get(type);
059: }
060:
061: /**
062: * setDecorator
063: *
064: * @param type Fragment.LAYOUT or Fragment.PORTLET constants
065: * @param decorator decorator name
066: */
067: public void setDecorator(String type, String decorator) {
068: decoratorMap.put(type, decorator);
069: }
070:
071: /**
072: * getLayoutDecorator
073: *
074: * @return Fragment.LAYOUT decorator name
075: */
076: public String getLayoutDecorator() {
077: return getDecorator(Fragment.LAYOUT);
078: }
079:
080: /**
081: * setLayoutDecorator
082: *
083: * @param decorator Fragment.LAYOUT decorator name
084: */
085: public void setLayoutDecorator(String decorator) {
086: setDecorator(Fragment.LAYOUT, decorator);
087: }
088:
089: /**
090: * getPortletDecorator
091: *
092: * @return Fragment.PORTLET decorator name
093: */
094: public String getPortletDecorator() {
095: return getDecorator(Fragment.PORTLET);
096: }
097:
098: /**
099: * setPortletDecorator
100: *
101: * @param decorator Fragment.PORTLET decorator name
102: */
103: public void setPortletDecorator(String decorator) {
104: setDecorator(Fragment.PORTLET, decorator);
105: }
106:
107: }
|