cancel
Showing results for 
Search instead for 
Did you mean: 

surf.xml alfresco setting

luckyafoul
Champ in-the-making
Champ in-the-making
<!– Pick the runtime: classpath, webapp, local, alfresco –>            
             <runtime>alfresco</runtime>

assuming, I dont put have any files in the classpath, webapp, or local

If I use the alfresco option here - what location should I place all the files so that surf can find them in alfresco?

Company Home/ ??

is that configurable? is there any documentation on surf.xml configuration?
3 REPLIES 3

ddraper
World-Class Innovator
World-Class Innovator
Are you writing a standalone Surf application or are you customizing Alfresco Share?

Surf will retrieve its configuration files from a number of different "root" paths, e.g. the classes directory or lib on your web server or from a specific location in the Alfresco repository. The only reason the Alfresco repository is used is for storing Surf objects (configurations, pages, components and module-deployments) that are created from presets. These objects relate to user and site dashboards in Share and are stored under "/Alfresco/Sites/surf-config". All objects are stored in sub-directories that are named after the object type (e.g. "pages", "components", etc). All of this is completely configurable in Surf, either through the Surf configuration files or the Spring application context.

If you're customizing Alfresco Share then this should be left as "alfresco". If you're writing a standalone Surf application then it really depends upon where you're intending to place your Surf configuration files. If you can provide a little bit more context on what you're attempting to achieve it will help me be able to answer your question.

Thanks,
Dave

luckyafoul
Champ in-the-making
Champ in-the-making
Dave,

I am doing a standalone Surf application - well…actually I am starting with the Web Quickstart application and using that as a basis for our website.

Our thought process is that we want all of our content and code in CMS so we can avoid restarting servers. We can just publish content changes and the site will get updated automatically without having to redeploy war/ear files - at least that's the theory.

So for development - we'll have the Surf objects (configurations, pages, components and module-deployments) in the WEB-INF directory for easy local development, but when we deploy to Test->Stage->Production servers, we want the Surf objects in the Alfresco repository.

ddraper
World-Class Innovator
World-Class Innovator
So if you leave the Surf configuration with the "alfresco" runtime this will ensure that your application starts with a Model Object Service (the service that is used to access Surf configuration objects) that is able to use the Alfresco repository to retrieve Surf configuration objects from.  Although Alfresco Share currently only stores configurations, pages, components and module-deployments in the repository it's important to note that this is not the complete list of Surf objects it can store (all other Surf objects: template-instances, themes, component-types, page-types, etc) can all be stored there.

Your use case (manually adding Surf objects to the repository) is not one that I'm aware that we've tested, but I have no reason to believe that it wouldn't work. However, I'd recommend that when creating your application you start by developing as a local web application (by placing your Surf object configuration files in WEB-INF/classes/alfresco/site-data.

What is your planned approach for dealing with WebScripts, application resources (JavaScripts, CSS, images) and templates? Again, I'm sure it should be possible to use the repository to store these but it may be necessary to modify the Surf config/Spring bean configuration to ensure that WebScripts get loaded correctly and you'll need to ensure that you construct your request URLs correctly to retrieve the resources from the respository.

Regards,
Dave