Some renames/reorgnization of classes
parent
8b93880488
commit
8dc28751bc
|
|
@ -34,7 +34,7 @@ import javax.ws.rs.PathParam;
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Controller
|
@Controller
|
||||||
@Path("/applications/content-sections")
|
@Path("/applications/contentsections")
|
||||||
public class ContentSectionApplicationController
|
public class ContentSectionApplicationController
|
||||||
implements ApplicationController {
|
implements ApplicationController {
|
||||||
|
|
||||||
|
|
@ -49,7 +49,7 @@ public class ContentSectionApplicationController
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getControllerLink() {
|
public String getControllerLink() {
|
||||||
return "applications/content-sections";
|
return "applications/contentsections";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|
@ -71,7 +71,7 @@ public class ContentSectionApplicationController
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
|
|
||||||
return "org/libreccm/ui/admin/applications/content-sections/content-sections.xhtml";
|
return "org/libreccm/ui/admin/applications/contentsections/contentsections.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
|
|
@ -84,7 +84,7 @@ public class ContentSectionApplicationController
|
||||||
) {
|
) {
|
||||||
sectionManager.createContentSection(label);
|
sectionManager.createContentSection(label);
|
||||||
|
|
||||||
return "redirect:applications/content-sections";
|
return "redirect:applications/contentsections";
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
|
|
@ -103,7 +103,7 @@ public class ContentSectionApplicationController
|
||||||
sectionManager.renameContentSection(result.get(), label);
|
sectionManager.renameContentSection(result.get(), label);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:applications/content-sections";
|
return "redirect:applications/contentsections";
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
|
|
@ -122,7 +122,7 @@ public class ContentSectionApplicationController
|
||||||
sectionRepository.delete(result.get());
|
sectionRepository.delete(result.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:applications/content-sections";
|
return "redirect:applications/contentsections";
|
||||||
}
|
}
|
||||||
|
|
||||||
private ContentSectionTableRow buildContentSectionTableRow(
|
private ContentSectionTableRow buildContentSectionTableRow(
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import org.libreccm.ui.IsAuthenticatedFilter;
|
import org.libreccm.ui.IsAuthenticatedFilter;
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ public class ContentSectionApplication extends Application {
|
||||||
final Set<Class<?>> classes = new HashSet<>();
|
final Set<Class<?>> classes = new HashSet<>();
|
||||||
|
|
||||||
classes.add(IsAuthenticatedFilter.class);
|
classes.add(IsAuthenticatedFilter.class);
|
||||||
classes.add(ContentSectionController.class);
|
classes.add(DocumentFolderController.class);
|
||||||
|
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import org.librecms.contentsection.ContentSection;
|
import org.librecms.contentsection.ContentSection;
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
@ -54,17 +54,18 @@ import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.PathParam;
|
import javax.ws.rs.PathParam;
|
||||||
import javax.ws.rs.QueryParam;
|
import javax.ws.rs.QueryParam;
|
||||||
|
|
||||||
|
import org.librecms.ui.CmsAdminMessages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Controller
|
@Controller
|
||||||
@Path("/{sectionIdentifier}")
|
@Path("/{sectionIdentifier}/documentfolders")
|
||||||
public class ContentSectionController {
|
public class DocumentFolderController {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(
|
private static final Logger LOGGER = LogManager.getLogger(DocumentFolderController.class
|
||||||
ContentSectionController.class
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
@ -113,7 +114,7 @@ public class ContentSectionController {
|
||||||
private PermissionChecker permissionChecker;
|
private PermissionChecker permissionChecker;
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/document-folders{folderPath:(/.+)?}")
|
@Path("/{folderPath:(/.+)?}")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String listItems(
|
public String listItems(
|
||||||
|
|
@ -195,7 +196,7 @@ public class ContentSectionController {
|
||||||
} else {
|
} else {
|
||||||
models.put("contentSection", section.getLabel());
|
models.put("contentSection", section.getLabel());
|
||||||
models.put("folderPath", folderPath);
|
models.put("folderPath", folderPath);
|
||||||
return "org/librecms/ui/content-section/document-folder-not-found.xhtml";
|
return "org/librecms/ui/contentsection/documentfolder/documentfolder-not-found.xhtml";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -238,14 +239,14 @@ public class ContentSectionController {
|
||||||
System.currentTimeMillis() - rowsStart
|
System.currentTimeMillis() - rowsStart
|
||||||
);
|
);
|
||||||
|
|
||||||
return "org/librecms/ui/content-section/document-folder.xhtml";
|
return "org/librecms/ui/contentsection/documentfolder/documentfolder.xhtml";
|
||||||
} else {
|
} else {
|
||||||
models.put("sectionidentifier", sectionIdentifier);
|
models.put("sectionidentifier", sectionIdentifier);
|
||||||
return "org/librecms/ui/content-section/access-denied.xhtml";
|
return "org/librecms/ui/contentsection/access-denied.xhtml";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
models.put("sectionIdentifier", sectionIdentifier);
|
models.put("sectionIdentifier", sectionIdentifier);
|
||||||
return "org/librecms/ui/content-section/contentsection-not-found.xhtml";
|
return "org/librecms/ui/contentsection/contentsection-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -326,20 +327,20 @@ public class ContentSectionController {
|
||||||
models.put(
|
models.put(
|
||||||
"testdataMessage", "Test data created successfully."
|
"testdataMessage", "Test data created successfully."
|
||||||
);
|
);
|
||||||
return "org/librecms/ui/content-section/testdata.xhtml";
|
return "org/librecms/ui/contentsection/documentfolder/testdata.xhtml";
|
||||||
} else {
|
} else {
|
||||||
models.put(
|
models.put(
|
||||||
"testdataMessage", "Test data was already created..."
|
"testdataMessage", "Test data was already created..."
|
||||||
);
|
);
|
||||||
return "org/librecms/ui/content-section/testdata.xhtml";
|
return "org/librecms/ui/contentsection/documentfolder/testdata.xhtml";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
models.put("sectionidentifier", sectionIdentifier);
|
models.put("sectionidentifier", sectionIdentifier);
|
||||||
return "org/librecms/ui/content-section/access-denied.xhtml";
|
return "org/librecms/ui/contentsection/access-denied.xhtml";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
models.put("sectionIdentifier", sectionIdentifier);
|
models.put("sectionIdentifier", sectionIdentifier);
|
||||||
return "org/librecms/ui/content-section/contentsection-not-found.xhtml";
|
return "org/librecms/ui/contentsection/contentsection-not-found.xhtml";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
Loading…
Reference in New Issue