Quickstart Guide for the Impatient

Quickstart instructions for working with the GSF core library, for a new site on a 12c system

  1. Download the GSF core jar ( gsf-core-12.0.2.jar).
  2. Add it to your maven repo & add it to your WCS site build project here:
        <dependency>
          <groupId>tools.gsf</groupId>
          <artifactId>gsf-core</artifactId>
          <version>12.0.2</version>
        </dependency>
  3. Create your service factory class - like this one:
        package com.mycompany.myproject.gsf.config;
    
        import COM.FutureTense.Interfaces.ICS;
    
        import tools.gsf.config.Factory;
        import tools.gsf.config.ServiceProducer;
        import tools.gsf.facade.assetapi.asset.TemplateAssetAccess;
        import tools.gsf.navigation.AssetNode;
        import tools.gsf.navigation.NavService;
    
        import com.mycompany.myproject.gsf.navigation.MainNavService;
    
        /**
         * This is the custom IcsBackedFactory implementation we will be using at myproject.
         *
         * @author fvillalba
         * @author Tony Field
         * @since 29-Sept-2016
         *
         */
        public class IcsBackedFactory extends tools.gsf.config.IcsBackedFactory {
    
            public IcsBackedFactory(ICS ics, Factory delegate) {
                    super(ics, delegate);
            }
    
            /*
             * This is a sample service that the object factory will be able to
             * return - it's accessible in controllers via annotation injection,
             * like
             *
             * @InjectForRequest("mainNavService") private NavService<AssetNode> navSvc;
             *
             * making it incredibly easy to gain quick access to your services inside
             * your WCS 12c controller classes
             */
            @ServiceProducer(cache = true, name="mainNavService")
            public NavService<AssetNode> createMainNavService() {
                    TemplateAssetAccess taa = getObject("templateAssetAccess", TemplateAssetAccess.class);
                return new MainNavService(getICS(), taa);
            }
    
        }
  4. Declare your factory. Add a file called gsf-factory to your jar (if using maven, place the file in the src/main/resources/META-INF folder). It should look like this:
         COM.FutureTense.Interfaces.ICS:com.mycompany.myproject.gsf.config.IcsBackedFactory
  5. Drop your jar, as well as gsf-core-12.0.2.jar, into your app server's WEB-INF/lib folder & re-deploy the application.
  6. Log in to WCS, create a template, and create a groovy WCS controller. Instead of extending Oracle's com.fatwire.assetapi.data.BaseController, extend tools.gsf.controller.InjectingController. It works exactly the same way, except that it's injection-aware. You can now access your nav service, or any other pre-defined injections, in one line (see above).
  7. That's it!

Have a look at the Java API Reference for a review of the services available. Review the User's Guide for more detailed how-to instructions, more about typical usage, as well as some advanced features. Have fun!

GSF Legacy

Sorry, there's no quickstart available for GSF Legacy.