Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.5 beta2, 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other

      Description

      Resource loader that works with Strings. Users should manualy add
      resources to the repository that is know by the factory of this package.

      Below is an example configuration for this loader.
      Note that 'repositoryimpl' is not mandatory;
      if not provided, the factory will fall back on using the default
      implementation of this package.

      stringres.resource.loader.description = Velocity StringResource loader
      stringres.resource.loader.class =
      org.apache.velocity.tools.stringresources.StringResourceLoader
      stringres.resource.loader.repositoryimpl =
      org.apache.velocity.tools.stringresources.StringResourceRepositoryImpl

      Resources can be added to the repository like this:

      StringResourceRepositoryFactory vsRepository = null;
      vsRepository = StringResourceRepositoryFactory.getRepository();
      String myTemplateName = "/somewhere/intherepo/name";
      String myTemplateBody = "Hi, $

      {username}

      ... this is a some template!";
      vsRepository.putStringResource(myTemplateName, myTemplateBody);

      After this, the templates can be retrieved as usual

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551931 ] jira [ 12552704 ]
        Mark Thomas made changes -
        Workflow jira [ 12325058 ] Default workflow, editable Closed status [ 12551931 ]
        Henning Schmiedehausen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henning Schmiedehausen made changes -
        Fix Version/s 1.5 beta2 [ 12312142 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Henning Schmiedehausen made changes -
        Component/s Engine [ 12311337 ]
        Fix Version/s 1.5 [ 12310253 ]
        Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
        Component/s Source [ 12310214 ]
        Bugzilla Id 20677
        Jeff Turner made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 20677 12315053
        Eelco Hillenius created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Eelco Hillenius
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development