[ 
https://issues.apache.org/jira/browse/SLING-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026498#comment-15026498
 ] 

Thierry Ygé commented on SLING-5329:
------------------------------------

I think about something like this in the ClientSideTeleporter.java would help:
{code}
    private final HashMap<String, String> customManifestEntry = new 
HashMap<String,String>();

   private InputStream buildTestBundle(Class<?> c, Collection<Class<?>> 
embeddedClasses, String bundleSymbolicName) throws IOException {
...
        for (Map.Entry<String,String> entry:customManifestEntry.entrySet()) {
            b.set(entry.getKey(), entry.getValue());
        }
...        
        return b.build(TinyBundles.withBnd());
    }

    public ClientSideTeleporter addCustomManifestEntry(String entryName, String 
entryValue) {
        customManifestEntry.put(entryName, entryValue);
        return this;
    }
{code}

So in a custom TeleporterRule.Customizer, it would be possible to do something 
like:

    public void customize(TeleporterRule teleporterRule, String s) {
        final ClientSideTeleporter cst = (ClientSideTeleporter) teleporterRule;
        cst.addCustomManifestEntry("Sling-Initial-Content", 
"/SLING-INF/content;uninstall:=true");
    }

or anything else which might be required by a future serverside test.
wdty ?

cc [~bdelacretaz]

> Add add a method to add custom value to the generated manifest
> --------------------------------------------------------------
>
>                 Key: SLING-5329
>                 URL: https://issues.apache.org/jira/browse/SLING-5329
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>    Affects Versions: JUnit Tests Teleporter 1.0.4
>            Reporter: Thierry Ygé
>
> Currently it is not possible to add any value to the generated manifest in 
> the ClientSideTeleporter, which uses TinyBundle.
> It would allow to add for example the Sling-Initial-Content information, so 
> when the ClientSideTeleporter install the bundle on the serverside, it would 
> also install content. Maybe other needs in the future will require to add 
> values in the manifest.
> I will open also another issue to suggest to implement a new method to 
> include easily test content to the generated bundle.
> cc [~bdelacretaz] [~radu.cotescu]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to