Package hudson.model

Examples of hudson.model.Action


    }

    @Test
    public void testGetAction_returnActionWhenFoundByName()
    {
        final Action expectedAction = mock( Action.class );
        when( mockBuild.getActions() ).thenReturn( new LinkedList<Action>()
        {{
                add( expectedAction );
            }} );

        assertSame( expectedAction, buildWrapper.getAction( expectedAction.getClass().getName() ) );
    }
View Full Code Here


        Vector<Action> ta = new Vector<Action>();

        // add the config link
        if (!getApplicablePropertyDescriptors().isEmpty()) {
            // if there's no property descriptor, there's nothing interesting to configure.
            ta.add(new Action() {
                public String getIconFileName() {
                    if (Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER))
                        return "setting.png";
                    else
                        return null;
View Full Code Here

     *      can be empty but never null
     * @since 1.341
     */
    public Collection<? extends Action> getProjectActions() {
        // delegate to getJobAction (singular) for backward compatible behavior
        Action a = getProjectAction();
        if (a==null)    return Collections.emptyList();
        return Collections.singletonList(a);
    }
View Full Code Here

            el.refresh(delta);
        }

        // TODO: we need some generalization here so that extension points can be notified when a refresh happens?
        for (ExtensionComponent<RootAction> ea : delta.find(RootAction.class)) {
            Action a = ea.getInstance();
            if (!actions.contains(a)) actions.add(a);
        }
    }
View Full Code Here

     *      can be empty but never null.
     * @since 1.341
     */
    public Collection<? extends Action> getProjectActions(MavenModule module) {
        // delegate to getProjectAction (singular) for backward compatible behavior
        Action a = getProjectAction(module);
        if (a==null)    return Collections.emptyList();
        return Collections.singletonList(a);
    }
View Full Code Here

        List<MavenReporter> list = build.projectActionReporters;
        if(list==null)   return;

        for (MavenReporter step : list) {
            if(!added.add(step.getClass()))     continue;   // already added
            Action a = step.getAggregatedProjectAction(this);
            if(a!=null)
                collection.add(a);
        }
    }
View Full Code Here

            return null;
    }

    public Collection<? extends Action> getProjectActions(AbstractProject<?, ?> project) {
        // delegate to getJobAction (singular) for backward compatible behavior
        Action a = getProjectAction(project);
        if (a==null)    return Collections.emptyList();
        return Collections.singletonList(a);
    }
View Full Code Here

            assertEquals(contextPath + "/" + itUrl + path, result);
        }
    }

    private static Action createMockAction(String uri) {
        Action action = mock(Action.class);
        when(action.getUrlName()).thenReturn(uri);
        return action;
    }
View Full Code Here

     *      can be empty but never null.
     * @since 1.21
     */
    public Collection<? extends Action> getProjectActions(IvyModule module) {
        // delegate to getProjectAction (singular) for backward compatible behavior
        Action a = getProjectAction(module);
        if (a==null)    return Collections.emptyList();
        return Collections.singletonList(a);
    }
View Full Code Here

        List<IvyReporter> list = build.projectActionReporters;
        if(list==null)   return;

        for (IvyReporter step : list) {
            if(!added.add(step.getClass()))     continue;   // already added
            Action a = step.getAggregatedProjectAction(this);
            if(a!=null)
                collection.add(a);
        }
    }
View Full Code Here

TOP

Related Classes of hudson.model.Action

Copyright © 2018 www.massapicom. 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.