org.broadleafcommerce.openadmin.client.service
Interface UtilityService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
UtilityRemoteService

public interface UtilityService
extends com.google.gwt.user.client.rpc.RemoteService

UtilityService provides several basic functions to the admin revolving around retrieving current context information for the admin app. NOTE - this service is NOT secured. Do not put features in this service interface that require security!

Author:
jfischer

Method Summary
 String[] getAllItems()
          Retrieve all the context and prefix values called out in the interface as a single array.
 String getAssetServerUrlPrefix()
          Retrieve the portion of the url that is key for identifying a request for a CMS managed asset.
 String getStoreFrontWebAppPrefix()
          Retrieve the current web url prefix (if any) for the actual store front associated with this admin instance.
 String getWebAppContext()
          Retrieve the current web application context (if any) in use for this admin application.
 Boolean getWorkflowEnabled(String[] qualifiers)
          Check if any items are enabled for workflow (catalog, assets, pages, or structured content) Can accept additional qualification data for implementations that support.
 void initializeEJB3Configuration()
          Initizialize Hibernate EJB3Configuration.
 

Method Detail

getWebAppContext

String getWebAppContext()
                        throws ServiceException,
                               com.gwtincubator.security.exception.ApplicationSecurityException
Retrieve the current web application context (if any) in use for this admin application. When a web app context is in use, it appears as the first part of the url. For example, in the url http://localhost:8080/broadleafdemo/admin, the web app context is 'broadleafdemo'. Null may be returned if there is no app context.

Returns:
The first part of the app url that constitutes the web application context (if any).
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException

getStoreFrontWebAppPrefix

String getStoreFrontWebAppPrefix()
                                 throws ServiceException,
                                        com.gwtincubator.security.exception.ApplicationSecurityException
Retrieve the current web url prefix (if any) for the actual store front associated with this admin instance. This value is used by the admin to enable preview features for images and the like that are hosted in the store application. For example, if the admin application is located at http://localhost:8080/admin/admin.html: 1) If the store is located at http://localhost:8080/mystore - The store front web app prefix could be /mystore, since it's located on the same server as the admin 2) If the store is located at http://anotherserver:8080/mystore - The store front web app prefix would be http://anotherserver:8080/mystore, since it's located on another server and the full url is required. This value may be null if the admin app and the store front app are the same.

Returns:
The first part of the storefront url that constitutes the web application context (if any)
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException

getAssetServerUrlPrefix

String getAssetServerUrlPrefix()
                               throws ServiceException,
                                      com.gwtincubator.security.exception.ApplicationSecurityException
Retrieve the portion of the url that is key for identifying a request for a CMS managed asset. For example, the URL http://localhost:8080/mystore/cms/staticasset/productImage1.jpg is requesting a static asset (productImage1.jpg) if the assetServerUrlPrefix is set to 'cms/staticasset'. The default value is 'cms/staticasset'

Returns:
The key portion of the url that identifies CMS managed asset requests
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException

getAllItems

String[] getAllItems()
                     throws ServiceException,
                            com.gwtincubator.security.exception.ApplicationSecurityException
Retrieve all the context and prefix values called out in the interface as a single array. The values and ordering are as follows: 1) webAppContext 2) storeFrontWebAppPrefix 3) assetServerUrlPrefix

Returns:
All the context and prefix values
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException

getWorkflowEnabled

Boolean getWorkflowEnabled(String[] qualifiers)
                           throws ServiceException,
                                  com.gwtincubator.security.exception.ApplicationSecurityException
Check if any items are enabled for workflow (catalog, assets, pages, or structured content) Can accept additional qualification data for implementations that support.

Parameters:
qualifiers - additional data useful for making a determination
Returns:
Whether or not any items are enabled for workflow.
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException

initializeEJB3Configuration

void initializeEJB3Configuration()
                                 throws ServiceException,
                                        com.gwtincubator.security.exception.ApplicationSecurityException
Initizialize Hibernate EJB3Configuration. This is a one-time cost.

Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException


Copyright © 2013. All Rights Reserved.