1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services.portaltoolkit;
1819//jetspeed stuff20import org.apache.jetspeed.portal.PortletSet;
21import org.apache.jetspeed.portal.PortletSkin;
22import org.apache.jetspeed.portal.PortletControl;
23import org.apache.jetspeed.portal.PortletController;
24import org.apache.jetspeed.om.profile.Control;
25import org.apache.jetspeed.om.profile.Controller;
26import org.apache.jetspeed.om.profile.Portlets;
27import org.apache.jetspeed.om.profile.Skin;
28import org.apache.turbine.services.Service;
29import org.apache.jetspeed.om.SecurityReference;
30import org.apache.jetspeed.om.profile.Profile;
3132/***33 * This service is a Factory for creating new Portal objects from34 * named Registry entries or PSML configuration entries.35 * It handles all the portal specific objects except Portlet which are 36 * handled by a separate PortletFactory service37 * 38 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>39 * @version $Id: PortalToolkitService.java,v 1.5 2004/02/23 03:34:14 jford Exp $40 */41publicinterfacePortalToolkitServiceextends Service
42 {
4344/*** The default control to use when none is specified */45public String SERVICE_NAME = "PortalToolkit";
4647/***48 * Instanciates a PortletControl based on a Registry entry, if available 49 * or directly from a classname.50 *51 * @param name a PortletControl name available in the registry or a classname52 * @return the created PortletControl53 */54publicPortletControl getControl( String name );
5556/***57 * Instanciates a PortletControl based on a PSML Control object58 *59 * @param control the PSML control object60 * @return the created PortletControl61 */62publicPortletControl getControl( Control control );
6364/***65 * Instanciates a PortletController based on a Registry entry, if available 66 * or directly from a classname.67 *68 * @param name a PortletController name available in the registry or a classname69 * @return the created PortletController70 */71publicPortletController getController( String name );
7273/***74 * Instanciates a PortletController based on a PSML Controller object75 *76 * @param control the PSML controller object77 * @return the created PortletController78 */79publicPortletController getController( Controller controller );
8081/***82 * Create a PortletSkin object based on a Registry entry if available83 *84 * @param name the skin name in the Registry85 * @return the new PortletSkin object86 */87publicPortletSkin getSkin( String name );
8889/***90 * Create a PortletSkin object based on PSML skin description91 *92 * @param skin the PSML Skin object93 * @return the new PortletSkin object94 */95publicPortletSkin getSkin( Skin skin );
9697/***98 * Creates a PortletSet from a PSML portlets description99 *100 * @param portlets the PSML portlet set description101 * @return a new instance of PortletSet102 */103publicPortletSet getSet( Portlets portlets );
104105106/***107 * Given a locator String path, returns a Portlets collecton108 *109 * @param locatorPath ProfileLocator resource path identifier110 * @return a portlets collection from the PSML resource111 */112publicPortlets getReference(String locatorPath);
113114/***115 * Gets default security ref based on the profile type (user|role|group). Returns116 * null if no default is defined.117 * 118 * @param profile119 * @return default security reference120 */121publicSecurityReference getDefaultSecurityRef(Profile profile);
122123/***124 * Gets default security ref based on the profile type (user|role|group). Returns125 * null if no default is defined.126 *127 * @param type of entity to return default security ref for128 * @return default security reference129 */130publicSecurityReference getDefaultSecurityRef(String type);
131132 }
133