/* * Copyright 2013 gitblit.com. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gitblit; import javax.inject.Singleton; import com.gitblit.manager.AuthenticationManager; import com.gitblit.manager.FederationManager; import com.gitblit.manager.IAuthenticationManager; import com.gitblit.manager.IFederationManager; import com.gitblit.manager.IGitblit; import com.gitblit.manager.INotificationManager; import com.gitblit.manager.IPluginManager; import com.gitblit.manager.IProjectManager; import com.gitblit.manager.IRepositoryManager; import com.gitblit.manager.IRuntimeManager; import com.gitblit.manager.IUserManager; import com.gitblit.manager.NotificationManager; import com.gitblit.manager.PluginManager; import com.gitblit.manager.ProjectManager; import com.gitblit.manager.RepositoryManager; import com.gitblit.manager.RuntimeManager; import com.gitblit.manager.UserManager; import com.gitblit.transport.ssh.FileKeyManager; import com.gitblit.transport.ssh.IPublicKeyManager; import com.gitblit.transport.ssh.MemoryKeyManager; import com.gitblit.transport.ssh.NullKeyManager; import com.gitblit.utils.StringUtils; import com.gitblit.wicket.GitBlitWebApp; import dagger.Module; import dagger.Provides; /** * DaggerModule references all injectable objects. * * @author James Moger * */ @Module( library = true, injects = { IStoredSettings.class, // core managers IRuntimeManager.class, IPluginManager.class, INotificationManager.class, IUserManager.class, IAuthenticationManager.class, IPublicKeyManager.class, IRepositoryManager.class, IProjectManager.class, IFederationManager.class, // the monolithic manager IGitblit.class, // the Gitblit Wicket app GitBlitWebApp.class } ) public class DaggerModule { @Provides @Singleton IStoredSettings provideSettings() { return new FileSettings(); } @Provides @Singleton IRuntimeManager provideRuntimeManager(IStoredSettings settings) { return new RuntimeManager(settings); } @Provides @Singleton IPluginManager providePluginManager(IRuntimeManager runtimeManager) { return new PluginManager(runtimeManager); } @Provides @Singleton INotificationManager provideNotificationManager(IStoredSettings settings) { return new NotificationManager(settings); } @Provides @Singleton IUserManager provideUserManager( IRuntimeManager runtimeManager, IPluginManager pluginManager) { return new UserManager(runtimeManager, pluginManager); } @Provides @Singleton IAuthenticationManager provideAuthenticationManager( IRuntimeManager runtimeManager, IUserManager userManager) { return new AuthenticationManager( runtimeManager, userManager); } @Provides @Singleton IPublicKeyManager providePublicKeyManager( IStoredSettings settings, IRuntimeManager runtimeManager) { String clazz = settings.getString(Keys.git.sshKeysManager, FileKeyManager.class.getName()); if (StringUtils.isEmpty(clazz)) { clazz = FileKeyManager.class.getName(); } if (FileKeyManager.class.getName().equals(clazz)) { return new FileKeyManager(runtimeManager); } else if (NullKeyManager.class.getName().equals(clazz)) { return new NullKeyManager(); } else if (MemoryKeyManager.class.getName().equals(clazz)) { return new MemoryKeyManager(); } else { try { Class mgrClass = Class.forName(clazz); return (IPublicKeyManager) mgrClass.newInstance(); } catch (Exception e) { } return null; } } @Provides @Singleton IRepositoryManager provideRepositoryManager( IRuntimeManager runtimeManager, IPluginManager pluginManager, IUserManager userManager) { return new RepositoryManager( runtimeManager, pluginManager, userManager); } @Provides @Singleton IProjectManager provideProjectManager( IRuntimeManager runtimeManager, IUserManager userManager, IRepositoryManager repositoryManager) { return new ProjectManager( runtimeManager, userManager, repositoryManager); } @Provides @Singleton IFederationManager provideFederationManager( IRuntimeManager runtimeManager, INotificationManager notificationManager, IRepositoryManager repositoryManager) { return new FederationManager( runtimeManager, notificationManager, repositoryManager); } @Provides @Singleton IGitblit provideGitblit( IRuntimeManager runtimeManager, IPluginManager pluginManager, INotificationManager notificationManager, IUserManager userManager, IAuthenticationManager authenticationManager, IPublicKeyManager publicKeyManager, IRepositoryManager repositoryManager, IProjectManager projectManager, IFederationManager federationManager) { return new GitBlit( runtimeManager, pluginManager, notificationManager, userManager, authenticationManager, publicKeyManager, repositoryManager, projectManager, federationManager); } @Provides @Singleton GitBlitWebApp provideWebApplication( IRuntimeManager runtimeManager, IPluginManager pluginManager, INotificationManager notificationManager, IUserManager userManager, IAuthenticationManager authenticationManager, IPublicKeyManager publicKeyManager, IRepositoryManager repositoryManager, IProjectManager projectManager, IFederationManager federationManager, IGitblit gitblit) { return new GitBlitWebApp( runtimeManager, pluginManager, notificationManager, userManager, authenticationManager, publicKeyManager, repositoryManager, projectManager, federationManager, gitblit); } }in_PDF&id=44599be432e46f8a42060e28bb9e956af2203350'>commitdiffstats
path: root/test/layoutengine/standard-testcases/external-graphic_gif.xml
blob: b500313a0adef7d09ff9e2f82a09ac19b39ff2b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id$ -->
<testcase>
  <info>
    <p>
      This test checks external-graphics.
    </p>
  </info>
  <fo>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:flow flow-name="xsl-region-body">
          <fo:block>GIF external-graphic</fo:block>
          <fo:block>
            <fo:external-graphic src="../../resources/images/bgimg72dpi.gif"/>EOG
          </fo:block>
          <fo:block>EOF</fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <eval expected="192000" xpath="//flow/block[2]/lineArea/viewport/@ipd"/>
    <eval expected="192000" xpath="//flow/block[2]/lineArea/viewport/@ipda"/>
    <eval expected="192000" xpath="//flow/block[2]/lineArea/viewport/@bpd"/>
    <eval expected="192000" xpath="//flow/block[2]/lineArea/viewport/@bpda"/>
  </checks>
</testcase>