Examples of XPlannerProperties


Examples of org.nxplanner.XPlannerProperties

import org.nxplanner.XPlannerProperties;

public class SimpleWikiAdapter implements ExternalWikiAdapter {
    public String formatWikiWord(String wikiWord) {
        String url = new XPlannerProperties().get().getProperty("twiki.scheme.wiki");
        if (url != null) {
            url = url.replaceAll("\\$1", wikiWord);
            return "<a href='" + url + "'>" + wikiWord + "</a>";
        } else {
            return wikiWord;
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private String existingTopicUrlPattern;
    private String newTopicUrlPattern;
    public String newTopicPattern;

    public GenericWikiAdapter() {
        XPlannerProperties properties = new XPlannerProperties();
        initialize(properties);
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    }

    private synchronized void initializeQueryTranslations() {
        if (queryTranslations == null) {
            queryTranslations = new HashMap();
            String translations = new XPlannerProperties().getProperty("hibernate.query.substitutions");
            String[] translation = translations.split("\\s*,\\s*");
            for (int i = 0; i < translation.length; i++) {
                String[] keyAndValue = translation[i].split("=");
                if (keyAndValue.length == 2) {
                    String value = keyAndValue[1];
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

        form = new UserStoryEditorForm();
        form.setName("name");
    }

    public void testReset() {
        form.reset(support.mapping, support.request,new XPlannerProperties(){
            public String getProperty(String key) {
                return null;
            }
        });
        assertNull("action not reset", form.getAction());
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

        assertEquals("priority not reset", UserStoryEditorForm.DEFAULT_PRIORITY, form.getPriority());
        assertEquals("estimateHours not reset", 0.0, form.getEstimatedHours(), 0);
    }

    public void testPriorityProperty () {
        XPlannerProperties props = new XPlannerProperties();
        Properties properties = props.get();
        properties.setProperty(UserStoryEditorForm.DEFAULT_PRIORITY_KEY, "20976");
        form.resetPriority(props);
        assertEquals("property not be used", 20976, form.getPriority());

    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private OutlineTag outlineTag;
    private Properties properties;

    public void setUp() throws Exception {
        support = new XPlannerTestSupport();
        properties = new XPlannerProperties().get();
        outlineTag = new OutlineTag();
        outlineTag.setPageContext(support.pageContext);
        support.mapping.setPath("/page.jsp");
        support.request.setContextPath("/xplanner");
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    }

    private HttpServletRequest setUpRequest() throws Exception {
        HttpServletRequestSimulator request = new HttpServletRequestSimulator();
        HashSet principals = new HashSet();
        XPlannerProperties properties = new XPlannerProperties();
        String userId = getUserId() != null ?
                getUserId() : properties.getProperty("xplanner.test.user");
        principals.add(new PersonPrincipal(getPerson(ThreadSession.get(), userId)));
        SecurityHelper.setSubject(request, new Subject(true, principals, new HashSet(), new HashSet()));
        return request;
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    private XPlannerProperties properties;
    private String baseUrl;
    private static Session hibernateSession;

    public XPlannerWebTesterImpl() {
        properties = new XPlannerProperties();
        baseUrl = properties.getProperty("xplanner.test.url");
        getTestContext().setBaseUrl(baseUrl);
        getTestContext().setResourceBundleName(RESOURCE_BUNDLE_NAME);
    }
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    public RemoteSoapTest(String s) {
        super(s);
    }

    public XPlanner createXPlanner() throws Exception {
        XPlannerProperties properties = new XPlannerProperties();
        String serviceUrl = properties.getProperty("xplanner.test.url") + "/soap/XPlanner";
        String userId = getUserId() != null ? getUserId() : properties.getProperty("xplanner.test.user");
        String password = getPassword() != null ? getPassword() : properties.getProperty("xplanner.test.password");
        XPlannerServiceLocator xplannerServiceLocator = new XPlannerServiceLocator();
        XPlanner xplanner1 = xplannerServiceLocator.getXPlanner(new URL(serviceUrl));
        ((Stub)xplanner1).setUsername(userId);
        ((Stub)xplanner1).setPassword(password);
        XPlanner xplanner = xplanner1;
View Full Code Here

Examples of org.nxplanner.XPlannerProperties

    protected void setUp() throws Exception {
        super.setUp();
        Logger.getRootLogger().setLevel(Level.OFF);
        support = new XPlannerTestSupport();
        properties = new XPlannerProperties().get();
        properties.clear();
        properties.put(AuthenticatorImpl.LOGIN_MODULE_KEY, MockLoginModule.class.getName());
        support.request.setAttribute(HibernateSessionFilter.SESSION_ATTRIBUTE_KEY, support.hibernateSession);
        authenticator = new AuthenticatorImpl();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.