org.broadleafcommerce.openadmin.server.service
Class UtilityRemoteService

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.UtilityRemoteService
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, UtilityService, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Service(value="blUtilityRemoteService")
public class UtilityRemoteService
extends Object
implements org.springframework.context.ApplicationContextAware, UtilityService

Author:
jfischer

Field Summary
protected  String assetServerUrlPrefix
           
protected  DynamicEntityDao dynamicEntityDao
           
protected  ExploitProtectionService exploitProtectionService
           
protected  String storeFrontWebAppPrefix
           
 
Constructor Summary
UtilityRemoteService()
           
 
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.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setAssetServerUrlPrefix(String assetServerUrlPrefix)
           
 void setStoreFrontWebAppPrefix(String storeFrontWebAppPrefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

storeFrontWebAppPrefix

@Value(value="${store.front.webapp.prefix}")
protected String storeFrontWebAppPrefix

assetServerUrlPrefix

@Value(value="${asset.server.url.prefix.internal}")
protected String assetServerUrlPrefix

exploitProtectionService

protected ExploitProtectionService exploitProtectionService

dynamicEntityDao

protected DynamicEntityDao dynamicEntityDao
Constructor Detail

UtilityRemoteService

public UtilityRemoteService()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getWebAppContext

public String getWebAppContext()
                        throws ServiceException
Description copied from interface: UtilityService
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.

Specified by:
getWebAppContext in interface UtilityService
Returns:
The first part of the app url that constitutes the web application context (if any).
Throws:
ServiceException

getStoreFrontWebAppPrefix

public String getStoreFrontWebAppPrefix()
                                 throws ServiceException
Description copied from interface: UtilityService
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.

Specified by:
getStoreFrontWebAppPrefix in interface UtilityService
Returns:
The first part of the storefront url that constitutes the web application context (if any)
Throws:
ServiceException

setStoreFrontWebAppPrefix

public void setStoreFrontWebAppPrefix(String storeFrontWebAppPrefix)

getAssetServerUrlPrefix

public String getAssetServerUrlPrefix()
                               throws ServiceException
Description copied from interface: UtilityService
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'

Specified by:
getAssetServerUrlPrefix in interface UtilityService
Returns:
The key portion of the url that identifies CMS managed asset requests
Throws:
ServiceException

setAssetServerUrlPrefix

public void setAssetServerUrlPrefix(String assetServerUrlPrefix)

getAllItems

public String[] getAllItems()
                     throws ServiceException,
                            com.gwtincubator.security.exception.ApplicationSecurityException
Description copied from interface: UtilityService
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

Specified by:
getAllItems in interface UtilityService
Returns:
All the context and prefix values
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException

getWorkflowEnabled

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

Specified by:
getWorkflowEnabled in interface UtilityService
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

public void initializeEJB3Configuration()
                                 throws ServiceException,
                                        com.gwtincubator.security.exception.ApplicationSecurityException
Description copied from interface: UtilityService
Initizialize Hibernate EJB3Configuration. This is a one-time cost.

Specified by:
initializeEJB3Configuration in interface UtilityService
Throws:
ServiceException
com.gwtincubator.security.exception.ApplicationSecurityException


Copyright © 2013. All Rights Reserved.