CCM NG:
- More work on the ImageStep - Some restructing of the Vaadin Prototype git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4898 8810af33-2d31-482b-a856-94f89814c4dfccm-docs
parent
7e118d9186
commit
51419eb055
|
|
@ -61,28 +61,6 @@
|
|||
</dependency>
|
||||
|
||||
<!-- Vaadin dependencies for Vaadin prototype -->
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-server</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-shared</artifactId>
|
||||
</dependency>
|
||||
<!--<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-themes</artifactId>
|
||||
<version>8.0.4</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-themes</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-client-compiled</artifactId>
|
||||
<version>8.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-cdi</artifactId>
|
||||
|
|
|
|||
|
|
@ -138,12 +138,12 @@ class AssignedImagesTable extends Table {
|
|||
.findBean(ImageStepController.class);
|
||||
|
||||
final ItemAttachment<?> selectedAttachment
|
||||
= moveAttachmentModel
|
||||
= moveAttachmentModel
|
||||
.getSelectedAttachment(state);
|
||||
|
||||
|
||||
final Long destId = Long
|
||||
.parseLong((String) event.getRowKey());
|
||||
|
||||
.parseLong((String) event.getRowKey());
|
||||
|
||||
controller.moveAfter(selectedAttachment, destId);
|
||||
|
||||
}
|
||||
|
|
@ -165,6 +165,10 @@ class AssignedImagesTable extends Table {
|
|||
|
||||
});
|
||||
|
||||
super.setEmptyView(new Label(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.assigned_images.none",
|
||||
CmsConstants.CMS_BUNDLE)));
|
||||
|
||||
}
|
||||
|
||||
private class ThumbnailCellRenderer implements TableCellRenderer {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class AssignedImagesTableModelBuilder extends LockableImpl implements
|
|||
.findBean(ImageStepController.class);
|
||||
|
||||
final List<AssignedImageTableRow> rows = controller
|
||||
.retrieveAssignedImages(selectedItem, selectedLocale);
|
||||
.retrieveAssignedImagesRows(selectedItem, selectedLocale);
|
||||
|
||||
return new AssignedImagesTableModel(rows,
|
||||
state,
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@ package com.arsdigita.cms.ui.authoring.assets.images;
|
|||
|
||||
/**
|
||||
* A container for the data shown in the table of assigned images.
|
||||
*
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
class AvailableImageTableRow {
|
||||
|
||||
|
||||
private long imageId;
|
||||
private String imageUuid;
|
||||
private String title;
|
||||
private String filename;
|
||||
private long width;
|
||||
private long height;
|
||||
|
|
@ -36,11 +37,11 @@ class AvailableImageTableRow {
|
|||
public long getImageId() {
|
||||
return imageId;
|
||||
}
|
||||
|
||||
|
||||
public void setImageId(final long imageId) {
|
||||
this.imageId = imageId;
|
||||
}
|
||||
|
||||
|
||||
public String getImageUuid() {
|
||||
return imageUuid;
|
||||
}
|
||||
|
|
@ -49,6 +50,14 @@ class AvailableImageTableRow {
|
|||
this.imageUuid = imageUuid;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(final String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
|
@ -88,7 +97,5 @@ class AvailableImageTableRow {
|
|||
public void setCaption(final String caption) {
|
||||
this.caption = caption;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,17 +33,15 @@ import com.arsdigita.bebop.event.TableActionEvent;
|
|||
import com.arsdigita.bebop.event.TableActionListener;
|
||||
import com.arsdigita.bebop.form.Submit;
|
||||
import com.arsdigita.bebop.form.TextField;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.bebop.table.TableCellRenderer;
|
||||
import com.arsdigita.bebop.table.TableColumn;
|
||||
import com.arsdigita.bebop.table.TableColumnModel;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
import org.libreccm.cdi.utils.CdiUtil;
|
||||
import org.librecms.CmsConstants;
|
||||
import org.librecms.assets.Image;
|
||||
import org.librecms.contentsection.AttachmentList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -52,12 +50,14 @@ import java.util.List;
|
|||
class AvailableImages extends BoxPanel {
|
||||
|
||||
protected static final int COL_PREVIEW = 0;
|
||||
protected static final int COL_PROPERTIES = 1;
|
||||
protected static final int COL_CAPTION = 2;
|
||||
protected static final int COL_ADD = 3;
|
||||
protected static final int COL_TITLE = 1;
|
||||
protected static final int COL_PROPERTIES = 2;
|
||||
protected static final int COL_CAPTION = 3;
|
||||
protected static final int COL_ADD = 4;
|
||||
|
||||
public AvailableImages(final AttachmentList imagesList,
|
||||
final List<Image> assignedImages) {
|
||||
public AvailableImages(final ImageStep imageStep,
|
||||
final ItemSelectionModel itemSelectionModel,
|
||||
final StringParameter selectedLanguageParam) {
|
||||
|
||||
super(BoxPanel.VERTICAL);
|
||||
|
||||
|
|
@ -65,9 +65,11 @@ class AvailableImages extends BoxPanel {
|
|||
new BoxPanel(BoxPanel.HORIZONTAL));
|
||||
final TextField filterField = new TextField("filter_available_images");
|
||||
filterField.setLabel(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.available_images.filter_label"));
|
||||
"cms.ui.authoring.assets.imagestep.available_images.filter_label",
|
||||
CmsConstants.CMS_BUNDLE));
|
||||
final Submit submitFilter = new Submit(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.available_images.submit_filter"));
|
||||
"cms.ui.authoring.assets.imagestep.available_images.submit_filter",
|
||||
CmsConstants.CMS_BUNDLE));
|
||||
filterForm.add(filterField);
|
||||
filterForm.add(submitFilter);
|
||||
|
||||
|
|
@ -84,7 +86,7 @@ class AvailableImages extends BoxPanel {
|
|||
|
||||
return (int) controller
|
||||
.getNumberOfAvailableImages(
|
||||
assignedImages,
|
||||
itemSelectionModel.getSelectedItem(state),
|
||||
(String) filterField.getValue(state));
|
||||
}
|
||||
|
||||
|
|
@ -105,6 +107,11 @@ class AvailableImages extends BoxPanel {
|
|||
new Label(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.available_images.preview_header",
|
||||
CmsConstants.CMS_BUNDLE))));
|
||||
columnModel.add(new TableColumn(
|
||||
COL_TITLE,
|
||||
new Label(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.available_images.title_header",
|
||||
CmsConstants.CMS_BUNDLE))));
|
||||
columnModel.add(new TableColumn(
|
||||
COL_PROPERTIES,
|
||||
new Label(new GlobalizedMessage(
|
||||
|
|
@ -121,9 +128,8 @@ class AvailableImages extends BoxPanel {
|
|||
"cms.ui.authoring.assets.imagestep.available_images.select_header",
|
||||
CmsConstants.CMS_BUNDLE))));
|
||||
|
||||
table.setModelBuilder(new AvailableImagesTableModelBuilder(imagesList,
|
||||
filterField,
|
||||
paginator));
|
||||
table.setModelBuilder(new AvailableImagesTableModelBuilder(
|
||||
itemSelectionModel, selectedLanguageParam, filterField, paginator));
|
||||
|
||||
table
|
||||
.getColumn(COL_PREVIEW)
|
||||
|
|
@ -135,6 +141,10 @@ class AvailableImages extends BoxPanel {
|
|||
.getColumn(COL_ADD)
|
||||
.setCellRenderer(new AddCellRenderer());
|
||||
|
||||
table.setEmptyView(new Label(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.available_images.none",
|
||||
CmsConstants.CMS_BUNDLE)));
|
||||
|
||||
table.addTableActionListener(new TableActionListener() {
|
||||
|
||||
@Override
|
||||
|
|
@ -146,7 +156,12 @@ class AvailableImages extends BoxPanel {
|
|||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||
final ImageStepController controller = cdiUtil
|
||||
.findBean(ImageStepController.class);
|
||||
controller.attachImage(imagesList, imageId);
|
||||
controller
|
||||
.attachImage(itemSelectionModel
|
||||
.getSelectedItem(event.getPageState()),
|
||||
imageId);
|
||||
|
||||
imageStep.showAssignedImages(event.getPageState());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -155,6 +170,8 @@ class AvailableImages extends BoxPanel {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
super.add(table);
|
||||
}
|
||||
|
||||
private class ThumbnailCellRenderer implements TableCellRenderer {
|
||||
|
|
|
|||
|
|
@ -63,11 +63,13 @@ class AvailableImagesTableModel implements TableModel {
|
|||
switch (columnIndex) {
|
||||
case AvailableImages.COL_PREVIEW:
|
||||
return String
|
||||
.format("%s/content-.sections/%s/images/"
|
||||
.format("%s/content-sections/%s/images/"
|
||||
+ "uuid-%s?width=150&height=100",
|
||||
CCMDispatcherServlet.getContextPath(),
|
||||
CMS.getContext().getContentSection().getLabel(),
|
||||
currentRow.getImageUuid());
|
||||
case AvailableImages.COL_TITLE:
|
||||
return currentRow.getTitle();
|
||||
case AvailableImages.COL_PROPERTIES:
|
||||
final ImageProperties imageProperties = new ImageProperties();
|
||||
imageProperties.setFilename(currentRow.getFilename());
|
||||
|
|
|
|||
|
|
@ -22,15 +22,19 @@ import com.arsdigita.bebop.PageState;
|
|||
import com.arsdigita.bebop.Paginator;
|
||||
import com.arsdigita.bebop.Table;
|
||||
import com.arsdigita.bebop.form.TextField;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.bebop.table.TableModel;
|
||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
|
||||
import org.libreccm.cdi.utils.CdiUtil;
|
||||
import org.librecms.assets.Image;
|
||||
import org.librecms.contentsection.AttachmentList;
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
import org.librecms.contentsection.ItemAttachment;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -41,14 +45,19 @@ public class AvailableImagesTableModelBuilder
|
|||
extends LockableImpl
|
||||
implements TableModelBuilder {
|
||||
|
||||
private final AttachmentList imageList;
|
||||
private final ItemSelectionModel itemSelectionModel;
|
||||
private final StringParameter selectedLanguageParam;
|
||||
private final TextField filterField;
|
||||
private final Paginator paginator;
|
||||
|
||||
public AvailableImagesTableModelBuilder(final AttachmentList imageList,
|
||||
final TextField filterField,
|
||||
final Paginator paginator) {
|
||||
this.imageList = imageList;
|
||||
public AvailableImagesTableModelBuilder(
|
||||
final ItemSelectionModel itemSelectionModel,
|
||||
final StringParameter selectedLanguageParam,
|
||||
final TextField filterField,
|
||||
final Paginator paginator) {
|
||||
|
||||
this.itemSelectionModel = itemSelectionModel;
|
||||
this.selectedLanguageParam = selectedLanguageParam;
|
||||
this.filterField = filterField;
|
||||
this.paginator = paginator;
|
||||
}
|
||||
|
|
@ -57,28 +66,34 @@ public class AvailableImagesTableModelBuilder
|
|||
public TableModel makeModel(final Table table,
|
||||
final PageState state) {
|
||||
|
||||
final List<Image> excludedImages = imageList
|
||||
.getAttachments()
|
||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||
final ImageStepController controller = cdiUtil
|
||||
.findBean(ImageStepController.class);
|
||||
|
||||
final ContentItem selectedItem = itemSelectionModel
|
||||
.getSelectedItem(state);
|
||||
|
||||
final List<ItemAttachment<Image>> imageAttachments = controller
|
||||
.retrieveAssignedImages(selectedItem);
|
||||
|
||||
final List<Image> excludedImages = imageAttachments
|
||||
.stream()
|
||||
.map(attachment -> attachment.getAsset())
|
||||
.filter(asset -> asset instanceof Image)
|
||||
.map(asset -> (Image) asset)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//Paginator count from 1, JPA from 0
|
||||
final int firstResult = paginator.getFirst(state) - 1;
|
||||
final int maxResults = paginator.getPageSize(state);
|
||||
|
||||
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
|
||||
final ImageStepController controller = cdiUtil
|
||||
.findBean(ImageStepController.class);
|
||||
final Locale selectedLocale = new Locale((String) state.getValue(selectedLanguageParam));
|
||||
|
||||
final List<AvailableImageTableRow> rows = controller
|
||||
.getAvailableImageRows(excludedImages,
|
||||
(String) filterField.getValue(state),
|
||||
firstResult,
|
||||
maxResults);
|
||||
|
||||
.getAvailableImageRows(excludedImages,
|
||||
selectedLocale,
|
||||
(String) filterField.getValue(state),
|
||||
firstResult,
|
||||
maxResults);
|
||||
|
||||
return new AvailableImagesTableModel(rows);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,16 +19,15 @@
|
|||
package com.arsdigita.cms.ui.authoring.assets.images;
|
||||
|
||||
import com.arsdigita.bebop.ActionLink;
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
import com.arsdigita.bebop.ControlLink;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.Table;
|
||||
import com.arsdigita.bebop.Text;
|
||||
import com.arsdigita.bebop.parameters.LongParameter;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.ui.GlobalNavigation;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.ResettableContainer;
|
||||
import com.arsdigita.cms.ui.authoring.assets.ItemAttachmentSelectionModel;
|
||||
|
|
@ -54,6 +53,8 @@ import java.util.Locale;
|
|||
descriptionKey = "image_step.description")
|
||||
public class ImageStep extends ResettableContainer {
|
||||
|
||||
public static final String IMAGES_ATTACHMENT_LIST = ".images";
|
||||
|
||||
private final LongParameter moveAttachmentParam;
|
||||
private final ItemAttachmentSelectionModel moveAttachmentModel;
|
||||
|
||||
|
|
@ -61,6 +62,9 @@ public class ImageStep extends ResettableContainer {
|
|||
private final ControlLink addImageLink;
|
||||
private final ActionLink beginLink;
|
||||
private final Table assignedImagesTable;
|
||||
private final Label addImageHeader;
|
||||
private final AvailableImages availableImages;
|
||||
private final ControlLink cancelAddImage;
|
||||
|
||||
public ImageStep(final ItemSelectionModel itemSelectionModel,
|
||||
final AuthoringKitWizard authoringKitWizard,
|
||||
|
|
@ -95,20 +99,42 @@ public class ImageStep extends ResettableContainer {
|
|||
CmsConstants.CMS_BUNDLE,
|
||||
new String[]{title}));
|
||||
});
|
||||
super.add(assignedImagesHeader);
|
||||
assignedImagesHeader.setClassAttr("");
|
||||
|
||||
addImageLink = new ControlLink(new Label(new GlobalizedMessage(
|
||||
addImageHeader = new Label(event -> {
|
||||
final PageState state = event.getPageState();
|
||||
final Label target = (Label) event.getTarget();
|
||||
|
||||
final ContentItem selectedItem = itemSelectionModel
|
||||
.getSelectedItem(state);
|
||||
final String selectedLanguage = (String) state
|
||||
.getValue(selectedLanguageParam);
|
||||
final Locale selectedLocale = new Locale(selectedLanguage);
|
||||
final String title;
|
||||
if (selectedItem.getTitle().hasValue(selectedLocale)) {
|
||||
title = selectedItem.getTitle().getValue(selectedLocale);
|
||||
} else {
|
||||
title = selectedItem.getTitle().getValue(KernelConfig
|
||||
.getConfig()
|
||||
.getDefaultLocale());
|
||||
}
|
||||
|
||||
target.setLabel(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.add_heading",
|
||||
CmsConstants.CMS_BUNDLE,
|
||||
new String[]{title}));
|
||||
});
|
||||
|
||||
addImageLink = new ActionLink(new Label(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.assigned_images.add_image",
|
||||
CmsConstants.CMS_BUNDLE)));
|
||||
addImageLink.addActionListener(event -> {
|
||||
//ToDo
|
||||
showAvailableImages(event.getPageState());
|
||||
});
|
||||
super.add(addImageLink);
|
||||
|
||||
beginLink = new ActionLink(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.assigned_images.move_to_beginning",
|
||||
CmsConstants.CMS_BUNDLE));
|
||||
add(beginLink);
|
||||
|
||||
beginLink.addActionListener(event -> {
|
||||
final PageState state = event.getPageState();
|
||||
|
|
@ -125,14 +151,31 @@ public class ImageStep extends ResettableContainer {
|
|||
assignedImagesTable = new AssignedImagesTable(itemSelectionModel,
|
||||
moveAttachmentModel,
|
||||
selectedLanguageParam);
|
||||
super.add(assignedImagesTable);
|
||||
|
||||
super.add(new Text("Image Step placeholder"));
|
||||
|
||||
cancelAddImage = new ControlLink(new Label(new GlobalizedMessage(
|
||||
"cms.ui.authoring.assets.imagestep.assigned_images.cancel_add_image",
|
||||
CmsConstants.CMS_BUNDLE)));
|
||||
cancelAddImage.addActionListener(event -> {
|
||||
showAssignedImages(event.getPageState());
|
||||
});
|
||||
|
||||
availableImages = new AvailableImages(this,
|
||||
itemSelectionModel,
|
||||
selectedLanguageParam);
|
||||
|
||||
final BoxPanel panel = new BoxPanel(BoxPanel.VERTICAL);
|
||||
panel.add(assignedImagesHeader);
|
||||
panel.add(addImageLink);
|
||||
panel.add(beginLink);
|
||||
panel.add(assignedImagesTable);
|
||||
panel.add(addImageHeader);
|
||||
panel.add(availableImages);
|
||||
super.add(panel);
|
||||
|
||||
moveAttachmentModel.addChangeListener(event -> {
|
||||
|
||||
|
||||
final PageState state = event.getPageState();
|
||||
|
||||
|
||||
if (moveAttachmentModel.getSelectedKey(state) == null) {
|
||||
addImageLink.setVisible(state, true);
|
||||
beginLink.setVisible(state, false);
|
||||
|
|
@ -151,6 +194,27 @@ public class ImageStep extends ResettableContainer {
|
|||
page.setVisibleDefault(addImageLink, true);
|
||||
page.setVisibleDefault(beginLink, false);
|
||||
page.setVisibleDefault(assignedImagesTable, true);
|
||||
page.setVisibleDefault(addImageHeader, false);
|
||||
page.setVisibleDefault(cancelAddImage, false);
|
||||
page.setVisibleDefault(availableImages, false);
|
||||
}
|
||||
|
||||
protected void showAssignedImages(final PageState state) {
|
||||
assignedImagesHeader.setVisible(state, true);
|
||||
addImageLink.setVisible(state, true);
|
||||
assignedImagesTable.setVisible(state, true);
|
||||
addImageHeader.setVisible(state, false);
|
||||
|
||||
availableImages.setVisible(state, false);
|
||||
}
|
||||
|
||||
protected void showAvailableImages(final PageState state) {
|
||||
assignedImagesHeader.setVisible(state, false);
|
||||
addImageLink.setVisible(state, false);
|
||||
assignedImagesTable.setVisible(state, false);
|
||||
addImageHeader.setVisible(state, true);
|
||||
cancelAddImage.setVisible(state, true);
|
||||
availableImages.setVisible(state, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class ImageStepController {
|
|||
|
||||
@Inject
|
||||
private AssetRepository assetRepo;
|
||||
|
||||
|
||||
@Inject
|
||||
private AttachmentListManager attachmentListManager;
|
||||
|
||||
|
|
@ -70,11 +70,10 @@ class ImageStepController {
|
|||
private ItemAttachmentManager attachmentManager;
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected List<AssignedImageTableRow> retrieveAssignedImages(
|
||||
final ContentItem fromContentItem, final Locale selectedLocale) {
|
||||
protected List<ItemAttachment<Image>> retrieveAssignedImages(
|
||||
final ContentItem fromContentItem) {
|
||||
|
||||
Objects.requireNonNull(fromContentItem);
|
||||
Objects.requireNonNull(selectedLocale);
|
||||
|
||||
final ContentItem item = itemRepo
|
||||
.findById(fromContentItem.getObjectId())
|
||||
|
|
@ -83,7 +82,7 @@ class ImageStepController {
|
|||
fromContentItem.getObjectId())));
|
||||
|
||||
final List<AttachmentList> imageLists = attachmentListManager
|
||||
.getAttachmentList(item, ".images");
|
||||
.getAttachmentList(item, ImageStep.IMAGES_ATTACHMENT_LIST);
|
||||
|
||||
if (imageLists.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
|
|
@ -97,18 +96,66 @@ class ImageStepController {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final List<AssignedImageTableRow> rows = attachments
|
||||
final List<ItemAttachment<Image>> imageAttachments = attachments
|
||||
.stream()
|
||||
.sorted((attachment1, attachment2) -> {
|
||||
return attachment1.compareTo(attachment2);
|
||||
})
|
||||
.filter(attachment -> attachment.getAsset() instanceof Image)
|
||||
.map(attachment -> (ItemAttachment<Image>) attachment)
|
||||
.map(imageAttachment -> buildAssignedImageTableRow(imageAttachment,
|
||||
selectedLocale))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return rows;
|
||||
return imageAttachments;
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected List<AssignedImageTableRow> retrieveAssignedImagesRows(
|
||||
final ContentItem fromContentItem, final Locale selectedLocale) {
|
||||
|
||||
// Objects.requireNonNull(fromContentItem);
|
||||
// Objects.requireNonNull(selectedLocale);
|
||||
//
|
||||
// final ContentItem item = itemRepo
|
||||
// .findById(fromContentItem.getObjectId())
|
||||
// .orElseThrow(() -> new IllegalArgumentException(String
|
||||
// .format("No ContentItem with id %d in the database.",
|
||||
// fromContentItem.getObjectId())));
|
||||
//
|
||||
// final List<AttachmentList> imageLists = attachmentListManager
|
||||
// .getAttachmentList(item, ImageStep.IMAGES_ATTACHMENT_LIST);
|
||||
//
|
||||
// if (imageLists.isEmpty()) {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
//
|
||||
// final List<ItemAttachment<?>> attachments = new ArrayList<>();
|
||||
// for (final AttachmentList imageList : imageLists) {
|
||||
// for (final ItemAttachment<?> attachment : imageList.getAttachments()) {
|
||||
// attachments.add(attachment);
|
||||
// }
|
||||
// }
|
||||
final List<ItemAttachment<Image>> imageAttachments
|
||||
= retrieveAssignedImages(
|
||||
fromContentItem);
|
||||
|
||||
// @SuppressWarnings("unchecked")
|
||||
// final List<AssignedImageTableRow> rows = attachments
|
||||
// .stream()
|
||||
// .sorted((attachment1, attachment2) -> {
|
||||
// return attachment1.compareTo(attachment2);
|
||||
// })
|
||||
// .filter(attachment -> attachment.getAsset() instanceof Image)
|
||||
// .map(attachment -> (ItemAttachment<Image>) attachment)
|
||||
// .map(imageAttachment -> buildAssignedImageTableRow(imageAttachment,
|
||||
// selectedLocale))
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// return rows;
|
||||
return imageAttachments
|
||||
.stream()
|
||||
.map(imageAttachment -> buildAssignedImageTableRow(imageAttachment,
|
||||
selectedLocale))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
|
|
@ -208,28 +255,54 @@ class ImageStepController {
|
|||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected long getNumberOfAvailableImages(final List<Image> excluededImages,
|
||||
protected long getNumberOfAvailableImages(final ContentItem selectedItem,
|
||||
final String filter) {
|
||||
|
||||
Objects.requireNonNull(selectedItem);
|
||||
|
||||
final ContentItem item = itemRepo
|
||||
.findById(selectedItem.getObjectId())
|
||||
.orElseThrow(() -> new IllegalArgumentException(String
|
||||
.format("No ContentItem with ID %d in the database.",
|
||||
selectedItem.getObjectId())));
|
||||
|
||||
final List<ItemAttachment<Image>> imageAttachments
|
||||
= retrieveAssignedImages(item);
|
||||
final List<Image> excluededImages = imageAttachments
|
||||
.stream()
|
||||
.map(imageAttachment -> imageAttachment.getAsset())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final CriteriaBuilder criteriaBuilder = entityManager
|
||||
.getCriteriaBuilder();
|
||||
|
||||
final CriteriaQuery<Long> query = criteriaBuilder
|
||||
.createQuery(Long.class);
|
||||
final Root<Image> from = query.from(Image.class);
|
||||
final Join<Image, String> titleJoin = from.join("title.values");
|
||||
final Join<Image, LocalizedString> titleJoin = from.join("title");
|
||||
final Join<Image, String> titleValuesJoin = titleJoin.join("values");
|
||||
|
||||
query
|
||||
.select(criteriaBuilder.count(from));
|
||||
if (filter == null || filter.trim().isEmpty()) {
|
||||
query.where(criteriaBuilder.and(
|
||||
criteriaBuilder.not(from.in(excluededImages)),
|
||||
criteriaBuilder.like(titleJoin, String.format("&s%%", filter))));
|
||||
if (excluededImages != null && !excluededImages.isEmpty()) {
|
||||
query.where(criteriaBuilder.not(from.in(excluededImages)));
|
||||
}
|
||||
} else {
|
||||
query.where(criteriaBuilder.not(from.in(excluededImages)));
|
||||
if (excluededImages == null || excluededImages.isEmpty()) {
|
||||
criteriaBuilder.like(titleValuesJoin,
|
||||
String.format("%s%%", filter));
|
||||
} else {
|
||||
query.where(criteriaBuilder.and(
|
||||
criteriaBuilder.not(from.in(excluededImages)),
|
||||
criteriaBuilder.like(titleValuesJoin,
|
||||
String.format("%s%%", filter))));
|
||||
}
|
||||
}
|
||||
|
||||
return entityManager.createQuery(query).getSingleResult();
|
||||
final long result = entityManager.createQuery(query)
|
||||
.getSingleResult();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
|
|
@ -237,20 +310,31 @@ class ImageStepController {
|
|||
final String filter,
|
||||
final long firstImage,
|
||||
final long maxImages) {
|
||||
|
||||
final CriteriaBuilder criteriaBuilder = entityManager
|
||||
.getCriteriaBuilder();
|
||||
|
||||
final CriteriaQuery<Image> criteriaQuery = criteriaBuilder
|
||||
.createQuery(Image.class);
|
||||
final Root<Image> from = criteriaQuery.from(Image.class);
|
||||
final Join<Image, String> titleJoin = from.join("title.values");
|
||||
final Join<Image, String> titleJoin = from.join("title");
|
||||
final Join<Image, String> titleValuesJoin = titleJoin.join("values");
|
||||
|
||||
if (filter == null || filter.trim().isEmpty()) {
|
||||
criteriaQuery.where(criteriaBuilder.and(
|
||||
criteriaBuilder.not(from.in(excludedImages)),
|
||||
criteriaBuilder.like(titleJoin, String.format("&s%%", filter))));
|
||||
if (excludedImages != null && !excludedImages.isEmpty()) {
|
||||
criteriaQuery.where(criteriaBuilder.not(from.in(
|
||||
excludedImages)));
|
||||
}
|
||||
} else {
|
||||
criteriaQuery.where(criteriaBuilder.not(from.in(excludedImages)));
|
||||
if (excludedImages == null || excludedImages.isEmpty()) {
|
||||
criteriaBuilder.like(titleValuesJoin,
|
||||
String.format("%s%%", filter));
|
||||
} else {
|
||||
criteriaQuery.where(criteriaBuilder.and(
|
||||
criteriaBuilder.not(from.in(excludedImages)),
|
||||
criteriaBuilder.like(titleValuesJoin,
|
||||
String.format("%s%%", filter))));
|
||||
}
|
||||
}
|
||||
|
||||
final TypedQuery<Image> query = entityManager
|
||||
|
|
@ -258,53 +342,70 @@ class ImageStepController {
|
|||
query.setFirstResult((int) firstImage);
|
||||
query.setMaxResults((int) maxImages);
|
||||
|
||||
return query.getResultList();
|
||||
final List<Image> result = query.getResultList();
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected List<AvailableImageTableRow> getAvailableImageRows(
|
||||
final List<Image> excludedImages,
|
||||
final Locale selectedLocale,
|
||||
final String filter,
|
||||
final long firstImage,
|
||||
final long lastImage) {
|
||||
final long lastImage
|
||||
) {
|
||||
|
||||
return getAvailableImages(excludedImages, filter, firstImage, lastImage)
|
||||
return getAvailableImages(excludedImages, filter, firstImage,
|
||||
lastImage)
|
||||
.stream()
|
||||
.map(this::buildAvailableImageRow)
|
||||
.map(image -> buildAvailableImageRow(image, selectedLocale))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
}
|
||||
|
||||
private AvailableImageTableRow buildAvailableImageRow(final Image image) {
|
||||
|
||||
private AvailableImageTableRow buildAvailableImageRow(
|
||||
final Image image, final Locale selectedLocale) {
|
||||
final AvailableImageTableRow row = new AvailableImageTableRow();
|
||||
row.setImageId(image.getObjectId());
|
||||
row.setImageUuid(image.getUuid());
|
||||
row.setTitle(image.getTitle().getValue(selectedLocale));
|
||||
row.setFilename(image.getFileName());
|
||||
row.setWidth(image.getWidth());
|
||||
row.setHeight(row.getHeight());
|
||||
row.setHeight(image.getHeight());
|
||||
row.setType(image.getMimeType().toString());
|
||||
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected void attachImage(final AttachmentList attachmentList,
|
||||
protected void attachImage(final ContentItem contentItem,
|
||||
final long imageId) {
|
||||
|
||||
final AttachmentList addTo = attachmentListManager
|
||||
.getAttachmentList(attachmentList.getListId())
|
||||
.orElseThrow(() -> new IllegalArgumentException(String
|
||||
.format("No AttachmentList with ID %d in the database.",
|
||||
attachmentList.getListId())));
|
||||
|
||||
|
||||
final ContentItem item = itemRepo
|
||||
.findById(contentItem.getObjectId())
|
||||
.orElseThrow(() -> new IllegalArgumentException(String
|
||||
.format("No ContentItem with ID %d in the database.",
|
||||
contentItem.getObjectId())));
|
||||
|
||||
final List<AttachmentList> list = attachmentListManager
|
||||
.getAttachmentList(item, ImageStep.IMAGES_ATTACHMENT_LIST);
|
||||
|
||||
final AttachmentList addTo;
|
||||
if (list == null || list.isEmpty()) {
|
||||
addTo = attachmentListManager
|
||||
.createAttachmentList(item, ImageStep.IMAGES_ATTACHMENT_LIST);
|
||||
} else {
|
||||
addTo = list.get(0);
|
||||
}
|
||||
|
||||
final Image image = assetRepo
|
||||
.findById(imageId, Image.class)
|
||||
.orElseThrow(() -> new IllegalArgumentException(String
|
||||
.orElseThrow(() -> new IllegalArgumentException(String
|
||||
.format("No Image with ID %d in the database.",
|
||||
imageId)));
|
||||
|
||||
attachmentManager.attachAsset(image, attachmentList);
|
||||
|
||||
attachmentManager.attachAsset(image, addTo);
|
||||
}
|
||||
|
||||
private AssignedImageTableRow buildAssignedImageTableRow(
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
*/
|
||||
package org.librecms.contentsection;
|
||||
|
||||
import com.arsdigita.cms.ui.authoring.assets.RelatedInfoStep;
|
||||
import com.arsdigita.cms.ui.authoring.assets.images.ImageStep;
|
||||
|
||||
import org.libreccm.cdi.utils.CdiUtil;
|
||||
import org.libreccm.configuration.Configuration;
|
||||
import org.libreccm.configuration.ConfigurationManager;
|
||||
|
|
@ -120,8 +123,8 @@ public class ContentSectionConfig {
|
|||
@Setting
|
||||
private List<String> defaultAuthoringSteps = Arrays
|
||||
.asList(new String[]{
|
||||
"com.arsdigita.cms.ui.authoring.assets.ImageStep",
|
||||
"com.arsdigita.cms.ui.authoring.assets.RelatedInfoStep"});
|
||||
ImageStep.class.getName(),
|
||||
RelatedInfoStep.class.getName()});
|
||||
|
||||
public static ContentSectionConfig getConfig() {
|
||||
final ConfigurationManager confManager = CdiUtil.createCdiUtil()
|
||||
|
|
|
|||
|
|
@ -405,3 +405,10 @@ cms.ui.authoring.assets.imagestep.available_images.preview_header=Preview
|
|||
cms.ui.authoring.assets.imagestep.available_images.properties_header=Properties
|
||||
cms.ui.authoring.assets.imagestep.available_images.select_header=Add image
|
||||
cms.ui.authoring.assets.imagestep.available_images.caption_header=Caption
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.add_image=Add image
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.none=No images are assigned to this document.
|
||||
cms.ui.authoring.assets.imagestep.add_heading=Add image to document {0}
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.cancel_add_image=Cancel
|
||||
cms.ui.authoring.assets.imagestep.available_images.none=No images available
|
||||
cms.ui.authoring.assets.imagestep.available_images.title_header=Title
|
||||
cms.ui.authoring.assets.imagestep.available_images.add=Add
|
||||
|
|
|
|||
|
|
@ -402,3 +402,10 @@ cms.ui.authoring.assets.imagestep.available_images.preview_header=Vorschau
|
|||
cms.ui.authoring.assets.imagestep.available_images.properties_header=Eigenschaften
|
||||
cms.ui.authoring.assets.imagestep.available_images.select_header=Hinzuf\u00fcgen
|
||||
cms.ui.authoring.assets.imagestep.available_images.caption_header=Bildunterschrift
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.add_image=Bild hinzuf\u00fcgen
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.none=Diesem Bild wurden keine Bilder zugewiesen
|
||||
cms.ui.authoring.assets.imagestep.add_heading=Bild zu Dokument {0} hinzuf\u00fcgen
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.cancel_add_image=Abbrechen
|
||||
cms.ui.authoring.assets.imagestep.available_images.none=Keine Bilder verf\u00fcgbar
|
||||
cms.ui.authoring.assets.imagestep.available_images.title_header=Titel
|
||||
cms.ui.authoring.assets.imagestep.available_images.add=Hinzuf\u00fcgen
|
||||
|
|
|
|||
|
|
@ -361,3 +361,10 @@ cms.ui.authoring.assets.imagestep.available_images.preview_header=Preview
|
|||
cms.ui.authoring.assets.imagestep.available_images.properties_header=Properties
|
||||
cms.ui.authoring.assets.imagestep.available_images.select_header=Add image
|
||||
cms.ui.authoring.assets.imagestep.available_images.caption_header=Caption
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.add_image=Add image
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.none=No images are assigned to this document.
|
||||
cms.ui.authoring.assets.imagestep.add_heading=Add image to document {0}
|
||||
cms.ui.authoring.assets.imagestep.assigned_images.cancel_add_image=Cancel
|
||||
cms.ui.authoring.assets.imagestep.available_images.none=No images available
|
||||
cms.ui.authoring.assets.imagestep.available_images.title_header=Title
|
||||
cms.ui.authoring.assets.imagestep.available_images.add=Add
|
||||
|
|
|
|||
|
|
@ -202,14 +202,6 @@
|
|||
</dependency>
|
||||
|
||||
<!-- Vaadin dependencies for Vaadin prototype -->
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-server</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-shared</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-themes</artifactId>
|
||||
|
|
@ -220,11 +212,6 @@
|
|||
<artifactId>vaadin-client-compiled</artifactId>
|
||||
<!--<version>8.0.4</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-client-compiled</artifactId>
|
||||
<!--<version>8.0.4</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-cdi</artifactId>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import com.arsdigita.bebop.table.TableModelBuilder;
|
|||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
|
||||
import org.libreccm.admin.ui.usersgroupsroles.UsersGroupsRoles;
|
||||
import org.libreccm.admin.ui.UsersGroupsRoles;
|
||||
import org.libreccm.cdi.utils.CdiUtil;
|
||||
import org.libreccm.security.Group;
|
||||
import org.libreccm.security.Party;
|
||||
|
|
|
|||
|
|
@ -34,10 +34,6 @@ import com.vaadin.ui.Label;
|
|||
import com.vaadin.ui.TabSheet;
|
||||
import com.vaadin.ui.VerticalLayout;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.libreccm.admin.ui.usersgroupsroles.GroupsTableDataProvider;
|
||||
import org.libreccm.admin.ui.usersgroupsroles.RolesTableDataProvider;
|
||||
import org.libreccm.admin.ui.usersgroupsroles.UsersGroupsRoles;
|
||||
import org.libreccm.admin.ui.usersgroupsroles.UsersTableDataProvider;
|
||||
import org.libreccm.l10n.GlobalizationHelper;
|
||||
import org.libreccm.security.GroupManager;
|
||||
import org.libreccm.security.GroupRepository;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Group;
|
||||
import org.libreccm.security.GroupManager;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Group;
|
||||
import org.libreccm.security.GroupRepository;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Group;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.icons.VaadinIcons;
|
||||
import com.vaadin.ui.Button;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -120,7 +120,7 @@ public class JpqlConsole extends CustomComponent {
|
|||
// splitPanel.setSplitPosition(33.3f, Unit.PERCENTAGE);
|
||||
// splitPanel.setFirstComponent(queryForm);
|
||||
// splitPanel.setSecondComponent(resultsLayout);
|
||||
setCompositionRoot(new VerticalLayout(queryLayout, resultsPanel));
|
||||
super.setCompositionRoot(new VerticalLayout(queryLayout, resultsPanel));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Party;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Party;
|
||||
import org.libreccm.security.PartyRepository;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Role;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.icons.VaadinIcons;
|
||||
import com.vaadin.ui.Button;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Group;
|
||||
import org.libreccm.security.GroupManager;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.Role;
|
||||
import org.libreccm.security.RoleManager;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import org.libreccm.security.User;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package org.libreccm.admin.ui.usersgroupsroles;
|
||||
package org.libreccm.admin.ui;
|
||||
|
||||
import com.vaadin.cdi.ViewScoped;
|
||||
import com.vaadin.data.provider.AbstractDataProvider;
|
||||
File diff suppressed because it is too large
Load Diff
26
pom.xml
26
pom.xml
|
|
@ -255,7 +255,7 @@
|
|||
<plugin>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-maven-plugin</artifactId>
|
||||
<version>8.0.6</version>
|
||||
<version>8.1.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
|
@ -401,26 +401,6 @@
|
|||
</dependency>
|
||||
|
||||
<!-- Vaadin dependencies for Vaadin prototype -->
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-client-compiled</artifactId>
|
||||
<version>8.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-server</artifactId>
|
||||
<version>8.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-shared</artifactId>
|
||||
<version>8.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-compatibility-themes</artifactId>
|
||||
<version>8.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-cdi</artifactId>
|
||||
|
|
@ -429,12 +409,12 @@
|
|||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-client-compiled</artifactId>
|
||||
<version>8.0.6</version>
|
||||
<version>8.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-themes</artifactId>
|
||||
<version>8.0.6</version>
|
||||
<version>8.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
|
|
|
|||
Loading…
Reference in New Issue