Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxAction.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxAction.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxAction.java Tue Oct 29 17:11:29 2013 @@ -36,11 +36,11 @@ public interface AjaxAction * This method runs an Ajax action. * * @param requestContext The Jetspeed Request Context - * @param resultMap map of action parameters passed to the builder context + * @param resultMap map of action parameters (any object) passed to the builder context * @return success is true, failure is false - * @throws Exception + * @throws AJAXException */ - public boolean run(RequestContext requestContext, Map resultMap) throws AJAXException; + public boolean run(RequestContext requestContext, Map<String,Object> resultMap) throws AJAXException; /** * Same as run method, but runs in batch mode, as a hint to the action @@ -50,9 +50,9 @@ public interface AjaxAction * @param requestContext The Jetspeed Request Context * @param resultMap map of action parameters passed to the builder context * @return success is true, failure is false - * @throws Exception + * @throws AJAXException */ - public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException; + public boolean runBatch(RequestContext requestContext, Map<String,Object> resultMap) throws AJAXException; /** * Checks to see if the current subject has access to to execute this action.
Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxBuilder.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxBuilder.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxBuilder.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxBuilder.java Tue Oct 29 17:11:29 2013 @@ -16,9 +16,10 @@ */ package org.apache.jetspeed.ajax; -import java.util.Map; import org.apache.jetspeed.request.RequestContext; +import java.util.Map; + /** * An Ajax request is made up of an action and builder phases. * Implement this interface for the Ajax builder phase. @@ -45,16 +46,16 @@ public interface AjaxBuilder * * @param requestContext The Jetspeed Request Context * @param contextVars Context variables to be substituted into template - * @return true on success false onerror + * @return true on success false on error */ - public boolean buildContext(RequestContext requestContext, Map contextVars); + public boolean buildContext(RequestContext requestContext, Map<String,Object> contextVars); /** * Build the error context template * * @param requestContext The Jetspeed Request Context * @param contextVars Context variables to be substituted into template - * @return true on success false onerror + * @return true on success false on error */ - public boolean buildErrorContext(RequestContext requestContext, Map contextVars); + public boolean buildErrorContext(RequestContext requestContext, Map<String,Object> contextVars); } Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxRequestService.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxRequestService.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxRequestService.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxRequestService.java Tue Oct 29 17:11:29 2013 @@ -16,10 +16,10 @@ */ package org.apache.jetspeed.ajax; -import java.util.Map; - import org.apache.jetspeed.request.RequestContext; +import java.util.Map; + /** * An Ajax request is made up of an action and builder phases. * This interface defines the entry point into Ajax Request processing @@ -27,8 +27,29 @@ import org.apache.jetspeed.request.Reque * * @author <href a="mailto:tay...@apache.org">David Sean Taylor</a> */ -public interface AjaxRequestService -{ +public interface AjaxRequestService { + /** + * Entry point into processing an Ajax request + * + * @param requestContext the request context holding runtime request parameters to be normalized + * @throws AJAXException + */ public void process(RequestContext requestContext) throws AJAXException; - public Map getActionMap(); + + /** + * Retrieve the map of configured actions. Actions are mapped from action names to + * actual {@link AjaxAction} implementations. Examples: + * + * {@code + * <entry key="moveleft"> + * <ref bean="AjaxMovePortletLeft" /> + * </entry> + * <entry key="moveright"> + * <ref bean="AjaxMovePortletRight" /> + * </entry> + * } + * + * @return the map of configured actions + */ + public Map<String, AjaxAction> getActionMap(); } Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/audit/AuditActivity.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/audit/AuditActivity.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/audit/AuditActivity.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/audit/AuditActivity.java Tue Oct 29 17:11:29 2013 @@ -76,91 +76,103 @@ public interface AuditActivity public static final String CAT_ADMIN_REGISTRY_MAINTENANCE = "registry"; /** - * Enable or disable the service at runtime + * Enable or disable the auditing service at runtime. * - * @param enabled + * @param enabled the new state, true for enabled, false for disabled */ public void setEnabled(boolean enabled); /** - * Get the enabled state of this service - * @return + * Get the enabled state of the auditing service. + * + * @return the current state of audit service */ public boolean getEnabled(); /** - * Log user security-audit-related activity - * - * @param username - * @param ipaddress - * @param activity - * @param description + * Log user activity that requires audit trails + * + * @param username the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param activity the type of activity, see constants defined in this interface + * @param description a general description or comment for this activity */ public void logUserActivity(String username, String ipaddress, String activity, String description); /** * Log auditable activity by an administrator on behalf of another user - * - * @param username - * @param ipaddress - * @param targetUser - * @param activity - * @param description + * + * @param adminUser the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param targetUser the user having activities logged by the adminUser + * @param activity the type of activity, see constants defined in this interface + * @param description a general description or comment for this activity */ - public void logAdminUserActivity(String username, String ipaddress, String targetUser, String activity, String description); + public void logAdminUserActivity(String adminUser, String ipaddress, String targetUser, String activity, String description); /** * Log auditable activity by an administrator on credentials on behalf of a user - * - * @param adminName - * @param ipaddress - * @param targetUser - * @param activity - * @param description + * + * @param username the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param targetUser the user having activities logged by the adminUser + * @param activity the type of activity, see constants defined in this interface + * @param description a general description or comment for this activity */ public void logAdminCredentialActivity(String username, String ipaddress, String targetUser, String activity, String description); - + + /** + * Log auditable activity by an administrator on authorization configuration on behalf of a user + * + * @param username the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param targetUser the user having activities logged by the adminUser + * @param activity the type of activity, see constants defined in this interface + * @param name the name of the resource being modified + * @param description a general description or comment for this activity + */ public void logAdminAuthorizationActivity(String username, String ipaddress, String targetUser, String activity, String name, String description); /** - * Log auditable activity by an administrator on attributes on behalf of a user - * - * @param username - * @param ipaddress - * @param targetUser - * @param activity - * @param name - * @param beforeValue - * @param afterValue - * @param description + * Log auditable activity by an administrator on user attributes on behalf of a user + * + * @param username the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param targetUser the user having activities logged by the adminUser + * @param activity the type of activity, see constants defined in this interface + * @param name the name of the resource being modified + * @param beforeValue the value of the attribute before changes were made + * @param afterValue the value of the attribute after changes were made + * @param description a general description or comment for this activity */ public void logAdminAttributeActivity(String username, String ipaddress, String targetUser, String activity, String name, String beforeValue, String afterValue, String description); /** - * Log auditable activity by an administrator on attributes on behalf of a user - * - * @param username - * @param ipaddress - * @param activity - * @param name - * @param beforeValue - * @param afterValue - * @param description + * Log auditable activity by an administrator on user attributes + * + * @param username the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param activity the type of activity, see constants defined in this interface + * @param name the name of the resource being modified + * @param beforeValue the value of the attribute before changes were made + * @param afterValue the value of the attribute after changes were made + * @param description a general description or comment for this activity */ public void logUserAttributeActivity(String username, String ipaddress, String activity, String name, String beforeValue, String afterValue, String description); /** * Log auditable activity by an administrator on registry maintenance * - * @param adminUser - * @param ipaddress - * @param activity - * @param description + * @param adminUser the administrative user performing auditable activities + * @param ipaddress the ip address of the http request + * @param activity the type of activity, see constants defined in this interface + * @param description a general description or comment for this activity */ public void logAdminRegistryActivity(String adminUser, String ipaddress, String activity, String description); /** - * @return DataSource in use by the logger useful for writing decent tests + * @return DataSource in use by the logger + * @deprecated */ public DataSource getDataSource(); Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cache/JetspeedCache.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cache/JetspeedCache.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cache/JetspeedCache.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cache/JetspeedCache.java Tue Oct 29 17:11:29 2013 @@ -16,10 +16,10 @@ */ package org.apache.jetspeed.cache; -import java.util.List; - import org.apache.jetspeed.request.RequestContext; +import java.util.List; + /** * <p> * Provides interface to Jetspeed for cache related activities @@ -99,7 +99,7 @@ public interface JetspeedCache /** * Evict all cached content for the given session identifier * - * @param sessionid unique session identifier + * @param sessionId unique session identifier */ void evictContentForSession(String sessionId); Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Capabilities.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Capabilities.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Capabilities.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Capabilities.java Tue Oct 29 17:11:29 2013 @@ -39,13 +39,15 @@ public interface Capabilities /** * Obtain an iterator of all existing clients. + * * @return Returns an iterator for all existing Clients */ - Iterator getClients(); + Iterator<Client> getClients(); /** - * Finds a client for a given userAgentPattern - * @param userAgent + * Finds a client for a given regex userAgentPattern + * + * @param userAgent the user agent regex pattern * @return Client that matches agent or null if no match is found * */ @@ -53,18 +55,17 @@ public interface Capabilities /** * Returns a collection of MediaTypes that matches the MimeTypes defined in the mimetype parameter - * @param Mimetype * - * @return Collection of Mediatypes that matches the mimetypes + * @param mimeTypes the collection of mime types to match + * @return a collection of media types that matches the mime types */ - Collection getMediaTypesForMimeTypes(Iterator mimetypes); + Collection<MediaType> getMediaTypesForMimeTypes(Iterator<MimeType> mimeTypes); /** * Clears CapabilityMap cache - * TODO: Roger, why is this on the public interface. It seems to be impl specific + * */ void deleteCapabilityMapCache(); - /** * Given a media type string, look up the corresponding media type object. * @@ -75,6 +76,7 @@ public interface Capabilities /** * Given a Mimetype string lookup the corresponding media type object + * * @param mimeTypeName to use for lookup * @return MediaTypeEntry that matches the lookup in the MEDIATYPE_TO_MIMETYPE table */ @@ -95,6 +97,7 @@ public interface Capabilities * @return The found mime type object or if not found, null. */ MimeType getMimeType(String mimeType); + /** * Given a client name, look up the corresponding client object. * @@ -105,75 +108,28 @@ public interface Capabilities /** * Obtain an iterator of all existing capabilities. + * * @return Returns an iterator for all existing Capabilities of type <code>Capability</code> */ - Iterator getCapabilities(); + Iterator<Capability> getCapabilities(); /** * Obtain an iterator of all existing mime types. + * * @return Returns an iterator for all existing Mime Types of type <code>MimeType</code> */ - Iterator getMimeTypes(); + Iterator<MimeType> getMimeTypes(); /** * Obtain an iterator of all existing media types. + * * @return Returns an iterator for all existing media types of type <code>MediaType</code> */ - Iterator getMediaTypes(); - - - /** - * Obtain the name of the CapabilityBean reference - * @return ref-id of the capability bean - */ - public String getCapabilityBeanName(); - - /** - * Set the name of the CapabilityBean reference - used exclusively in IoC - * @param capabilityBeanName The ref-id of the capability bean. - */ - public void setCapabilityBeanName(String capabilityBeanName); - + Iterator<MediaType> getMediaTypes(); - /** - * Obtain the name of the ClientBean reference - * @return ref-id of the client bean - */ - public String getClientBeanName(); - - /** - * Set the name of the ClientBean reference - used exclusively in IoC - * @param clientBeanName The ref-id of the client bean. - */ - public void setClientBeanName(String clientBeanName); - - /** - * Obtain the name of the Media Type reference - * @return ref-id of the media type bean - */ - public String getMediaTypeBeanName(); - - /** - * Set the name of the MediaType bean reference - used exclusively in IoC - * @param mediaTypeBeanName The ref-id of the mediaType bean. - */ - public void setMediaTypeBeanName(String mediaTypeBeanName); - - /** - * Obtain the name of the Mime Type reference - * @return ref-id of the mime type bean - */ - public String getMimeTypeBeanName(); - - /** - * Set the name of the MimeType bean reference - used exclusively in IoC - * @param mimeTypeBeanName The ref-id of the mimeType bean. - */ - public void setMimeTypeBeanName(String mimeTypeBeanName); - - /** * Create a new capability in the system or return the existing one if already exists + * * @param capabilityName The string describing the capability * @return A new (or existing) capability */ @@ -182,6 +138,7 @@ public interface Capabilities /** * Create a new mimetype in the system or return the existing one if already exists + * * @param mimeTypeName The string describing the mimeType * @return A new (or existing) MimeType */ @@ -189,6 +146,7 @@ public interface Capabilities /** * Create a new mediaType in the system or return the existing one if already exists + * * @param mediaTypeName The string describing the mediaType * @return A new (or existing) MediaType */ @@ -196,25 +154,23 @@ public interface Capabilities /** * Create a new client in the system or return the existing one if already exists + * * @param clientName The string describing the client * @return A new (or existing) client */ public Client createClient(String clientName)throws ClassNotFoundException; - - /** * Save media type to backend storage * - * @param mediaType valid mediatype object + * @param mediaType a valid media type object */ public void storeMediaType(MediaType mediaType) throws CapabilitiesException; - //TODO: change CapabilitiesException to better indicate cause - + /** - * delete existing media type from backend storage + * Delete existing media type from backend storage * - * @param mediaType valid mediatype object + * @param mediaType a valid media type object */ public void deleteMediaType(MediaType mediaType) throws CapabilitiesException; @@ -238,20 +194,18 @@ public interface Capabilities /** * Save mime type to backend storage * - * @param mimeType valid mimetype object + * @param mimeType valid mime type object */ public void storeMimeType(MimeType mimeType) throws CapabilitiesException; /** * delete existing mime type from backend storage * - * @param mimeType valid mimetype object + * @param mimeType valid mime type object */ public void deleteMimeType(MimeType mimeType) throws CapabilitiesException; - - /** * Save client to backend storage * Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/CapabilityMap.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/CapabilityMap.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/CapabilityMap.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/CapabilityMap.java Tue Oct 29 17:11:29 2013 @@ -60,7 +60,7 @@ public interface CapabilityMap /** * Add MediaType to the MediaTypeMap * - * @param Mediatype to add + * @param mediatype to add */ public void addMediaType(MediaType mediatype); @@ -76,15 +76,17 @@ public interface CapabilityMap /** * Sets the preferred MediaType for this CapabilityMap - * @param MediaTypeEntry + * @param type */ public void setPreferredMediaType(MediaType type); /** * Returns an ordered list of supported media-types, from most preferred * to least preferred + * + * @return an iterator over all media types */ - public Iterator listMediaTypes(); + public Iterator<MediaType> listMediaTypes(); /** * @return Returns the user-agent string @@ -99,13 +101,13 @@ public interface CapabilityMap public void setAgent(String userAgent); /** - * @param CApabilityID + * @param capabilityId * @return Returns true if the current agent has the specified capabilityID */ - public boolean hasCapability(int cap); + public boolean hasCapability(int capabilityId); /** - * @param Capability + * @param capability * @return returns true if the current agent has the specified capability */ public boolean hasCapability(String capability); @@ -114,10 +116,10 @@ public interface CapabilityMap * Get the mime types that this CapabilityMap supports. * @return Returns an Iterator over the MimeType map */ - public Iterator getMimeTypes(); + public Iterator<MimeType> getMimeTypes(); /** - * @param MimeType + * @param mimeType * @return Return true if this CapabilityMap supports the given MimeType */ public boolean supportsMimeType(MimeType mimeType); Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Client.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Client.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Client.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Client.java Tue Oct 29 17:11:29 2013 @@ -113,15 +113,15 @@ public interface Client * order of importance. * * @return the MimeTypeMap - * @see MimeTypeMap + * @see MimeType */ - public Collection getMimetypes(); + public Collection<MimeType> getMimetypes(); /** * Set MimeTypes * @param mimetypes */ - public void setMimetypes(Collection mimetypes); + public void setMimetypes(Collection<MimeType> mimetypes); String getName(); void setName(String name); @@ -134,13 +134,13 @@ public interface Client * @return the CapabilityMap * @see CapabilityMap */ - public Collection getCapabilities(); + public Collection<Capability> getCapabilities(); /** * Assigns a list of capabilities * @param capabilities */ - public void setCapabilities(Collection capabilities); + public void setCapabilities(Collection<Capability> capabilities); /** * getPreferredMimeTypeId Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/MediaType.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/MediaType.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/MediaType.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/MediaType.java Tue Oct 29 17:11:29 2013 @@ -22,7 +22,7 @@ import java.util.Collection; * This entry describes all the properties that should be present in * a RegistryEntry describing a MediaType * - * FIXME: we should add some additionnal attrbutes for separating 2 versions + * TODO: add some additional attributes for separating 2 versions * of the same mime type * * @author <a href="mailto:raph...@apache.org">Rapha\u00ebl Luta</a> @@ -55,13 +55,13 @@ public interface MediaType * * @return a collection of capabilities */ - public Collection getCapabilities(); + public Collection<Capability> getCapabilities(); /** * Set the capabilities - * @param vector of capabilities + * @param capabilities of capabilities */ - public void setCapabilities(Collection capabilities); + public void setCapabilities(Collection<Capability> capabilities); /** * Returns all supported mimetypes as <CODE>MimeTypeMap</CODE>. @@ -69,15 +69,15 @@ public interface MediaType * order of importance. * * @return the MimeTypeMap - * @see MimeTypeMap + * @see MimeType */ - public Collection getMimetypes(); + public Collection<MimeType> getMimetypes(); /** * Set mime types * @param mimetypes */ - public void setMimetypes(Collection mimetypes); + public void setMimetypes(Collection<MimeType> mimetypes); /** * Removes the MimeType to the MimeType map Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cluster/NodeManager.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cluster/NodeManager.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cluster/NodeManager.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cluster/NodeManager.java Tue Oct 29 17:11:29 2013 @@ -33,7 +33,8 @@ public interface NodeManager /** * Returns the current "knowledge" about a given node (i.e. the portlet application). * If the contextName doesn't exist NODE_NEW is returned. - * An revision requested newer than what is stored is indicated by NODE_OUTDATED. + * An revision requested newer than what is stored is indicated by NODE_OUTDATED. + * * @param revision * @param contextName * @return @@ -56,7 +57,6 @@ public interface NodeManager /** * Remove a node - * @param id * @param contextName * @throws Exception */ Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ComponentManagement.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ComponentManagement.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ComponentManagement.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ComponentManagement.java Tue Oct 29 17:11:29 2013 @@ -24,13 +24,73 @@ package org.apache.jetspeed.components; */ public interface ComponentManagement { + /** + * Lookup a Jetspeed Component in the IOC container, returning an automatically casted instance of + * the component service + * + * @param componentName the name of the component (bean) to lookup + * @param <T> the return type of the interface of the component + * @return the currently configured component service for the given name or null if not found + * @since 2.2.3 + */ + <T> T lookupComponent(String componentName); + + /** + * Lookup a Jetspeed Component in the IOC container, returning an automatically casted instance of + * the component service + * + * @param componentClass the class of the component (bean) singleton to lookup + * @param <T> the return type of the interface of the component + * @return the currently configured component service for the given name or null if not found + * @since 2.2.3 + */ + <T> T lookupComponent(Class componentClass); + + /** + * Determine if a component exists in the Jetspeed IoC container + * + * @param componentName the name of the component to lookup + * @return true if the component exists, otherwise false + */ boolean containsComponent(Object componentName); - + + /** + * Lookup a Jetspeed Component in the IOC container, returning an un-casted instance of + * the component service. Deprecated. Use {@link ComponentManager#lookupComponent(String)} + * + * @see org.apache.jetspeed.components.ComponentManagement#getComponent(java.lang.Object) + * @param componentName can be either a String or a #{@link @java.lang.Class} If its a Class, + * the component name must match the toString representation of that class + * @deprecated in 2.2.3 + * @see {@link ComponentManager#lookupComponent(String)} or + * {@link ComponentManager#lookupComponent(Class)} + * @return the component instance of null if not found + */ Object getComponent(Object componentName); boolean containsComponent(Object containerName, Object componentName); - + + /** + * Lookup a Jetspeed Component in the given IOC container, returning an un-casted instance of + * the component service. Deprecated. Use {@link ComponentManager#lookupComponent(String)} + * + * @see org.apache.jetspeed.components.ComponentManagement#getComponent(java.lang.Object) + * @param containerName the name of the IoC container to lookup the component in + * @param componentName can be either a String or a #{@link @java.lang.Class} If its a Class, + * the component name must match the toString representation of that class + * @deprecated in 2.2.3 + * @see {@link ComponentManager#lookupComponent(String)} or + * {@link ComponentManager#lookupComponent(Class)} + * @return the component instance of null if not found + */ Object getComponent(Object containerName, Object componentName); - - void addComponent(String name, Object bean); + + /** + * Add a component (bean) to the default Jetspeed IoC container + * + * @param name the name of the component service + * @param bean the actual component to be added + */ + void addComponent(String name, Object bean); + } Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ContainerManagement.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ContainerManagement.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ContainerManagement.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ContainerManagement.java Tue Oct 29 17:11:29 2013 @@ -19,20 +19,45 @@ package org.apache.jetspeed.components; import java.util.Collection; /** - * ContainerManagement + * ContainerManagement interfaces defines operations to lookup containers, list containers, + * and to manage the life cycle of the underlying Jetspeed IoC containers. + * * * @author <a href="mailto:tay...@apache.org">David Sean Taylor</a> * @version $Id: ContainerManagement.java 225607 2005-07-27 20:25:36Z weaver $ */ public interface ContainerManagement -{ +{ + /** + * Retrieve a Jetspeed IoC container by name + * + * @param containerName the name of the IoC container + * @return the IoC implementation facade + */ Object getContainer(String containerName); - + + /** + * Retrieve the root Jetspeed IoC container + * + * @return the root container + */ Object getRootContainer(); - + + + /** + * Retrieve all IoC containers configured in Jetspeed + * + * @return a list of containers. Needs to be cast to implementing container class + */ Collection getContainers(); - + + /** + * Stop the Jetspeed IoC container + */ void stop(); - + + /** + * Start the Jetspeed IoC container + */ void start(); } Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java Tue Oct 29 17:11:29 2013 @@ -16,11 +16,7 @@ */ package org.apache.jetspeed.components.portletpreferences; -import java.util.Map; -import java.util.Set; - import org.apache.jetspeed.container.PortletWindow; -import org.apache.jetspeed.om.page.ContentPage; import org.apache.jetspeed.om.portlet.PortletApplication; import org.apache.jetspeed.om.portlet.PortletDefinition; import org.apache.jetspeed.om.portlet.Preference; @@ -28,6 +24,9 @@ import org.apache.jetspeed.om.portlet.Pr import org.apache.pluto.container.PortletPreference; import org.apache.pluto.container.PortletPreferencesService; +import java.util.Map; +import java.util.Set; + /** * @@ -130,7 +129,6 @@ public interface PortletPreferencesProvi * Store entity preferences contained in the map parameter for a given window * * @param map - * @param page * @param window * @throws PreferencesException */ Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java Tue Oct 29 17:11:29 2013 @@ -16,11 +16,11 @@ */ package org.apache.jetspeed.components.portletregistry; -import java.util.Collection; - import org.apache.jetspeed.om.portlet.PortletApplication; import org.apache.jetspeed.om.portlet.PortletDefinition; +import java.util.Collection; + /** * <p> * PortletRegistryComponentImpl @@ -132,7 +132,7 @@ public interface PortletRegistry /** * Checks whether or not a portlet with this identity has all ready * been registered to the PortletApplication. - * @param portletIndentity portlet indetity to check for. + * @param portletName portlet identity to check for. * @param app PortletApplication to check . * @return boolean <code>true</code> if a portlet with this identity * is alreay registered, <code>false</code> if it has not. Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java Tue Oct 29 17:11:29 2013 @@ -16,15 +16,15 @@ */ package org.apache.jetspeed.om.page; -import java.util.List; -import java.util.Map; - import org.apache.jetspeed.aggregator.PortletContent; import org.apache.jetspeed.decoration.Decoration; import org.apache.jetspeed.layout.PageLayoutComponent; import org.apache.jetspeed.om.common.SecurityConstraint; import org.apache.jetspeed.om.common.SecurityConstraints; +import java.util.List; +import java.util.Map; + /** * ContentFragment is a read-only version of the {@link org.apache.jetspeed.om.page.Fragment} * object for use in rendering. <code>Fragment</code> objects are persistent, single-instance @@ -405,7 +405,7 @@ public interface ContentFragment * * @return ContentFragment list */ - List getFragments(); + List<ContentFragment> getFragments(); /************** Fragment Reference **************/ Modified: portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/Jetspeed.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/Jetspeed.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/Jetspeed.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/Jetspeed.java Tue Oct 29 17:11:29 2013 @@ -16,14 +16,14 @@ */ package org.apache.jetspeed; -import java.util.Locale; - import org.apache.jetspeed.administration.PortalConfiguration; import org.apache.jetspeed.components.ComponentManager; import org.apache.jetspeed.engine.Engine; import org.apache.jetspeed.exception.JetspeedException; import org.apache.jetspeed.request.RequestContext; +import java.util.Locale; + /** * Jetspeed environment * <br/> @@ -112,7 +112,7 @@ public class Jetspeed { ComponentManager manager = getComponentManager(); if (manager != null) - return (PortalConfiguration)manager.getComponent("PortalConfiguration"); + return manager.lookupComponent("PortalConfiguration"); return null; } Modified: portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java?rev=1536817&r1=1536816&r2=1536817&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java Tue Oct 29 17:11:29 2013 @@ -16,13 +16,17 @@ */ package org.apache.jetspeed.portlet; -import java.io.IOException; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.HashSet; -import java.util.List; +import org.apache.jetspeed.Jetspeed; +import org.apache.jetspeed.JetspeedActions; +import org.apache.jetspeed.components.portletregistry.PortletRegistry; +import org.apache.jetspeed.container.JetspeedPortletConfig; +import org.apache.jetspeed.factory.PortletFactory; +import org.apache.jetspeed.factory.PortletInstance; +import org.apache.jetspeed.om.portlet.PortletApplication; +import org.apache.jetspeed.om.portlet.PortletDefinition; +import org.apache.jetspeed.om.portlet.Supports; +import org.apache.jetspeed.util.BaseObjectProxy; +import org.apache.jetspeed.util.GenericPortletUtils; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -38,18 +42,13 @@ import javax.portlet.UnavailableExceptio import javax.portlet.WindowState; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; - -import org.apache.jetspeed.Jetspeed; -import org.apache.jetspeed.JetspeedActions; -import org.apache.jetspeed.components.portletregistry.PortletRegistry; -import org.apache.jetspeed.container.JetspeedPortletConfig; -import org.apache.jetspeed.factory.PortletFactory; -import org.apache.jetspeed.factory.PortletInstance; -import org.apache.jetspeed.om.portlet.PortletApplication; -import org.apache.jetspeed.om.portlet.PortletDefinition; -import org.apache.jetspeed.om.portlet.Supports; -import org.apache.jetspeed.util.BaseObjectProxy; -import org.apache.jetspeed.util.GenericPortletUtils; +import java.io.IOException; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.util.HashSet; +import java.util.List; /** * PortletObjectProxy @@ -350,9 +349,9 @@ public class PortletObjectProxy extends private PortletInstance getPortletInstance(String portletUniqueName) throws PortletException { - PortletRegistry registry = (PortletRegistry) Jetspeed.getComponentManager().getComponent("portletRegistry"); - PortletFactory portletFactory = (PortletFactory) Jetspeed.getComponentManager().getComponent("portletFactory"); - ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().getComponent("ServletConfig")).getServletContext(); + PortletRegistry registry = Jetspeed.getComponentManager().lookupComponent("portletRegistry"); + PortletFactory portletFactory = Jetspeed.getComponentManager().lookupComponent("portletFactory"); + ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().lookupComponent("ServletConfig")).getServletContext(); PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName(portletUniqueName, true); PortletApplication portletApp = portletDef.getApplication(); --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscr...@portals.apache.org For additional commands, e-mail: jetspeed-dev-h...@portals.apache.org