Package fr.openwide.maven.artifact.notifier.web.application.common.component

Examples of fr.openwide.maven.artifact.notifier.web.application.common.component.AuthenticatedOnlyButton


   
    projectVersionEditPopup = new ProjectVersionFormPopupPanel("projectVersionEditPopup", FormPanelMode.EDIT);
    add(projectVersionEditPopup);
   
    // Add action
    Button addButton = new AuthenticatedOnlyButton("add") {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected void onConfigure() {
        super.onConfigure();
        setVisible(MavenArtifactNotifierSession.get().hasRoleAdmin());
      }
    };
    addButton.add(new AjaxModalOpenBehavior(projectVersionAddPopup, MouseEvent.CLICK));
    add(addButton);
   
    // Versions
    IModel<Set<ProjectVersion>> setModel = BindingModel.of(getModel(), Binding.project().versions());
    add(new ListView<ProjectVersion>("projectVersions", CollectionToListWrapperModel.of(setModel)) {
      private static final long serialVersionUID = 1L;

      @Override
      protected void populateItem(final ListItem<ProjectVersion> item) {
        item.add(new ArtifactVersionTagPanel("version", BindingModel.of(item.getModel(), Binding.projectVersion().version())));
        item.add(new DateLabel("lastUpdateDate", BindingModel.of(item.getModel(), Binding.projectVersion().lastUpdateDate()),
            DatePattern.SHORT_DATE));
       
        // Changelog link
        item.add(new HideableExternalLink("changelogLink",
            BindingModel.of(item.getModel(), Binding.projectVersion().additionalInformation().changelogUrl().url())));
       
        // Release notes link
        item.add(new HideableExternalLink("releaseNotesLink",
            BindingModel.of(item.getModel(), Binding.projectVersion().additionalInformation().releaseNotesUrl().url())));

        // Announce link
        item.add(new HideableExternalLink("announceLink",
            BindingModel.of(item.getModel(), Binding.projectVersion().additionalInformation().announceUrl().url())));
       
        // Status
        item.add(new BooleanIcon("centralAvailability", new LoadableDetachableModel<Boolean>() {
          private static final long serialVersionUID = 1L;

          @Override
          protected Boolean load() {
            IModel<ProjectVersionStatus> statusModel = BindingModel.of(item.getModel(), Binding.projectVersion().status());
            return ProjectVersionStatus.PUBLISHED_ON_MAVEN_CENTRAL.equals(statusModel.getObject());
          }
        }));
       
        // Edit action
        Button editButton = new AuthenticatedOnlyButton("edit");
        editButton.add(new AjaxModalOpenBehavior(projectVersionEditPopup, MouseEvent.CLICK) {
          private static final long serialVersionUID = 1L;

          @Override
          protected void onShow(AjaxRequestTarget target) {
            super.onShow(target);
View Full Code Here


    // Edit popup
    ProjectFormPopupPanel editProjectPopup = new ProjectFormPopupPanel("editProjectPopup", projectModel);
    add(editProjectPopup);
   
    // Edit button
    Button editButton = new AuthenticatedOnlyButton("editButton");
    editButton.add(new AjaxModalOpenBehavior(editProjectPopup, MouseEvent.CLICK));
    add(editButton);
   
    // Follow
    AjaxLink<Project> follow = new AjaxLink<Project>("follow", projectModel) {
      private static final long serialVersionUID = 1L;
View Full Code Here

        ProjectListPage.linkDescriptor()));
   
    // Add project button
    final ProjectFormPopupPanel addProjectPopup = new ProjectFormPopupPanel("addProjectPopup", FormPanelMode.ADD);
    add(addProjectPopup);
    Button addProjectButton = new AuthenticatedOnlyButton("addProject") {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected void onConfigure() {
        super.onConfigure();
        setVisible(MavenArtifactNotifierSession.get().hasRoleAdmin());
      }
    };
    addProjectButton.add(new AjaxModalOpenBehavior(addProjectPopup, MouseEvent.CLICK));
    add(addProjectButton);

    // Page content
    ProjectPortfolioPanel portfolioPanel = new ProjectPortfolioPanel("portfolio",
        new ProjectDataProvider(searchTermModel), configurer.getPortfolioItemsPerPage());
View Full Code Here

    ArtifactDeprecationFormPopupPanel deprecationPopup = new ArtifactDeprecationFormPopupPanel("deprecationPopup", artifactModel);
    add(deprecationPopup);
   
    // Deprecation status
    add(new EnumLabel<ArtifactDeprecationStatus>("deprecationStatus", BindingModel.of(getModel(), Binding.artifact().deprecationStatus())));
    add(new AuthenticatedOnlyButton("editDeprecation").add(new AjaxModalOpenBehavior(deprecationPopup, MouseEvent.CLICK)));
   
    // Deprecates
    IModel<List<Artifact>> relatedDeprecatedArtifactsModel = new LoadableDetachableModel<List<Artifact>>() {
      private static final long serialVersionUID = 1L;
View Full Code Here

TOP

Related Classes of fr.openwide.maven.artifact.notifier.web.application.common.component.AuthenticatedOnlyButton

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.