- Verschiedene Optimierungen und Ergänzungen im Publikationsmodul
- Neues Modul mit Contenttypen für wissenschaftliche Einrichtungen (noch nicht fertiggestellt) git-svn-id: https://svn.libreccm.org/ccm/trunk@543 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1804c32331
commit
b760fd7c1c
|
|
@ -7,7 +7,6 @@
|
||||||
<ccm:dependencies>
|
<ccm:dependencies>
|
||||||
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-cms-types-project" version="6.6.0" relation="ge"/>
|
|
||||||
</ccm:dependencies>
|
</ccm:dependencies>
|
||||||
<ccm:directories>
|
<ccm:directories>
|
||||||
<ccm:directory name="pdl"/>
|
<ccm:directory name="pdl"/>
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
/*
|
|
||||||
* To change this template, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
|
||||||
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
|
||||||
import com.arsdigita.cms.contenttypes.Project;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Jens Pelzetter
|
|
||||||
*/
|
|
||||||
public class DepartmentProjectAddForm
|
|
||||||
extends GenericOrganizationalUnitChildAddForm {
|
|
||||||
|
|
||||||
public DepartmentProjectAddForm(ItemSelectionModel itemModel) {
|
|
||||||
super("ProjectAddForm", itemModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getChildDataObjectType() {
|
|
||||||
return Project.BASE_DATA_OBJECT_TYPE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
* To change this template, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
|
||||||
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
|
||||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
|
||||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Jens Pelzetter
|
|
||||||
*/
|
|
||||||
public class DepartmentProjectPropertiesStep extends SimpleEditStep {
|
|
||||||
|
|
||||||
private static final Logger s_log =
|
|
||||||
Logger.getLogger(DepartmentProjectPropertiesStep.class);
|
|
||||||
private static String ADD_CHILD_SHEET_NAME = "addProject";
|
|
||||||
|
|
||||||
public DepartmentProjectPropertiesStep(
|
|
||||||
ItemSelectionModel itemModel,
|
|
||||||
AuthoringKitWizard parent) {
|
|
||||||
this(itemModel, parent, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DepartmentProjectPropertiesStep(
|
|
||||||
ItemSelectionModel itemModel,
|
|
||||||
AuthoringKitWizard parent,
|
|
||||||
String prefix) {
|
|
||||||
super(itemModel, parent, prefix);
|
|
||||||
|
|
||||||
BasicItemForm addChildSheet = new DepartmentProjectAddForm(itemModel);
|
|
||||||
add(ADD_CHILD_SHEET_NAME,
|
|
||||||
(String) ContenttypesGlobalizationUtil.globalize(
|
|
||||||
"cms.contenttypes.ui.department.add_project").localize(),
|
|
||||||
new WorkflowLockedComponentAccess(addChildSheet, itemModel),
|
|
||||||
addChildSheet.getSaveCancelSection().getCancelButton());
|
|
||||||
|
|
||||||
GenericOrganizationalUnitChildTable childrenTable = new GenericOrganizationalUnitChildTable(
|
|
||||||
itemModel);
|
|
||||||
setDisplayComponent(childrenTable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -28,9 +28,6 @@ public class DepartmentPropertiesStep
|
||||||
addStep(new DepartmentSubDepartmentPropertiesStep(itemModel,
|
addStep(new DepartmentSubDepartmentPropertiesStep(itemModel,
|
||||||
parent),
|
parent),
|
||||||
"cms.contenttypes.ui.orgaunit.subdepartments");
|
"cms.contenttypes.ui.orgaunit.subdepartments");
|
||||||
addStep(new DepartmentProjectPropertiesStep(itemModel,
|
|
||||||
parent),
|
|
||||||
"cms.contenttypes.ui.orgaunit.projects");
|
|
||||||
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
|
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
|
||||||
parent),
|
parent),
|
||||||
"cms.contenttypes.ui.orgaunit.persons");
|
"cms.contenttypes.ui.orgaunit.persons");
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
model com.arsdigita.cms.contenttypes;
|
|
||||||
|
|
||||||
import com.arsdigita.kernel.ACSObject;
|
|
||||||
import com.arsdigita.cms.*;
|
|
||||||
|
|
||||||
object type Project extends GenericOrganizationalUnit {
|
|
||||||
reference key ( ct_projects.project_id );
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package com.arsdigita.cms.contenttypes;
|
|
||||||
|
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
|
||||||
import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.persistence.OID;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Jens Pelzetter
|
|
||||||
*/
|
|
||||||
public class Project extends GenericOrganizationalUnit{
|
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Project";
|
|
||||||
|
|
||||||
public Project() {
|
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Project(BigDecimal id ) throws DataObjectNotFoundException{
|
|
||||||
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Project(OID oid) {
|
|
||||||
super(oid);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Project(DataObject obj) {
|
|
||||||
super(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Project(String type) {
|
|
||||||
super(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -25,8 +25,7 @@ import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.bebop.SaveCancelSection;
|
import com.arsdigita.bebop.SaveCancelSection;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.form.Option;
|
import com.arsdigita.bebop.form.TextField;
|
||||||
import com.arsdigita.bebop.form.SingleSelect;
|
|
||||||
import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
|
|
@ -72,19 +71,17 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm {
|
||||||
ParameterModel roleParam =
|
ParameterModel roleParam =
|
||||||
new StringParameter(
|
new StringParameter(
|
||||||
GenericOrganizationalUnitPersonCollection.PERSON_ROLE);
|
GenericOrganizationalUnitPersonCollection.PERSON_ROLE);
|
||||||
SingleSelect roleSelect = new SingleSelect(roleParam);
|
/*SingleSelect roleSelect = new SingleSelect(roleParam);
|
||||||
roleSelect.addValidationListener(new NotNullValidationListener());
|
roleSelect.addValidationListener(new NotNullValidationListener());
|
||||||
roleSelect.addOption(
|
roleSelect.addOption(
|
||||||
new Option("",
|
new Option("",
|
||||||
new Label((String) ContenttypesGlobalizationUtil.
|
new Label((String) ContenttypesGlobalizationUtil.
|
||||||
globalize("cms.ui.select_one").localize())));
|
globalize("cms.ui.select_one").localize())));
|
||||||
|
|
||||||
roleSelect.addOption(new Option("Dummy", "Dummy"));
|
add(roleSelect);*/
|
||||||
roleSelect.addOption(new Option("Boss", "Boss"));
|
TextField role = new TextField(roleParam);
|
||||||
roleSelect.addOption(new Option("Terrorist", "Terrorist"));
|
role.addValidationListener(new NotNullValidationListener());
|
||||||
|
add(role);
|
||||||
add(roleSelect);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@ public final class ContentCenterSetup {
|
||||||
try {
|
try {
|
||||||
while ( dq.next() ) {
|
while ( dq.next() ) {
|
||||||
String privilege = (String) dq.get(PRIVILEGE);
|
String privilege = (String) dq.get(PRIVILEGE);
|
||||||
|
s_log.warn(String.format("privilege = %s", privilege));
|
||||||
if ( PrivilegeDescriptor.get(privilege) == null ) {
|
if ( PrivilegeDescriptor.get(privilege) == null ) {
|
||||||
PrivilegeDescriptor.createPrivilege(privilege);
|
PrivilegeDescriptor.createPrivilege(privilege);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes a privilege that can be granted or checked.
|
* Describes a privilege that can be granted or checked.
|
||||||
|
|
@ -46,78 +47,70 @@ public class PrivilegeDescriptor {
|
||||||
private static final String WRITE_NAME = "write";
|
private static final String WRITE_NAME = "write";
|
||||||
private static final String CREATE_NAME = "create";
|
private static final String CREATE_NAME = "create";
|
||||||
private static final String DELETE_NAME = "delete";
|
private static final String DELETE_NAME = "delete";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PrivilegeDescriptor corresponding to the primitive admin privilege
|
* The PrivilegeDescriptor corresponding to the primitive admin privilege
|
||||||
*/
|
*/
|
||||||
public static final PrivilegeDescriptor ADMIN =
|
public static final PrivilegeDescriptor ADMIN =
|
||||||
new PrivilegeDescriptor(ADMIN_NAME);
|
new PrivilegeDescriptor(ADMIN_NAME);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PrivilegeDescriptor corresponding to the read and write privilege
|
* The PrivilegeDescriptor corresponding to the read and write privilege
|
||||||
**/
|
**/
|
||||||
public static final PrivilegeDescriptor EDIT =
|
public static final PrivilegeDescriptor EDIT =
|
||||||
new PrivilegeDescriptor(EDIT_NAME);
|
new PrivilegeDescriptor(EDIT_NAME);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PrivilegeDescriptor corresponding to the primitive read privilege
|
* The PrivilegeDescriptor corresponding to the primitive read privilege
|
||||||
*/
|
*/
|
||||||
public static final PrivilegeDescriptor READ =
|
public static final PrivilegeDescriptor READ =
|
||||||
new PrivilegeDescriptor(READ_NAME);
|
new PrivilegeDescriptor(READ_NAME);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PrivilegeDescriptor corresponding to the primitive write privilege
|
* The PrivilegeDescriptor corresponding to the primitive write privilege
|
||||||
*/
|
*/
|
||||||
public static final PrivilegeDescriptor WRITE =
|
public static final PrivilegeDescriptor WRITE =
|
||||||
new PrivilegeDescriptor(WRITE_NAME);
|
new PrivilegeDescriptor(WRITE_NAME);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PrivilegeDescriptor corresponding to the primitive create privilege
|
* The PrivilegeDescriptor corresponding to the primitive create privilege
|
||||||
*/
|
*/
|
||||||
public static final PrivilegeDescriptor CREATE =
|
public static final PrivilegeDescriptor CREATE =
|
||||||
new PrivilegeDescriptor(CREATE_NAME);
|
new PrivilegeDescriptor(CREATE_NAME);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PrivilegeDescriptor corresponding to the primitive delete privilege
|
* The PrivilegeDescriptor corresponding to the primitive delete privilege
|
||||||
*/
|
*/
|
||||||
public static final PrivilegeDescriptor DELETE =
|
public static final PrivilegeDescriptor DELETE =
|
||||||
// new PrivilegeDescriptor(DELETE_NAME);
|
// new PrivilegeDescriptor(DELETE_NAME);
|
||||||
new PrivilegeDescriptor(DELETE_NAME);
|
new PrivilegeDescriptor(DELETE_NAME);
|
||||||
|
|
||||||
private String m_displayName;
|
private String m_displayName;
|
||||||
|
|
||||||
private static Map s_privs = Collections.synchronizedMap(new HashMap());
|
private static Map s_privs = Collections.synchronizedMap(new HashMap());
|
||||||
|
|
||||||
private String m_name;
|
private String m_name;
|
||||||
|
|
||||||
private String m_columnName;
|
private String m_columnName;
|
||||||
|
|
||||||
private Collection m_implyingPrivs;
|
private Collection m_implyingPrivs;
|
||||||
|
private static final Logger s_log = Logger.getLogger(
|
||||||
|
PrivilegeDescriptor.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a privilege, identified by a name (string), to the system.
|
* Adds a privilege, identified by a name (string), to the system.
|
||||||
*
|
*
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
* @exception PersistenceException when there is a persistence
|
* @exception PersistenceException when there is a persistence
|
||||||
* error in saving the new privilege.
|
* error in saving the new privilege.
|
||||||
*
|
*
|
||||||
* @see #get(String)
|
* @see #get(String)
|
||||||
*/
|
*/
|
||||||
public static PrivilegeDescriptor createPrivilege(String name)
|
public static PrivilegeDescriptor createPrivilege(String name)
|
||||||
throws PersistenceException
|
throws PersistenceException {
|
||||||
{
|
if (get(name) != null) {
|
||||||
if (get(name)!=null) {
|
throw new IllegalArgumentException("Privilege " + name
|
||||||
throw new
|
+ " already exists");
|
||||||
IllegalArgumentException("Privilege " + name + " already exists");
|
|
||||||
}
|
}
|
||||||
DataObject priv = SessionManager.getSession()
|
DataObject priv = SessionManager.getSession().create(
|
||||||
.create("com.arsdigita.kernel.permissions.Privilege");
|
"com.arsdigita.kernel.permissions.Privilege");
|
||||||
priv.set("privilege", name);
|
priv.set("privilege", name);
|
||||||
priv.save();
|
priv.save();
|
||||||
addChildPrivilege(ADMIN_NAME, name);
|
addChildPrivilege(ADMIN_NAME, name);
|
||||||
|
s_log.warn(String.format("Creating privilege %s...", name));
|
||||||
// Constructor PrivilegeDescriptor is deprecated and should be
|
// Constructor PrivilegeDescriptor is deprecated and should be
|
||||||
// replace the class method get(name)
|
// replace the class method get(name)
|
||||||
// PrivilegeDescriptor desc = new PrivilegeDescriptor(name);
|
//PrivilegeDescriptor desc = new PrivilegeDescriptor(name);
|
||||||
PrivilegeDescriptor desc = get(name);
|
PrivilegeDescriptor desc = get(name);
|
||||||
put(desc);
|
put(desc);
|
||||||
return desc;
|
return desc;
|
||||||
|
|
@ -130,7 +123,7 @@ public class PrivilegeDescriptor {
|
||||||
* @param privilegeName privilege name will include another privilege
|
* @param privilegeName privilege name will include another privilege
|
||||||
* @param childPrivilegeName privilege name is included by priv...Name.
|
* @param childPrivilegeName privilege name is included by priv...Name.
|
||||||
*/
|
*/
|
||||||
public static void addChildPrivilege( String privilegeName,
|
public static void addChildPrivilege(String privilegeName,
|
||||||
String childPrivilegeName) {
|
String childPrivilegeName) {
|
||||||
|
|
||||||
DataOperation addOp =
|
DataOperation addOp =
|
||||||
|
|
@ -180,8 +173,7 @@ public class PrivilegeDescriptor {
|
||||||
* @see #get(String)
|
* @see #get(String)
|
||||||
*/
|
*/
|
||||||
public void deletePrivilege()
|
public void deletePrivilege()
|
||||||
throws PersistenceException
|
throws PersistenceException {
|
||||||
{
|
|
||||||
OID oid = new OID("com.arsdigita.kernel.permissions.Privilege",
|
OID oid = new OID("com.arsdigita.kernel.permissions.Privilege",
|
||||||
m_name);
|
m_name);
|
||||||
|
|
||||||
|
|
@ -231,7 +223,6 @@ public class PrivilegeDescriptor {
|
||||||
return m_columnName;
|
return m_columnName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether this PrivilegeDescriptor is equal to some other
|
* Determines whether this PrivilegeDescriptor is equal to some other
|
||||||
* PrivilegeDescriptor. Equality is based on privilege name.
|
* PrivilegeDescriptor. Equality is based on privilege name.
|
||||||
|
|
@ -239,7 +230,7 @@ public class PrivilegeDescriptor {
|
||||||
* <code>false</code> otherwise.
|
* <code>false</code> otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (! (o instanceof PrivilegeDescriptor)) {
|
if (!(o instanceof PrivilegeDescriptor)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (m_name == null) {
|
if (m_name == null) {
|
||||||
|
|
@ -264,15 +255,15 @@ public class PrivilegeDescriptor {
|
||||||
public PrivilegeDescriptor(String name) {
|
public PrivilegeDescriptor(String name) {
|
||||||
m_name = name;
|
m_name = name;
|
||||||
|
|
||||||
DataQuery query = SessionManager.getSession()
|
DataQuery query = SessionManager.getSession().retrieveQuery(
|
||||||
.retrieveQuery("com.arsdigita.kernel.permissions.PrivilegeColumnNameMap");
|
"com.arsdigita.kernel.permissions.PrivilegeColumnNameMap");
|
||||||
query.setParameter("privilege", name);
|
query.setParameter("privilege", name);
|
||||||
if (!query.next()) {
|
if (!query.next()) {
|
||||||
query.close();
|
query.close();
|
||||||
throw new
|
throw new RuntimeException("Couldn't find column name for privilege - "
|
||||||
RuntimeException("Couldn't find column name for privilege - " + name );
|
+ name);
|
||||||
} else {
|
} else {
|
||||||
m_columnName = (String)query.get("columnName");
|
m_columnName = (String) query.get("columnName");
|
||||||
}
|
}
|
||||||
query.close();
|
query.close();
|
||||||
}
|
}
|
||||||
|
|
@ -281,8 +272,12 @@ public class PrivilegeDescriptor {
|
||||||
* Puts a privilege descriptor into the internal cache that is used by
|
* Puts a privilege descriptor into the internal cache that is used by
|
||||||
* the get method. The put method supports extendibility by allowing
|
* the get method. The put method supports extendibility by allowing
|
||||||
* subclasses to be returned by the get method.
|
* subclasses to be returned by the get method.
|
||||||
|
* @param privDesc
|
||||||
*/
|
*/
|
||||||
protected static void put(PrivilegeDescriptor privDesc) {
|
protected static void put(PrivilegeDescriptor privDesc) {
|
||||||
|
if (privDesc == null) {
|
||||||
|
throw new NullPointerException("privDesc is null");
|
||||||
|
}
|
||||||
s_privs.put(privDesc.getName(), privDesc);
|
s_privs.put(privDesc.getName(), privDesc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -295,11 +290,11 @@ public class PrivilegeDescriptor {
|
||||||
return m_implyingPrivs;
|
return m_implyingPrivs;
|
||||||
}
|
}
|
||||||
m_implyingPrivs = new HashSet();
|
m_implyingPrivs = new HashSet();
|
||||||
DataQuery query = SessionManager.getSession()
|
DataQuery query = SessionManager.getSession().retrieveQuery(
|
||||||
.retrieveQuery("com.arsdigita.kernel.permissions.ImpliedPrivilege");
|
"com.arsdigita.kernel.permissions.ImpliedPrivilege");
|
||||||
query.setParameter("childPrivilege", m_name);
|
query.setParameter("childPrivilege", m_name);
|
||||||
while (query.next()) {
|
while (query.next()) {
|
||||||
m_implyingPrivs.add((String)query.get("privilege"));
|
m_implyingPrivs.add((String) query.get("privilege"));
|
||||||
}
|
}
|
||||||
return m_implyingPrivs;
|
return m_implyingPrivs;
|
||||||
}
|
}
|
||||||
|
|
@ -334,8 +329,8 @@ public class PrivilegeDescriptor {
|
||||||
* Called from the kernel initializer.
|
* Called from the kernel initializer.
|
||||||
*/
|
*/
|
||||||
public static void initialize() {
|
public static void initialize() {
|
||||||
DataCollection privs = SessionManager.getSession()
|
DataCollection privs = SessionManager.getSession().retrieve(
|
||||||
.retrieve("com.arsdigita.kernel.permissions.Privilege");
|
"com.arsdigita.kernel.permissions.Privilege");
|
||||||
while (privs.next()) {
|
while (privs.next()) {
|
||||||
String name = (String) privs.get("privilege");
|
String name = (String) privs.get("privilege");
|
||||||
final PrivilegeDescriptor desc = new PrivilegeDescriptor(name);
|
final PrivilegeDescriptor desc = new PrivilegeDescriptor(name);
|
||||||
|
|
@ -343,5 +338,4 @@ public class PrivilegeDescriptor {
|
||||||
}
|
}
|
||||||
privs.close();
|
privs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ model com.arsdigita.cms.contenttypes;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
|
||||||
// PDL definition for a collected volume
|
// PDL definition for a collected volume
|
||||||
object type ArticleInCollectedVolume extends PublicationWithPublisher {
|
object type ArticleInCollectedVolume extends Publication {
|
||||||
|
|
||||||
Integer[0..1] pagesFrom = ct_article_in_collected_volume.pages_from INTEGER;
|
Integer[0..1] pagesFrom = ct_article_in_collected_volume.pages_from INTEGER;
|
||||||
Integer[0..1] pagesTo = ct_article_in_collected_volume.pages_to INTEGER;
|
Integer[0..1] pagesTo = ct_article_in_collected_volume.pages_to INTEGER;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ object type ArticleInJournal extends Publication {
|
||||||
Integer[0..1] pagesFrom = ct_article_in_journal.pages_from INTEGER;
|
Integer[0..1] pagesFrom = ct_article_in_journal.pages_from INTEGER;
|
||||||
Integer[0..1] pagesTo = ct_article_in_journal.pages_to INTEGER;
|
Integer[0..1] pagesTo = ct_article_in_journal.pages_to INTEGER;
|
||||||
String[0..1] issn = ct_article_in_journal.issn VARCHAR(9);
|
String[0..1] issn = ct_article_in_journal.issn VARCHAR(9);
|
||||||
String[0..1] url = ct_article_in_journal.url VARCHAR(512);
|
|
||||||
Date[0..1] publicationDate = ct_article_in_journal.publication_date DATE;
|
Date[0..1] publicationDate = ct_article_in_journal.publication_date DATE;
|
||||||
|
|
||||||
reference key (ct_article_in_journal.article_in_journal_id);
|
reference key (ct_article_in_journal.article_in_journal_id);
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@ import com.arsdigita.cms.ContentPage;
|
||||||
// PDL definition for a collected volume
|
// PDL definition for a collected volume
|
||||||
object type CollectedVolume extends PublicationWithPublisher {
|
object type CollectedVolume extends PublicationWithPublisher {
|
||||||
|
|
||||||
Integer[0..1] volume = ct_collected_volume.volume INTEGER;
|
|
||||||
Integer[0..1] numberOfVolumes = ct_collected_volume.number_of_volumes INTEGER;
|
|
||||||
Integer[0..1] numberOfPages = ct_collected_volume._number_of_pages INTEGER;
|
|
||||||
String[0..1] edition = ct_collected_volume.edition VARCHAR(256);
|
|
||||||
|
|
||||||
reference key (ct_collected_volume.collected_volume_id);
|
reference key (ct_collected_volume.collected_volume_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ object type Expertise extends Publication {
|
||||||
component GenericOrganizationalUnit[0..1] organization = join ct_expertise.organization_id
|
component GenericOrganizationalUnit[0..1] organization = join ct_expertise.organization_id
|
||||||
to cms_organizationalunits.organizationalunit_id;
|
to cms_organizationalunits.organizationalunit_id;
|
||||||
Integer[0..1] numberOfPages = ct_expertise.number_of_pages INTEGER;
|
Integer[0..1] numberOfPages = ct_expertise.number_of_pages INTEGER;
|
||||||
String[0..1] url = ct_expertise.url VARCHAR(512);
|
|
||||||
component GenericOrganizationalUnit[0..1] orderer = join ct_expertise.orderer_id
|
component GenericOrganizationalUnit[0..1] orderer = join ct_expertise.orderer_id
|
||||||
to cms_organizationalunits.organizationalunit_id;
|
to cms_organizationalunits.organizationalunit_id;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ object type GreyLiterature extends UnPublished {
|
||||||
|
|
||||||
Integer[0..1] pagesFrom = ct_grey_literature.pagesFrom INTEGER;
|
Integer[0..1] pagesFrom = ct_grey_literature.pagesFrom INTEGER;
|
||||||
Integer[0..1] pagesTo = ct_grey_literature.pagesTo INTEGER;
|
Integer[0..1] pagesTo = ct_grey_literature.pagesTo INTEGER;
|
||||||
String[0..1] url = ct_grey_literature.url VARCHAR(512);
|
|
||||||
|
|
||||||
reference key (ct_grey_literature.grey_literature_id);
|
reference key (ct_grey_literature.grey_literature_id);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,8 @@ model com.arsdigita.cms.contenttypes;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
|
||||||
// PDL definition for InProceedings publication
|
// PDL definition for InProceedings publication
|
||||||
object type InProceedings extends PublicationWithPublisher {
|
object type InProceedings extends Publication {
|
||||||
|
|
||||||
String[0..1] organizerOfConference = ct_inproceedings.organizer_of_conference VARCHAR(256);
|
|
||||||
String[0..1] nameOfConference = ct_inproceedings.name_of_conference VARCHAR(256);
|
|
||||||
Date[0..1] dateFromOfConference = ct_inproceedings.date_from_of_conference DATE;
|
|
||||||
Date[0..1] dateToOfConference = ct_inproceedings.date_to_of_conference DATE;
|
|
||||||
String[0..1] placeOfConference = ct_inproceedings.place_of_conference VARCHAR(256);
|
|
||||||
Integer[0..1] volume = ct_inproceedings.volume INTEGER;
|
|
||||||
Integer[0..1] numberOfVolumes = ct_inproceedings.numberOfVolumes INTEGER;
|
|
||||||
Integer[0..1] numberOfPages = ct_inproceedings.numberOfPages INTEGER;
|
|
||||||
Integer[0..1] pagesFrom = ct_inproceedings.pages_from INTEGER;
|
Integer[0..1] pagesFrom = ct_inproceedings.pages_from INTEGER;
|
||||||
Integer[0..1] pagesTo = ct_inproceedings.pages_to INTEGER;
|
Integer[0..1] pagesTo = ct_inproceedings.pages_to INTEGER;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ object type InternetArticle extends Publication {
|
||||||
String[0..1] place = ct_internet_article.place VARCHAR(256);
|
String[0..1] place = ct_internet_article.place VARCHAR(256);
|
||||||
component GenericOrganizationalUnit[0..1] organization = join ct_internet_article.organization_id
|
component GenericOrganizationalUnit[0..1] organization = join ct_internet_article.organization_id
|
||||||
to cms_organizationalunits.organizationalunit_id;
|
to cms_organizationalunits.organizationalunit_id;
|
||||||
String[0..1] url = ct_article_in_journal.url VARCHAR(512);
|
|
||||||
String[0..1] number = ct_internet_article.number VARCHAR(128);
|
String[0..1] number = ct_internet_article.number VARCHAR(128);
|
||||||
Integer[0..1] numberOfPages = ct_internet_article.number_of_pages INTEGER;
|
Integer[0..1] numberOfPages = ct_internet_article.number_of_pages INTEGER;
|
||||||
String[0..1] edition = ct_internet_article.edition VARCHAR(256);
|
String[0..1] edition = ct_internet_article.edition VARCHAR(256);
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@ import com.arsdigita.cms.ContentPage;
|
||||||
// PDL definition for a monograph
|
// PDL definition for a monograph
|
||||||
object type Monograph extends PublicationWithPublisher {
|
object type Monograph extends PublicationWithPublisher {
|
||||||
|
|
||||||
Integer[0..1] volume = ct_monograph.volume INTEGER;
|
|
||||||
Integer[0..1] numberOfVolumes = ct_monograph.number_of_volumes INTEGER;
|
|
||||||
Integer[0..1] numberOfPages = ct_monograph.number_of_pages INTEGER;
|
|
||||||
String[0..1] edition = ct_monograph.edition VARCHAR(512);
|
|
||||||
|
|
||||||
reference key (ct_monograph.monograph_id);
|
reference key (ct_monograph.monograph_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
//
|
||||||
|
// Copyright (C) 2010 Jens Pelzetter, for the Center of Social Politics (ZeS) of
|
||||||
|
// the University of Bremen
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
// the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
model com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
|
||||||
|
// PDL definition for proceedings
|
||||||
|
object type Proceedings extends PublicationWithPublisher {
|
||||||
|
|
||||||
|
component GenericOrganizationalUnit[0..1] organizerOfConference = join ct_proceedings.organizer_id
|
||||||
|
to cms_organizationalunits.organizationalunit_id;
|
||||||
|
String[0..1] nameOfConference = ct_proceedings.nameOfConference;
|
||||||
|
String[0..1] placeOfConference = ct_proceedings.place_of_conference;
|
||||||
|
Date[0..1] dateFromOfConference = ct_proceedings.date_from_of_conference DATE;
|
||||||
|
Date[0..1] dateToOfConference = ct_proceedings.date_to_of_conference DATE;
|
||||||
|
|
||||||
|
reference key (ct_proceedings.proceedings_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
association {
|
||||||
|
|
||||||
|
Proceedings[0..1] proceedings = join ct_inproceedings.inproceedings_id
|
||||||
|
to ct_proceedings_papers_map.paper_id,
|
||||||
|
join ct_proceedings_papers_map.proceedings_id
|
||||||
|
to ct_proceedings.proceedings_id;
|
||||||
|
InProceedings[0..n] papers = join ct_proceedings.proceedings_id
|
||||||
|
to ct_proceedings_papers_map.proceedings_id,
|
||||||
|
join ct_proceedings_papers_map.paper_id
|
||||||
|
to ct_inproceedings.inproceedings_id;
|
||||||
|
|
||||||
|
Integer[0..1] paperOrder = ct_proceedings_papers_map.paper_order INTEGER;
|
||||||
|
}
|
||||||
|
|
@ -26,7 +26,10 @@ import com.arsdigita.cms.ContentPage;
|
||||||
object type PublicationWithPublisher extends Publication {
|
object type PublicationWithPublisher extends Publication {
|
||||||
|
|
||||||
String[0..1] isbn = ct_publication_with_publisher.isbn VARCHAR(17);
|
String[0..1] isbn = ct_publication_with_publisher.isbn VARCHAR(17);
|
||||||
String[0..1] url = ct_article_in_journal.url VARCHAR(512);
|
Integer[0..1] volume = ct_publication_with_publisher.volume INTEGER;
|
||||||
|
Integer[0..1] numberOfVolumes = ct_publication_with_publisher.number_of_volumes INTEGER;
|
||||||
|
Integer[0..1] numberOfPages = ct_publication_with_publisher._number_of_pages INTEGER;
|
||||||
|
String[0..1] edition = ct_publication_with_publisher.edition VARCHAR(256);
|
||||||
component Publisher[0..1] publisher = join ct_publication_with_publisher.publisher_id
|
component Publisher[0..1] publisher = join ct_publication_with_publisher.publisher_id
|
||||||
to ct_publisher.publisher_id;
|
to ct_publisher.publisher_id;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,17 +23,6 @@ model com.arsdigita.cms.contenttypes;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
|
||||||
// PDL definition for a InternetArticle publication
|
// PDL definition for a InternetArticle publication
|
||||||
object type Review extends Publication {
|
object type Review extends ArticleInJournal {
|
||||||
|
|
||||||
String[0..1] journal = ct_review.journal VARCHAR(512);
|
|
||||||
Integer[0..1] volume = ct_review.volume INTEGER;
|
|
||||||
String[0..1] issue = ct_review.issue VARCHAR(512);
|
|
||||||
Integer[0..1] pagesFrom = ct_review.pages_from INTEGER;
|
|
||||||
Integer[0..1] pagesTo = ct_review.pages_to INTEGER;
|
|
||||||
String[0..1] issn = ct_review.issn VARCHAR(9);
|
|
||||||
String[0..1] url = ct_review.url VARCHAR(512);
|
|
||||||
Date[0..1] publicationDate = ct_review.publication_date DATE;
|
|
||||||
|
|
||||||
reference key (ct_review.review_id);
|
reference key (ct_review.review_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||||
|
|
||||||
|
<ctd:content-type
|
||||||
|
label="Proceedings"
|
||||||
|
description="Base type for collectedVolumes"
|
||||||
|
objectType="com.arsdigita.cms.contenttypes.Proceedings"
|
||||||
|
classname="com.arsdigita.cms.contenttypes.Proceedings">
|
||||||
|
|
||||||
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
|
<ctd:authoring-step
|
||||||
|
labelKey="publications.ui.proceedings_properties.title"
|
||||||
|
labelBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||||
|
descriptionKey="publications.ui.proceedings.basic_properties.description"
|
||||||
|
descriptionBundle="com.arsdigita.cms.contenttypes.ui.PublicationResources"
|
||||||
|
component="com.arsdigita.cms.contenttypes.ui.ProceedingsPropertiesStep"
|
||||||
|
ordering="1"/>
|
||||||
|
|
||||||
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
||||||
|
</ctd:authoring-kit>
|
||||||
|
|
||||||
|
</ctd:content-type>
|
||||||
|
|
||||||
|
|
||||||
|
</ctd:content-types>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xrd:adapters
|
||||||
|
xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
||||||
|
|
||||||
|
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator" >
|
||||||
|
|
||||||
|
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.Proceedings"
|
||||||
|
extends="com.arsdigita.cms.PublicationWithPublisher">
|
||||||
|
|
||||||
|
<xrd:associations rule="include">
|
||||||
|
<xrd:property name="/object/papers"/>
|
||||||
|
</xrd:associations>
|
||||||
|
|
||||||
|
</xrd:adapter>
|
||||||
|
|
||||||
|
</xrd:context>
|
||||||
|
|
||||||
|
</xrd:adapters>
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
<table name="ct_collected_volume"/>
|
<table name="ct_collected_volume"/>
|
||||||
<table name="ct_article_in_collected_volume"/>
|
<table name="ct_article_in_collected_volume"/>
|
||||||
<table name="ct_monograph"/>
|
<table name="ct_monograph"/>
|
||||||
|
<table name="ct_proceedings"/>
|
||||||
<table name="ct_inproceedings"/>
|
<table name="ct_inproceedings"/>
|
||||||
<table name="ct_internet_article"/>
|
<table name="ct_internet_article"/>
|
||||||
<table name="ct_article_in_journal"/>
|
<table name="ct_article_in_journal"/>
|
||||||
|
|
@ -29,6 +30,7 @@
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.CollectedVolumeInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.CollectedVolumeInitializer"/>
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.ArticleInCollectedVolumeInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.ArticleInCollectedVolumeInitializer"/>
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.MonographInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.MonographInitializer"/>
|
||||||
|
<initializer class="com.arsdigita.cms.contenttypes.ProceedingsInitializer"/>
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.InProceedingsInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.InProceedingsInitializer"/>
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.InternetArticleInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.InternetArticleInitializer"/>
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.ArticleInJournalInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.ArticleInJournalInitializer"/>
|
||||||
|
|
@ -48,6 +50,7 @@
|
||||||
<data class="com.arsdigita.cms.contenttypes.CollectedVolumeLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.CollectedVolumeLoader"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.ArticleInCollectedVolumeLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.ArticleInCollectedVolumeLoader"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.MonographLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.MonographLoader"/>
|
||||||
|
<data class="com.arsdigita.cms.contenttypes.ProceedingsLoader"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.InProceedingsLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.InProceedingsLoader"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.InternetArticleLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.InternetArticleLoader"/>
|
||||||
<data class="com.arsdigita.cms.contenttypes.ArticleInJournalLoader"/>
|
<data class="com.arsdigita.cms.contenttypes.ArticleInJournalLoader"/>
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,12 @@ import java.math.BigDecimal;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ArticleInCollectedVolume extends PublicationWithPublisher {
|
public class ArticleInCollectedVolume extends Publication {
|
||||||
|
|
||||||
public final static String PAGES_FROM = "pagesFrom";
|
public final static String PAGES_FROM = "pagesFrom";
|
||||||
public final static String PAGES_TO = "pagesTo";
|
public final static String PAGES_TO = "pagesTo";
|
||||||
public final static String CHAPTER = "chapter";
|
public final static String CHAPTER = "chapter";
|
||||||
public final static String COLLECTED_VOLUME = "collectedVolume";
|
public final static String COLLECTED_VOLUME = "collectedVolume";
|
||||||
|
|
||||||
public final static String BASE_DATA_OBJECT_TYPE =
|
public final static String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.ArticleInCollectedVolume";
|
"com.arsdigita.cms.contenttypes.ArticleInCollectedVolume";
|
||||||
|
|
||||||
|
|
@ -43,13 +42,13 @@ public class ArticleInCollectedVolume extends PublicationWithPublisher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArticleInCollectedVolume(BigDecimal id)
|
public ArticleInCollectedVolume(BigDecimal id)
|
||||||
throws DataObjectNotFoundException{
|
throws DataObjectNotFoundException {
|
||||||
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArticleInCollectedVolume(OID oid) throws
|
public ArticleInCollectedVolume(OID oid) throws
|
||||||
DataObjectNotFoundException{
|
DataObjectNotFoundException {
|
||||||
super(oid);
|
super(oid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +61,7 @@ public class ArticleInCollectedVolume extends PublicationWithPublisher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getPagesFrom() {
|
public Integer getPagesFrom() {
|
||||||
return (Integer)get(PAGES_FROM);
|
return (Integer) get(PAGES_FROM);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPagesFrom(Integer pagesFrom) {
|
public void setPagesFrom(Integer pagesFrom) {
|
||||||
|
|
@ -70,7 +69,7 @@ public class ArticleInCollectedVolume extends PublicationWithPublisher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getPagesTo() {
|
public Integer getPagesTo() {
|
||||||
return (Integer)get(PAGES_TO);
|
return (Integer) get(PAGES_TO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPagesTo(Integer pagesTo) {
|
public void setPagesTo(Integer pagesTo) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010 Jens Pelzetter,
|
* Copyright (c) 2010 Jens Pelzetter,
|
||||||
for the Center of Social Politics of the University of Bremen
|
* for the Center of Social Politics of the University of Bremen
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ public class ArticleInJournal extends Publication {
|
||||||
public static final String PAGES_FROM = "pagesFrom";
|
public static final String PAGES_FROM = "pagesFrom";
|
||||||
public static final String PAGES_TO = "pagesTo";
|
public static final String PAGES_TO = "pagesTo";
|
||||||
public static final String ISSN = "issn";
|
public static final String ISSN = "issn";
|
||||||
public static final String URL = "url";
|
|
||||||
public static final String PUBLICATION_DATE = "publicationDate";
|
public static final String PUBLICATION_DATE = "publicationDate";
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.ArticleInJournal";
|
"com.arsdigita.cms.contenttypes.ArticleInJournal";
|
||||||
|
|
@ -91,14 +90,6 @@ public class ArticleInJournal extends Publication {
|
||||||
set(ISSN, issn);
|
set(ISSN, issn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return (String) get(URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
|
||||||
set(URL, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getPublicationDate() {
|
public Date getPublicationDate() {
|
||||||
return (Date) get(PUBLICATION_DATE);
|
return (Date) get(PUBLICATION_DATE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,6 @@ import java.math.BigDecimal;
|
||||||
*/
|
*/
|
||||||
public class CollectedVolume extends PublicationWithPublisher {
|
public class CollectedVolume extends PublicationWithPublisher {
|
||||||
|
|
||||||
public static final String VOLUME = "volume";
|
|
||||||
public static final String NUMBER_OF_VOLUMES = "numberOfVolumes";
|
|
||||||
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
|
||||||
public static final String EDITION = "edition";
|
|
||||||
public static final String ARTICLES = "articles";
|
public static final String ARTICLES = "articles";
|
||||||
public static final String ARTICLE_ORDER = "articleOrder";
|
public static final String ARTICLE_ORDER = "articleOrder";
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
|
@ -63,38 +59,6 @@ public class CollectedVolume extends PublicationWithPublisher {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getVolume() {
|
|
||||||
return (Integer) get(VOLUME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVolume(Integer volume) {
|
|
||||||
set(VOLUME, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfVolumes() {
|
|
||||||
return (Integer) get(NUMBER_OF_VOLUMES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfVolumes(Integer numberOfVolumes) {
|
|
||||||
set(NUMBER_OF_VOLUMES, numberOfVolumes);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfPages() {
|
|
||||||
return (Integer) get(NUMBER_OF_PAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfPages(Integer numberOfPages) {
|
|
||||||
set(NUMBER_OF_PAGES, numberOfPages);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEdition() {
|
|
||||||
return (String) get(EDITION);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEdition(String edition) {
|
|
||||||
set(EDITION, edition);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArticleInCollectedVolumeCollection getArticles() {
|
public ArticleInCollectedVolumeCollection getArticles() {
|
||||||
return new ArticleInCollectedVolumeCollection(
|
return new ArticleInCollectedVolumeCollection(
|
||||||
(DataCollection) get(ARTICLES));
|
(DataCollection) get(ARTICLES));
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ public class Expertise extends Publication {
|
||||||
public static final String PLACE = "place";
|
public static final String PLACE = "place";
|
||||||
public static final String ORGANIZATION = "organization";
|
public static final String ORGANIZATION = "organization";
|
||||||
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
||||||
public static final String URL = "url";
|
|
||||||
public static final String ORDERER = "orderer";
|
public static final String ORDERER = "orderer";
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.Expertise";
|
"com.arsdigita.cms.contenttypes.Expertise";
|
||||||
|
|
@ -93,14 +92,6 @@ public class Expertise extends Publication {
|
||||||
set(NUMBER_OF_PAGES, numberOfPages);
|
set(NUMBER_OF_PAGES, numberOfPages);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return (String) get(URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
|
||||||
set(URL, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GenericOrganizationalUnit getOrderer() {
|
public GenericOrganizationalUnit getOrderer() {
|
||||||
DataObject dataObj;
|
DataObject dataObj;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ public class GreyLiterature extends UnPublished {
|
||||||
|
|
||||||
public static final String PAGES_FROM = "pagesFrom";
|
public static final String PAGES_FROM = "pagesFrom";
|
||||||
public static final String PAGES_TO = "pagesTo";
|
public static final String PAGES_TO = "pagesTo";
|
||||||
public static final String URL = "url";
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.GreyLiterature";
|
"com.arsdigita.cms.contenttypes.GreyLiterature";
|
||||||
|
|
||||||
|
|
@ -72,11 +71,4 @@ public class GreyLiterature extends UnPublished {
|
||||||
set(PAGES_TO, pagesTo);
|
set(PAGES_TO, pagesTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return (String) get(URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
|
||||||
set(URL, url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,19 +29,11 @@ import java.util.Date;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class InProceedings extends PublicationWithPublisher {
|
public class InProceedings extends Publication {
|
||||||
|
|
||||||
public static final String ORGANIZER_OF_CONFERENCE =
|
|
||||||
"organizerOfConference";
|
|
||||||
public static final String NAME_OF_CONFERENCE = "nameOfConference";
|
|
||||||
public static final String DATE_FROM_OF_CONFERENCE = "dateFromOfConference";
|
|
||||||
public static final String DATE_TO_OF_CONFERENCE = "dateToOfConference";
|
|
||||||
public static final String PLACE_OF_CONFERENCE = "placeOfConference";
|
|
||||||
public static final String VOLUME = "volume";
|
|
||||||
public static final String NUMBER_OF_VOLUMES = "numberOfVolumes";
|
|
||||||
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
|
||||||
public static final String PAGES_FROM = "pagesFrom";
|
public static final String PAGES_FROM = "pagesFrom";
|
||||||
public static final String PAGES_TO = "pagesTo";
|
public static final String PAGES_TO = "pagesTo";
|
||||||
|
public static final String PROCEEDINGS = "proceedings";
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.InProceedings";
|
"com.arsdigita.cms.contenttypes.InProceedings";
|
||||||
|
|
||||||
|
|
@ -65,70 +57,6 @@ public class InProceedings extends PublicationWithPublisher {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOrganizerOfConference() {
|
|
||||||
return (String) get(ORGANIZER_OF_CONFERENCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrganizerOfConference(String organizerOfConference) {
|
|
||||||
set(ORGANIZER_OF_CONFERENCE, organizerOfConference);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNameOfConference() {
|
|
||||||
return (String) get(NAME_OF_CONFERENCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNameOfConference(String nameOfConference) {
|
|
||||||
set(NAME_OF_CONFERENCE, nameOfConference);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDateFromOfConference() {
|
|
||||||
return (Date) get(DATE_FROM_OF_CONFERENCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateFromOfConference(Date dateFromOfConference) {
|
|
||||||
set(DATE_FROM_OF_CONFERENCE, dateFromOfConference);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDateToOfConference() {
|
|
||||||
return (Date) get(DATE_TO_OF_CONFERENCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateToOfConference(Date dateToOfConference) {
|
|
||||||
set(DATE_TO_OF_CONFERENCE, dateToOfConference);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPlaceOfConference() {
|
|
||||||
return (String) get(PLACE_OF_CONFERENCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPlaceOfConference(String place) {
|
|
||||||
set(PLACE_OF_CONFERENCE, place);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getVolume() {
|
|
||||||
return (Integer) get(VOLUME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVolume(Integer volume) {
|
|
||||||
set(VOLUME, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfVolumes() {
|
|
||||||
return (Integer) get(NUMBER_OF_VOLUMES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfVolumes(Integer numberOfVolumes) {
|
|
||||||
set(NUMBER_OF_VOLUMES, numberOfVolumes);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfPages() {
|
|
||||||
return (Integer) get(NUMBER_OF_PAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfPages(Integer numberOfPages) {
|
|
||||||
set(NUMBER_OF_PAGES, numberOfPages);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPagesFrom() {
|
public Integer getPagesFrom() {
|
||||||
return (Integer) get(PAGES_FROM);
|
return (Integer) get(PAGES_FROM);
|
||||||
}
|
}
|
||||||
|
|
@ -144,4 +72,12 @@ public class InProceedings extends PublicationWithPublisher {
|
||||||
public void setPagesTo(Integer pagesTo) {
|
public void setPagesTo(Integer pagesTo) {
|
||||||
set(PAGES_TO, pagesTo);
|
set(PAGES_TO, pagesTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Proceedings getProceedings() {
|
||||||
|
return (Proceedings) get(PROCEEDINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProceedings(Proceedings proceedings) {
|
||||||
|
set(PROCEEDINGS, proceedings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,153 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010 Jens Pelzetter,
|
||||||
|
* for the Center of Social Politics of the University of Bremen
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DomainCollection;
|
||||||
|
import com.arsdigita.persistence.DataCollection;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class InProceedingsCollection extends DomainCollection {
|
||||||
|
|
||||||
|
public static final String LINKORDER = "link.paperOrder";
|
||||||
|
public static final String ORDER = "paperOrder";
|
||||||
|
private static final Logger s_log =
|
||||||
|
Logger.getLogger(InProceedingsCollection.class);
|
||||||
|
|
||||||
|
public InProceedingsCollection(DataCollection dataCollection) {
|
||||||
|
super(dataCollection);
|
||||||
|
|
||||||
|
m_dataCollection.addOrder(LINKORDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPaperOrder() {
|
||||||
|
return (Integer) m_dataCollection.get(LINKORDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPaperOrder(Integer order) {
|
||||||
|
DataObject link = (DataObject) this.get("link");
|
||||||
|
|
||||||
|
link.set(ORDER, order);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void swapWithNext(InProceedings paper) {
|
||||||
|
int currentPosition = 0;
|
||||||
|
int currentIndex = 0;
|
||||||
|
int nextIndex = 0;
|
||||||
|
|
||||||
|
s_log.debug("Searching paper...");
|
||||||
|
this.rewind();
|
||||||
|
while (this.next()) {
|
||||||
|
currentPosition = this.getPosition();
|
||||||
|
currentIndex = this.getPaperOrder();
|
||||||
|
s_log.debug(String.format("Position: %d(%d)/%d", currentPosition,
|
||||||
|
currentIndex, this.size()));
|
||||||
|
s_log.debug(String.format("getPaperOrder(): %d",
|
||||||
|
getPaperOrder()));
|
||||||
|
if (this.getPaper().equals(paper)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentPosition == 0) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format(
|
||||||
|
"The provided article is not "
|
||||||
|
+ "part of this collection."));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.next()) {
|
||||||
|
nextIndex = this.getPaperOrder();
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"The provided paper is the last "
|
||||||
|
+ "in the collection, so there is no next object "
|
||||||
|
+ "to swap with.");
|
||||||
|
}
|
||||||
|
|
||||||
|
this.rewind();
|
||||||
|
|
||||||
|
while (this.getPosition() != currentPosition) {
|
||||||
|
this.next();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setPaperOrder(nextIndex);
|
||||||
|
this.next();
|
||||||
|
this.setPaperOrder(currentIndex);
|
||||||
|
this.rewind();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void swapWithPrevious(InProceedings paper) {
|
||||||
|
int previousPosition = 0;
|
||||||
|
int previousIndex = 0;
|
||||||
|
int currentPosition = 0;
|
||||||
|
int currentIndex = 0;
|
||||||
|
|
||||||
|
s_log.debug("Searching paper...");
|
||||||
|
this.rewind();
|
||||||
|
while (this.next()) {
|
||||||
|
currentPosition = this.getPosition();
|
||||||
|
currentIndex = this.getPaperOrder();
|
||||||
|
s_log.debug(String.format("Position: %d(%d)/%d", currentPosition,
|
||||||
|
currentIndex, this.size()));
|
||||||
|
s_log.debug(String.format("getPaperOrder(): %d",
|
||||||
|
getPaperOrder()));
|
||||||
|
if (this.getPaper().equals(paper)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
previousPosition = currentPosition;
|
||||||
|
previousIndex = currentIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentPosition == 0) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format(
|
||||||
|
"The provided paper is not "
|
||||||
|
+ "part of this collection."));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (previousPosition == 0) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format(
|
||||||
|
"The provided paper is the first one in this "
|
||||||
|
+ "collection, so there is no previous one to switch "
|
||||||
|
+ "with."));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.rewind();
|
||||||
|
while (this.getPosition() != previousPosition) {
|
||||||
|
this.next();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setPaperOrder(currentIndex);
|
||||||
|
this.next();
|
||||||
|
this.setPaperOrder(previousIndex);
|
||||||
|
this.rewind();
|
||||||
|
}
|
||||||
|
|
||||||
|
public InProceedings getPaper() {
|
||||||
|
return new InProceedings(m_dataCollection.getDataObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -37,7 +37,6 @@ public class InternetArticle extends Publication {
|
||||||
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
||||||
public static final String EDITION = "edition";
|
public static final String EDITION = "edition";
|
||||||
public static final String ISSN = "issn";
|
public static final String ISSN = "issn";
|
||||||
public static final String URL = "url";
|
|
||||||
public static final String PUBLICATION_DATE = "publicationDate";
|
public static final String PUBLICATION_DATE = "publicationDate";
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.InternetArticle";
|
"com.arsdigita.cms.contenttypes.InternetArticle";
|
||||||
|
|
@ -125,12 +124,4 @@ public class InternetArticle extends Publication {
|
||||||
public void setPublicationDate(Date pubDate) {
|
public void setPublicationDate(Date pubDate) {
|
||||||
set(PUBLICATION_DATE, pubDate);
|
set(PUBLICATION_DATE, pubDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return (String) get(URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
|
||||||
set(URL, url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,6 @@ import java.math.BigDecimal;
|
||||||
*/
|
*/
|
||||||
public class Monograph extends PublicationWithPublisher {
|
public class Monograph extends PublicationWithPublisher {
|
||||||
|
|
||||||
public static final String VOLUME = "volume";
|
|
||||||
public static final String NUMBER_OF_VOLUMES = "numberOfVolumes";
|
|
||||||
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
|
||||||
public static final String EDITION = "edition";
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.Monograph";
|
"com.arsdigita.cms.contenttypes.Monograph";
|
||||||
|
|
||||||
|
|
@ -57,35 +53,4 @@ public class Monograph extends PublicationWithPublisher {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getVolume() {
|
|
||||||
return (Integer) get(VOLUME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVolume(Integer volume) {
|
|
||||||
set(VOLUME, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfVolumes() {
|
|
||||||
return (Integer) get(NUMBER_OF_VOLUMES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfVolumes(Integer numberOfVolumes) {
|
|
||||||
set(NUMBER_OF_VOLUMES, numberOfVolumes);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumberOfPages() {
|
|
||||||
return (Integer) get(NUMBER_OF_PAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNumberOfPages(Integer numberOfPages) {
|
|
||||||
set(NUMBER_OF_PAGES, numberOfPages);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEdition() {
|
|
||||||
return (String) get(EDITION);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEdition(String edition) {
|
|
||||||
set(EDITION, edition);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010 Jens Pelzetter,
|
||||||
|
* for the Center of Social Politics of the University of Bremen
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.persistence.DataCollection;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.OID;
|
||||||
|
import com.arsdigita.util.Assert;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Content type of proceedings. Provides attributes for storing the data
|
||||||
|
* of the conference (name, date, place, organizer) and for linking the papers
|
||||||
|
* (objects of the content type {@link InProceedings} to a proceedings object.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class Proceedings extends PublicationWithPublisher {
|
||||||
|
|
||||||
|
public static final String ORGANIZER_OF_CONFERENCE = "organizerOfConference";
|
||||||
|
public static final String NAME_OF_CONFERENCE = "nameOfConference";
|
||||||
|
public static final String PLACE_OF_CONFERENCE = "placeOfConference";
|
||||||
|
public static final String DATE_FROM_OF_CONFERENCE = "dateFromOfConference";
|
||||||
|
public static final String DATE_TO_OF_CONFERENCE = "dateToOfConference";
|
||||||
|
public static final String PAPERS = "papers";
|
||||||
|
public static final String PAPER_ORDER = "paperOrder";
|
||||||
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
"com.arsdigita.cms.contenttypes.Proceedings";
|
||||||
|
|
||||||
|
public Proceedings() {
|
||||||
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proceedings(BigDecimal id) throws DataObjectNotFoundException {
|
||||||
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proceedings(OID oid) throws DataObjectNotFoundException {
|
||||||
|
super(oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proceedings(DataObject dataObject) {
|
||||||
|
super(dataObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Proceedings(String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GenericOrganizationalUnit getOrganizerOfConference() {
|
||||||
|
DataObject dataObj;
|
||||||
|
|
||||||
|
dataObj = (DataObject) get(ORGANIZER_OF_CONFERENCE);
|
||||||
|
|
||||||
|
if (dataObj == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return new GenericOrganizationalUnit(dataObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrganizerOfConference(GenericOrganizationalUnit organizer) {
|
||||||
|
set(ORGANIZER_OF_CONFERENCE, organizer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameOfConference() {
|
||||||
|
return (String) get(NAME_OF_CONFERENCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameOfConference(String nameOfConference) {
|
||||||
|
set(NAME_OF_CONFERENCE, nameOfConference);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlaceOfConference() {
|
||||||
|
return (String) get(PLACE_OF_CONFERENCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlaceOfConference(String place) {
|
||||||
|
set(PLACE_OF_CONFERENCE, place);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDateFromOfConference() {
|
||||||
|
return (Date) get(DATE_FROM_OF_CONFERENCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDateFromOfConference(Date dateFrom) {
|
||||||
|
set(DATE_FROM_OF_CONFERENCE, dateFrom);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDateToOfConference() {
|
||||||
|
return (Date) get(DATE_FROM_OF_CONFERENCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDateToOfConference(Date dateTo) {
|
||||||
|
set(DATE_TO_OF_CONFERENCE, dateTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InProceedingsCollection getPapers() {
|
||||||
|
return new InProceedingsCollection((DataCollection) get(PAPERS));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addPaper(InProceedings paper) {
|
||||||
|
Assert.exists(paper, InProceedings.class);
|
||||||
|
|
||||||
|
DataObject link = add(PAPERS, paper);
|
||||||
|
|
||||||
|
link.set(PAPER_ORDER, Integer.valueOf((int) getPapers().size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removePaper(InProceedings paper) {
|
||||||
|
Assert.exists(paper, InProceedings.class);
|
||||||
|
remove(PAPERS, paper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasPapers() {
|
||||||
|
return !this.getPapers().isEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsInitializer extends ContentTypeInitializer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The pdl.mf file used here is empty, since the
|
||||||
|
* {@link PublicationInitializer} loads all things using the pdl.mf file
|
||||||
|
* of the module. Also, it may causes on silly errors in the load-bundle
|
||||||
|
* step if the same pdl.mf file is used in more than one initializer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public ProceedingsInitializer() {
|
||||||
|
super("empty.pdl.mf", Proceedings.BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getStylesheets() {
|
||||||
|
return new String[] {"/static/content-types/com/arsdigita/cms/contenttypes/Proceedings.xsl"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTraversalXML() {
|
||||||
|
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Proceedings.xml";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
|
private static final String[] TYPES = {"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Proceedings.xml"};
|
||||||
|
|
||||||
|
public ProceedingsLoader() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getTypes() {
|
||||||
|
return TYPES;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -32,7 +32,10 @@ import org.apache.log4j.Logger;
|
||||||
* </p>
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>ISBN</li>
|
* <li>ISBN</li>
|
||||||
* <li>URL</li>
|
* <li>volume</li>
|
||||||
|
* <li>numberOfVolumes</li>
|
||||||
|
* <li>numberOfPages</li>
|
||||||
|
* <li>edition</li>
|
||||||
* <li>Publisher</li>
|
* <li>Publisher</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -45,7 +48,10 @@ import org.apache.log4j.Logger;
|
||||||
public class PublicationWithPublisher extends Publication {
|
public class PublicationWithPublisher extends Publication {
|
||||||
|
|
||||||
public final static String ISBN = "isbn";
|
public final static String ISBN = "isbn";
|
||||||
public static final String URL = "url";
|
public static final String VOLUME = "volume";
|
||||||
|
public static final String NUMBER_OF_VOLUMES = "numberOfVolumes";
|
||||||
|
public static final String NUMBER_OF_PAGES = "numberOfPages";
|
||||||
|
public static final String EDITION = "edition";
|
||||||
public final static String PUBLISHER = "publisher";
|
public final static String PUBLISHER = "publisher";
|
||||||
public final static String BASE_DATA_OBJECT_TYPE =
|
public final static String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.PublicationWithPublisher";
|
"com.arsdigita.cms.contenttypes.PublicationWithPublisher";
|
||||||
|
|
@ -93,12 +99,36 @@ public class PublicationWithPublisher extends Publication {
|
||||||
set(ISBN, isbn);
|
set(ISBN, isbn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
public Integer getVolume() {
|
||||||
return (String) get(URL);
|
return (Integer) get(VOLUME);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUrl(String url) {
|
public void setVolume(Integer volume) {
|
||||||
set(URL, url);
|
set(VOLUME, volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumberOfVolumes() {
|
||||||
|
return (Integer) get(NUMBER_OF_VOLUMES);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumberOfVolumes(Integer numberOfVolumes) {
|
||||||
|
set(NUMBER_OF_VOLUMES, numberOfVolumes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumberOfPages() {
|
||||||
|
return (Integer) get(NUMBER_OF_PAGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumberOfPages(Integer numberOfPages) {
|
||||||
|
set(NUMBER_OF_PAGES, numberOfPages);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEdition() {
|
||||||
|
return (String) get(EDITION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEdition(String edition) {
|
||||||
|
set(EDITION, edition);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -30,16 +30,7 @@ import java.util.Date;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class Review extends Publication {
|
public class Review extends ArticleInJournal {
|
||||||
|
|
||||||
public static final String JOURNAL = "journal";
|
|
||||||
public static final String VOLUME = "volume";
|
|
||||||
public static final String ISSUE = "issue";
|
|
||||||
public static final String PAGES_FROM = "pagesFrom";
|
|
||||||
public static final String PAGES_TO = "pagesTo";
|
|
||||||
public static final String ISSN = "issn";
|
|
||||||
public static final String URL = "url";
|
|
||||||
public static final String PUBLICATION_DATE = "publicationDate";
|
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.cms.contenttypes.Review";
|
"com.arsdigita.cms.contenttypes.Review";
|
||||||
|
|
@ -63,69 +54,4 @@ public class Review extends Publication {
|
||||||
public Review(String type) {
|
public Review(String type) {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getJournal() {
|
|
||||||
return (String) get(JOURNAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJournal(String journal) {
|
|
||||||
set(JOURNAL, journal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getVolume() {
|
|
||||||
return (Integer) get(VOLUME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVolume(Integer volume) {
|
|
||||||
set(VOLUME, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIssue() {
|
|
||||||
return (String) get(ISSUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIssue(String issue) {
|
|
||||||
set(ISSUE, issue);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPagesFrom() {
|
|
||||||
return (Integer) get(PAGES_FROM);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPagesFrom(Integer pagesFrom) {
|
|
||||||
set(PAGES_FROM, pagesFrom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPagesTo() {
|
|
||||||
return (Integer) get(PAGES_TO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPagesTo(Integer pagesTo) {
|
|
||||||
set(PAGES_TO, pagesTo);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getISSN() {
|
|
||||||
return (String) get(ISSN);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setISSN(String issn) {
|
|
||||||
set(ISSN, issn);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return (String) get(URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
|
||||||
set(URL, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Date getPublicationDate() {
|
|
||||||
return (Date) get(PUBLICATION_DATE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPublicationDate(Date pubDate) {
|
|
||||||
set(PUBLICATION_DATE, pubDate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,47 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.ArticleInCollectedVolume;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ArticleInCollectedVolumePropertiesStep
|
public class ArticleInCollectedVolumePropertiesStep
|
||||||
extends PublicationWithPublisherPropertiesStep {
|
extends PublicationPropertiesStep {
|
||||||
|
|
||||||
public ArticleInCollectedVolumePropertiesStep(ItemSelectionModel itemModel,
|
public ArticleInCollectedVolumePropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getArticleInCollectedVolumePropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.article_in_collected_volume.pages_from"),
|
||||||
|
ArticleInCollectedVolume.PAGES_FROM);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.article_in_collected_volume.pages_to"),
|
||||||
|
ArticleInCollectedVolume.PAGES_TO);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.article_in_collected_volume.chapter"),
|
||||||
|
ArticleInCollectedVolume.CHAPTER);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -38,7 +61,7 @@ public class ArticleInCollectedVolumePropertiesStep
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getArticleInCollectedVolumePropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import com.arsdigita.cms.contenttypes.ArticleInCollectedVolume;
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ArticleInCollectedVolumePropertyForm
|
public class ArticleInCollectedVolumePropertyForm
|
||||||
extends PublicationWithPublisherPropertyForm
|
extends PublicationPropertyForm
|
||||||
implements FormProcessListener,
|
implements FormProcessListener,
|
||||||
FormInitListener,
|
FormInitListener,
|
||||||
FormSubmissionListener {
|
FormSubmissionListener {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.ArticleInJournal;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -18,6 +21,42 @@ public class ArticleInJournalPropertiesStep extends PublicationPropertiesStep {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getArticleInJournalPropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.journal"),
|
||||||
|
ArticleInJournal.JOURNAL);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.volume"),
|
||||||
|
ArticleInJournal.VOLUME);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.issue"),
|
||||||
|
ArticleInJournal.ISSUE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.pages_from"),
|
||||||
|
ArticleInJournal.PAGES_FROM);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.pages_to"),
|
||||||
|
ArticleInJournal.PAGES_TO);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.issn"),
|
||||||
|
ArticleInJournal.ISSN);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.articleinjournal.publication_date"),
|
||||||
|
ArticleInJournal.PUBLICATION_DATE);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -38,7 +77,7 @@ public class ArticleInJournalPropertiesStep extends PublicationPropertiesStep {
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getArticleInJournalPropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import java.util.GregorianCalendar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jensp
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ArticleInJournalPropertyForm
|
public class ArticleInJournalPropertyForm
|
||||||
extends PublicationPropertyForm
|
extends PublicationPropertyForm
|
||||||
|
|
@ -86,12 +86,6 @@ public class ArticleInJournalPropertyForm
|
||||||
TextField issn = new TextField(issnParam);
|
TextField issn = new TextField(issnParam);
|
||||||
add(issn);
|
add(issn);
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.articleinjournal.url").localize()));
|
|
||||||
ParameterModel urlParam = new StringParameter(ArticleInJournal.URL);
|
|
||||||
TextField url = new TextField(urlParam);
|
|
||||||
add(url);
|
|
||||||
|
|
||||||
Calendar today = new GregorianCalendar();
|
Calendar today = new GregorianCalendar();
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.articleinjournal.publicationDate").
|
"publications.ui.articleinjournal.publicationDate").
|
||||||
|
|
@ -118,7 +112,6 @@ public class ArticleInJournalPropertyForm
|
||||||
data.put(ArticleInJournal.PAGES_FROM, article.getPagesFrom());
|
data.put(ArticleInJournal.PAGES_FROM, article.getPagesFrom());
|
||||||
data.put(ArticleInJournal.PAGES_TO, article.getPagesTo());
|
data.put(ArticleInJournal.PAGES_TO, article.getPagesTo());
|
||||||
data.put(ArticleInJournal.ISSN, article.getISSN());
|
data.put(ArticleInJournal.ISSN, article.getISSN());
|
||||||
data.put(ArticleInJournal.URL, article.getUrl());
|
|
||||||
data.put(ArticleInJournal.PUBLICATION_DATE,
|
data.put(ArticleInJournal.PUBLICATION_DATE,
|
||||||
article.getPublicationDate());
|
article.getPublicationDate());
|
||||||
}
|
}
|
||||||
|
|
@ -141,8 +134,6 @@ public class ArticleInJournalPropertyForm
|
||||||
(Integer) data.get(ArticleInJournal.PAGES_TO));
|
(Integer) data.get(ArticleInJournal.PAGES_TO));
|
||||||
article.setISSN(
|
article.setISSN(
|
||||||
(String) data.get(ArticleInJournal.ISSN));
|
(String) data.get(ArticleInJournal.ISSN));
|
||||||
article.setUrl(
|
|
||||||
(String) data.get(ArticleInJournal.URL));
|
|
||||||
article.setPublicationDate(
|
article.setPublicationDate(
|
||||||
(Date) data.get(ArticleInJournal.PUBLICATION_DATE));
|
(Date) data.get(ArticleInJournal.PUBLICATION_DATE));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ public class CollectedVolumeArticlesTable
|
||||||
m_itemModel = itemModel;
|
m_itemModel = itemModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public TableModel makeModel(Table table, PageState state) {
|
public TableModel makeModel(Table table, PageState state) {
|
||||||
table.getRowSelectionModel().clearSelection(state);
|
table.getRowSelectionModel().clearSelection(state);
|
||||||
CollectedVolume collectedVolume =
|
CollectedVolume collectedVolume =
|
||||||
|
|
@ -149,6 +150,7 @@ public class CollectedVolumeArticlesTable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getKeyAt(int columnIndex) {
|
public Object getKeyAt(int columnIndex) {
|
||||||
return m_article.getID();
|
return m_article.getID();
|
||||||
}
|
}
|
||||||
|
|
@ -270,8 +272,7 @@ public class CollectedVolumeArticlesTable
|
||||||
ArticleInCollectedVolumeCollection articles =
|
ArticleInCollectedVolumeCollection articles =
|
||||||
collectedVolume.getArticles();
|
collectedVolume.getArticles();
|
||||||
|
|
||||||
if ((articles.size() - 1)
|
if ((articles.size() - 1) == row) {
|
||||||
== row) {
|
|
||||||
s_log.debug("Row is last row in table, don't show down link");
|
s_log.debug("Row is last row in table, don't show down link");
|
||||||
Label label = new Label("");
|
Label label = new Label("");
|
||||||
return label;
|
return label;
|
||||||
|
|
@ -299,7 +300,6 @@ public class CollectedVolumeArticlesTable
|
||||||
TableColumn column = getColumnModel().get(event.getColumn().intValue());
|
TableColumn column = getColumnModel().get(event.getColumn().intValue());
|
||||||
|
|
||||||
if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) {
|
if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) {
|
||||||
|
|
||||||
} else if(column.getHeaderKey().toString().equals(TABLE_COL_DEL)) {
|
} else if(column.getHeaderKey().toString().equals(TABLE_COL_DEL)) {
|
||||||
collectedVolume.removeArticle(article);
|
collectedVolume.removeArticle(article);
|
||||||
} else if(column.getHeaderKey().toString().equals(TABLE_COL_UP)) {
|
} else if(column.getHeaderKey().toString().equals(TABLE_COL_UP)) {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -20,6 +22,14 @@ public class CollectedVolumePropertiesStep
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getCollectedVolumePropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(
|
protected void addBasicProperties(
|
||||||
ItemSelectionModel itemModel,
|
ItemSelectionModel itemModel,
|
||||||
|
|
@ -34,25 +44,26 @@ public class CollectedVolumePropertiesStep
|
||||||
basicProperties.add(EDIT_SHEET_NAME,
|
basicProperties.add(EDIT_SHEET_NAME,
|
||||||
(String) PublicationGlobalizationUtil.globalize(
|
(String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.collected_volume.edit_basic_sheet").
|
"publications.ui.collected_volume.edit_basic_sheet").
|
||||||
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
|
localize(),
|
||||||
|
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||||
itemModel),
|
itemModel),
|
||||||
editBasicSheet.getSaveCancelSection().
|
editBasicSheet.getSaveCancelSection().
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getCollectedVolumePropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.publication.basic_properties").
|
"publications.ui.publication.basic_properties").
|
||||||
localize()), basicProperties);
|
localize()),
|
||||||
|
basicProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addSteps(ItemSelectionModel itemModel,
|
protected void addSteps(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
super.addSteps(itemModel,
|
super.addSteps(itemModel, parent);
|
||||||
parent);
|
|
||||||
|
|
||||||
addStep(new CollectedVolumeArticlesStep(itemModel, parent),
|
addStep(new CollectedVolumeArticlesStep(itemModel, parent),
|
||||||
"publications.ui.collected_volume_articles");
|
"publications.ui.collected_volume_articles");
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,10 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.FormData;
|
import com.arsdigita.bebop.FormData;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
import com.arsdigita.bebop.Label;
|
|
||||||
import com.arsdigita.bebop.event.FormInitListener;
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
import com.arsdigita.bebop.event.FormProcessListener;
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
|
||||||
import com.arsdigita.bebop.parameters.IntegerParameter;
|
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.CollectedVolume;
|
import com.arsdigita.cms.contenttypes.CollectedVolume;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
@ -45,37 +40,6 @@ public class CollectedVolumePropertyForm
|
||||||
@Override
|
@Override
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.collected_volume.volume").localize()));
|
|
||||||
ParameterModel volumeParam = new IntegerParameter(
|
|
||||||
CollectedVolume.VOLUME);
|
|
||||||
TextField volume = new TextField(volumeParam);
|
|
||||||
add(volume);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.collected_volume.number_of_volumes").
|
|
||||||
localize()));
|
|
||||||
ParameterModel numberOfVolumesParam =
|
|
||||||
new IntegerParameter(CollectedVolume.NUMBER_OF_VOLUMES);
|
|
||||||
TextField numberOfVolumes = new TextField(numberOfVolumesParam);
|
|
||||||
add(numberOfVolumes);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.collected_volume.number_of_pages").
|
|
||||||
localize()));
|
|
||||||
ParameterModel numberOfPagesParam = new IntegerParameter(
|
|
||||||
CollectedVolume.NUMBER_OF_PAGES);
|
|
||||||
TextField numberOfPages = new TextField(numberOfPagesParam);
|
|
||||||
add(numberOfPages);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.collected_volume.edition").
|
|
||||||
localize()));
|
|
||||||
ParameterModel editionModel = new StringParameter(
|
|
||||||
CollectedVolume.EDITION);
|
|
||||||
TextField edition = new TextField(editionModel);
|
|
||||||
add(edition);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -85,13 +49,6 @@ public class CollectedVolumePropertyForm
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
CollectedVolume collectedVolume =
|
CollectedVolume collectedVolume =
|
||||||
(CollectedVolume) super.initBasicWidgets(fse);
|
(CollectedVolume) super.initBasicWidgets(fse);
|
||||||
|
|
||||||
data.put(CollectedVolume.VOLUME, collectedVolume.getVolume());
|
|
||||||
data.put(CollectedVolume.NUMBER_OF_VOLUMES,
|
|
||||||
collectedVolume.getNumberOfVolumes());
|
|
||||||
data.put(CollectedVolume.NUMBER_OF_PAGES,
|
|
||||||
collectedVolume.getNumberOfPages());
|
|
||||||
data.put(CollectedVolume.EDITION, collectedVolume.getEdition());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -101,19 +58,5 @@ public class CollectedVolumePropertyForm
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
CollectedVolume collectedVolume =
|
CollectedVolume collectedVolume =
|
||||||
(CollectedVolume) super.processBasicWidgets(fse);
|
(CollectedVolume) super.processBasicWidgets(fse);
|
||||||
|
|
||||||
if ((collectedVolume != null) && getSaveCancelSection().
|
|
||||||
getSaveButton().isSelected(fse.getPageState())) {
|
|
||||||
collectedVolume.setVolume((Integer) data.get(
|
|
||||||
CollectedVolume.VOLUME));
|
|
||||||
collectedVolume.setNumberOfVolumes((Integer) data.get(
|
|
||||||
CollectedVolume.NUMBER_OF_VOLUMES));
|
|
||||||
collectedVolume.setNumberOfPages((Integer) data.get(
|
|
||||||
CollectedVolume.NUMBER_OF_PAGES));
|
|
||||||
collectedVolume.setEdition((String) data.get(
|
|
||||||
CollectedVolume.EDITION));
|
|
||||||
|
|
||||||
collectedVolume.save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.Expertise;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -18,6 +21,30 @@ public class ExpertisePropertiesStep extends PublicationPropertiesStep {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getExpertisePropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationPropertySheet(
|
||||||
|
itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.expertise.place"),
|
||||||
|
Expertise.PLACE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.expertise.organization"),
|
||||||
|
Expertise.ORGANIZATION);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.expertise.number_of_pages"),
|
||||||
|
Expertise.NUMBER_OF_PAGES);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.expertise.orderer"),
|
||||||
|
Expertise.ORDERER);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -37,7 +64,7 @@ public class ExpertisePropertiesStep extends PublicationPropertiesStep {
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getExpertisePropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -70,13 +70,6 @@ public class ExpertisePropertyForm
|
||||||
TextField numberOfPages = new TextField(numberOfPagesParam);
|
TextField numberOfPages = new TextField(numberOfPagesParam);
|
||||||
add(numberOfPages);
|
add(numberOfPages);
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.expertise.url").localize()));
|
|
||||||
ParameterModel urlParam =
|
|
||||||
new StringParameter(Expertise.URL);
|
|
||||||
TextField url = new TextField(urlParam);
|
|
||||||
add(url);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.expertise.orderer").localize()));
|
"publications.ui.expertise.orderer").localize()));
|
||||||
m_itemSearchOrderer = new ItemSearchWidget(ITEM_SEARCH_ORDERER,
|
m_itemSearchOrderer = new ItemSearchWidget(ITEM_SEARCH_ORDERER,
|
||||||
|
|
@ -96,7 +89,6 @@ public class ExpertisePropertyForm
|
||||||
data.put(Expertise.PLACE, expertise.getPlace());
|
data.put(Expertise.PLACE, expertise.getPlace());
|
||||||
data.put(ITEM_SEARCH_ORGA, expertise.getOrganization());
|
data.put(ITEM_SEARCH_ORGA, expertise.getOrganization());
|
||||||
data.put(Expertise.NUMBER_OF_PAGES, expertise.getNumberOfPages());
|
data.put(Expertise.NUMBER_OF_PAGES, expertise.getNumberOfPages());
|
||||||
data.put(Expertise.URL, expertise.getUrl());
|
|
||||||
data.put(ITEM_SEARCH_ORDERER, expertise.getOrderer());
|
data.put(ITEM_SEARCH_ORDERER, expertise.getOrderer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,7 +106,6 @@ public class ExpertisePropertyForm
|
||||||
(GenericOrganizationalUnit) data.get(ITEM_SEARCH_ORGA));
|
(GenericOrganizationalUnit) data.get(ITEM_SEARCH_ORGA));
|
||||||
expertise.setNumberOfPages(
|
expertise.setNumberOfPages(
|
||||||
(Integer) data.get(Expertise.NUMBER_OF_PAGES));
|
(Integer) data.get(Expertise.NUMBER_OF_PAGES));
|
||||||
expertise.setUrl((String) data.get(Expertise.URL));
|
|
||||||
expertise.setOrderer(
|
expertise.setOrderer(
|
||||||
(GenericOrganizationalUnit) data.get(ITEM_SEARCH_ORDERER));
|
(GenericOrganizationalUnit) data.get(ITEM_SEARCH_ORDERER));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.GreyLiterature;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.authoring.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -18,6 +22,22 @@ public class GreyLiteraturePropertiesStep extends UnPublishedPropertiesStep {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getGreyLiteraturePropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet)
|
||||||
|
getUnPublishedPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.greyliterature.pages_from"),
|
||||||
|
GreyLiterature.PAGES_FROM);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.greyliterature.pages_to"),
|
||||||
|
GreyLiterature.PAGES_TO);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -37,7 +57,7 @@ public class GreyLiteraturePropertiesStep extends UnPublishedPropertiesStep {
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getGreyLiteraturePropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -57,13 +57,6 @@ public class GreyLiteraturePropertyForm
|
||||||
GreyLiterature.PAGES_TO);
|
GreyLiterature.PAGES_TO);
|
||||||
TextField pagesTo = new TextField(toParam);
|
TextField pagesTo = new TextField(toParam);
|
||||||
add(pagesTo);
|
add(pagesTo);
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.greyliterature.url").localize()));
|
|
||||||
ParameterModel urlParam = new StringParameter(
|
|
||||||
GreyLiterature.URL);
|
|
||||||
TextField url = new TextField(urlParam);
|
|
||||||
add(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -75,7 +68,6 @@ public class GreyLiteraturePropertyForm
|
||||||
|
|
||||||
data.put(GreyLiterature.PAGES_FROM, grey.getPagesFrom());
|
data.put(GreyLiterature.PAGES_FROM, grey.getPagesFrom());
|
||||||
data.put(GreyLiterature.PAGES_TO, grey.getPagesTo());
|
data.put(GreyLiterature.PAGES_TO, grey.getPagesTo());
|
||||||
data.put(GreyLiterature.URL, grey.getUrl());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -89,7 +81,6 @@ public class GreyLiteraturePropertyForm
|
||||||
getPageState())) {
|
getPageState())) {
|
||||||
grey.setPagesFrom((Integer) data.get(GreyLiterature.PAGES_FROM));
|
grey.setPagesFrom((Integer) data.get(GreyLiterature.PAGES_FROM));
|
||||||
grey.setPagesTo((Integer) data.get(GreyLiterature.PAGES_TO));
|
grey.setPagesTo((Integer) data.get(GreyLiterature.PAGES_TO));
|
||||||
grey.setUrl((String) data.get(GreyLiterature.URL));
|
|
||||||
|
|
||||||
grey.save();
|
grey.save();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,43 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.InProceedings;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class InProceedingsPropertiesStep
|
public class InProceedingsPropertiesStep
|
||||||
extends PublicationWithPublisherPropertiesStep {
|
extends PublicationPropertiesStep {
|
||||||
|
|
||||||
public InProceedingsPropertiesStep(ItemSelectionModel itemModel,
|
public InProceedingsPropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getInProceedingsPropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationWithPublisherPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.inproceedings.pages_from"),
|
||||||
|
InProceedings.PAGES_FROM);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.inproceedings.pages_to"),
|
||||||
|
InProceedings.PAGES_TO);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -38,7 +57,7 @@ public class InProceedingsPropertiesStep
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getInProceedingsPropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -8,22 +8,17 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
import com.arsdigita.bebop.form.TextField;
|
||||||
import com.arsdigita.bebop.parameters.DateParameter;
|
|
||||||
import com.arsdigita.bebop.parameters.IntegerParameter;
|
import com.arsdigita.bebop.parameters.IntegerParameter;
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.InProceedings;
|
import com.arsdigita.cms.contenttypes.InProceedings;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.GregorianCalendar;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class InProceedingsPropertyForm
|
public class InProceedingsPropertyForm
|
||||||
extends PublicationWithPublisherPropertyForm
|
extends PublicationPropertyForm
|
||||||
implements FormProcessListener,
|
implements FormProcessListener,
|
||||||
FormInitListener,
|
FormInitListener,
|
||||||
FormSubmissionListener {
|
FormSubmissionListener {
|
||||||
|
|
@ -46,73 +41,6 @@ public class InProceedingsPropertyForm
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.organizer_of_conference").
|
|
||||||
localize()));
|
|
||||||
ParameterModel organizerParam =
|
|
||||||
new StringParameter(InProceedings.ORGANIZER_OF_CONFERENCE);
|
|
||||||
TextField organizer = new TextField(organizerParam);
|
|
||||||
add(organizer);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.name_of_conference").
|
|
||||||
localize()));
|
|
||||||
ParameterModel nameOfConferenceParam =
|
|
||||||
new StringParameter(InProceedings.NAME_OF_CONFERENCE);
|
|
||||||
TextField nameOfConference = new TextField(nameOfConferenceParam);
|
|
||||||
add(nameOfConference);
|
|
||||||
|
|
||||||
Calendar today = new GregorianCalendar();
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.date_from_of_conference").
|
|
||||||
localize()));
|
|
||||||
ParameterModel dateFromParam =
|
|
||||||
new DateParameter(InProceedings.DATE_FROM_OF_CONFERENCE);
|
|
||||||
com.arsdigita.bebop.form.Date dateFrom =
|
|
||||||
new com.arsdigita.bebop.form.Date(
|
|
||||||
dateFromParam);
|
|
||||||
dateFrom.setYearRange(1900, today.get(Calendar.YEAR) + 3);
|
|
||||||
add(dateFrom);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.date_to_of_conference").
|
|
||||||
localize()));
|
|
||||||
ParameterModel dateToParam =
|
|
||||||
new DateParameter(InProceedings.DATE_TO_OF_CONFERENCE);
|
|
||||||
com.arsdigita.bebop.form.Date dateTo =
|
|
||||||
new com.arsdigita.bebop.form.Date(
|
|
||||||
dateToParam);
|
|
||||||
dateTo.setYearRange(1900, today.get(Calendar.YEAR) + 3);
|
|
||||||
add(dateTo);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.place_of_conference").
|
|
||||||
localize()));
|
|
||||||
ParameterModel placeParam = new StringParameter(
|
|
||||||
InProceedings.PLACE_OF_CONFERENCE);
|
|
||||||
TextField place = new TextField(placeParam);
|
|
||||||
add(place);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.volume").localize()));
|
|
||||||
ParameterModel volumeParam = new IntegerParameter(InProceedings.VOLUME);
|
|
||||||
TextField volume = new TextField(volumeParam);
|
|
||||||
add(volume);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.number_of_volumes").localize()));
|
|
||||||
ParameterModel numberOfVolumesParam =
|
|
||||||
new IntegerParameter(InProceedings.NUMBER_OF_VOLUMES);
|
|
||||||
TextField numberOfVolumes = new TextField(numberOfVolumesParam);
|
|
||||||
add(numberOfVolumes);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.inproceedings.number_of_pages").localize()));
|
|
||||||
ParameterModel numberOfPagesParam =
|
|
||||||
new IntegerParameter(InProceedings.NUMBER_OF_PAGES);
|
|
||||||
TextField numberOfPages = new TextField(numberOfPagesParam);
|
|
||||||
add(numberOfPages);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.inproceedings.pages_from").localize()));
|
"publications.ui.inproceedings.pages_from").localize()));
|
||||||
ParameterModel pagesFromParam =
|
ParameterModel pagesFromParam =
|
||||||
|
|
@ -136,22 +64,6 @@ public class InProceedingsPropertyForm
|
||||||
InProceedings inProceedings =
|
InProceedings inProceedings =
|
||||||
(InProceedings) super.initBasicWidgets(fse);
|
(InProceedings) super.initBasicWidgets(fse);
|
||||||
|
|
||||||
data.put(InProceedings.ORGANIZER_OF_CONFERENCE,
|
|
||||||
inProceedings.getOrganizerOfConference());
|
|
||||||
data.put(InProceedings.NAME_OF_CONFERENCE,
|
|
||||||
inProceedings.getNameOfConference());
|
|
||||||
data.put(InProceedings.DATE_FROM_OF_CONFERENCE,
|
|
||||||
inProceedings.getDateFromOfConference());
|
|
||||||
data.put(InProceedings.DATE_TO_OF_CONFERENCE,
|
|
||||||
inProceedings.getDateToOfConference());
|
|
||||||
data.put(InProceedings.PLACE_OF_CONFERENCE,
|
|
||||||
inProceedings.getPlaceOfConference());
|
|
||||||
data.put(InProceedings.VOLUME,
|
|
||||||
inProceedings.getVolume());
|
|
||||||
data.put(InProceedings.NUMBER_OF_VOLUMES,
|
|
||||||
inProceedings.getNumberOfVolumes());
|
|
||||||
data.put(InProceedings.NUMBER_OF_PAGES,
|
|
||||||
inProceedings.getNumberOfPages());
|
|
||||||
data.put(InProceedings.PAGES_FROM,
|
data.put(InProceedings.PAGES_FROM,
|
||||||
inProceedings.getPagesFrom());
|
inProceedings.getPagesFrom());
|
||||||
data.put(InProceedings.PAGES_TO,
|
data.put(InProceedings.PAGES_TO,
|
||||||
|
|
@ -168,22 +80,6 @@ public class InProceedingsPropertyForm
|
||||||
|
|
||||||
if ((inProceedings != null) && getSaveCancelSection().getSaveButton().
|
if ((inProceedings != null) && getSaveCancelSection().getSaveButton().
|
||||||
isSelected(fse.getPageState())) {
|
isSelected(fse.getPageState())) {
|
||||||
inProceedings.setOrganizerOfConference(
|
|
||||||
(String) data.get(InProceedings.ORGANIZER_OF_CONFERENCE));
|
|
||||||
inProceedings.setNameOfConference(
|
|
||||||
(String) data.get(InProceedings.NAME_OF_CONFERENCE));
|
|
||||||
inProceedings.setDateFromOfConference(
|
|
||||||
(Date) data.get(InProceedings.DATE_FROM_OF_CONFERENCE));
|
|
||||||
inProceedings.setDateToOfConference(
|
|
||||||
(Date) data.get(InProceedings.DATE_TO_OF_CONFERENCE));
|
|
||||||
inProceedings.setPlaceOfConference(
|
|
||||||
(String) data.get(InProceedings.PLACE_OF_CONFERENCE));
|
|
||||||
inProceedings.setVolume(
|
|
||||||
(Integer) data.get(InProceedings.VOLUME));
|
|
||||||
inProceedings.setNumberOfVolumes(
|
|
||||||
(Integer) data.get(InProceedings.NUMBER_OF_VOLUMES));
|
|
||||||
inProceedings.setNumberOfPages(
|
|
||||||
(Integer) data.get(InProceedings.NUMBER_OF_PAGES));
|
|
||||||
inProceedings.setPagesFrom(
|
inProceedings.setPagesFrom(
|
||||||
(Integer) data.get(InProceedings.PAGES_FROM));
|
(Integer) data.get(InProceedings.PAGES_FROM));
|
||||||
inProceedings.setPagesTo(
|
inProceedings.setPagesTo(
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.InternetArticle;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -18,6 +21,42 @@ public class InternetArticlePropertiesStep extends PublicationPropertiesStep {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getInternetArticlePropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.place"),
|
||||||
|
InternetArticle.PLACE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.organization"),
|
||||||
|
InternetArticle.ORGANIZATION);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.number"),
|
||||||
|
InternetArticle.NUMBER);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.number_of_pages"),
|
||||||
|
InternetArticle.NUMBER_OF_PAGES);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.edition"),
|
||||||
|
InternetArticle.EDITION);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.issn"),
|
||||||
|
InternetArticle.ISSN);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.internetarticle.publication_date"),
|
||||||
|
InternetArticle.PUBLICATION_DATE);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
|
||||||
|
|
@ -66,12 +66,6 @@ public class InternetArticlePropertyForm
|
||||||
GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE));
|
GenericOrganizationalUnit.BASE_DATA_OBJECT_TYPE));
|
||||||
add(m_itemSearch);
|
add(m_itemSearch);
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.internetarticle.url").localize()));
|
|
||||||
ParameterModel urlParam = new StringParameter(InternetArticle.URL);
|
|
||||||
TextField url = new TextField(urlParam);
|
|
||||||
add(url);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.internetarticle.number").localize()));
|
"publications.ui.internetarticle.number").localize()));
|
||||||
ParameterModel numberParam =
|
ParameterModel numberParam =
|
||||||
|
|
@ -122,7 +116,6 @@ public class InternetArticlePropertyForm
|
||||||
|
|
||||||
data.put(InternetArticle.PLACE, article.getPlace());
|
data.put(InternetArticle.PLACE, article.getPlace());
|
||||||
data.put(ITEM_SEARCH, article.getOrganization());
|
data.put(ITEM_SEARCH, article.getOrganization());
|
||||||
data.put(InternetArticle.URL, article.getUrl());
|
|
||||||
data.put(InternetArticle.NUMBER, article.getNumber());
|
data.put(InternetArticle.NUMBER, article.getNumber());
|
||||||
data.put(InternetArticle.NUMBER_OF_PAGES, article.getNumberOfPages());
|
data.put(InternetArticle.NUMBER_OF_PAGES, article.getNumberOfPages());
|
||||||
data.put(InternetArticle.EDITION, article.getEdition());
|
data.put(InternetArticle.EDITION, article.getEdition());
|
||||||
|
|
@ -143,8 +136,6 @@ public class InternetArticlePropertyForm
|
||||||
article.setPlace((String) data.get(InternetArticle.PLACE));
|
article.setPlace((String) data.get(InternetArticle.PLACE));
|
||||||
article.setOrganization(
|
article.setOrganization(
|
||||||
(GenericOrganizationalUnit) data.get(ITEM_SEARCH));
|
(GenericOrganizationalUnit) data.get(ITEM_SEARCH));
|
||||||
article.setUrl(
|
|
||||||
(String) data.get(InternetArticle.URL));
|
|
||||||
article.setNumber((String) data.get(InternetArticle.NUMBER));
|
article.setNumber((String) data.get(InternetArticle.NUMBER));
|
||||||
article.setNumberOfPages(
|
article.setNumberOfPages(
|
||||||
(Integer) data.get(InternetArticle.NUMBER_OF_PAGES));
|
(Integer) data.get(InternetArticle.NUMBER_OF_PAGES));
|
||||||
|
|
|
||||||
|
|
@ -22,25 +22,12 @@ public class MonographPropertiesStep
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getMonographPropertiesStep(
|
public static Component getMonographPropertySheet(
|
||||||
ItemSelectionModel itemModel) {
|
ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet)
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet)
|
||||||
PublicationWithPublisherPropertiesStep.
|
PublicationWithPublisherPropertiesStep.
|
||||||
getPublicationWithPublisherPropertySheet(itemModel);
|
getPublicationWithPublisherPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.volume"),
|
|
||||||
Monograph.VOLUME);
|
|
||||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.numberOfVolumes"),
|
|
||||||
Monograph.NUMBER_OF_VOLUMES);
|
|
||||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.numberOfPages"),
|
|
||||||
Monograph.NUMBER_OF_PAGES);
|
|
||||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.edition"),
|
|
||||||
Monograph.EDITION);
|
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +50,7 @@ public class MonographPropertiesStep
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getMonographPropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,10 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.FormData;
|
import com.arsdigita.bebop.FormData;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
import com.arsdigita.bebop.Label;
|
|
||||||
import com.arsdigita.bebop.event.FormInitListener;
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
import com.arsdigita.bebop.event.FormProcessListener;
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
|
||||||
import com.arsdigita.bebop.parameters.IntegerParameter;
|
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.Monograph;
|
import com.arsdigita.cms.contenttypes.Monograph;
|
||||||
|
|
||||||
|
|
@ -41,33 +36,6 @@ public class MonographPropertyForm
|
||||||
@Override
|
@Override
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.volume").
|
|
||||||
localize()));
|
|
||||||
ParameterModel volumeParam = new IntegerParameter(Monograph.VOLUME);
|
|
||||||
TextField volume = new TextField(volumeParam);
|
|
||||||
add(volume);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.numberOfVolumes").localize()));
|
|
||||||
ParameterModel numberOfVolumesParam = new IntegerParameter(
|
|
||||||
Monograph.NUMBER_OF_VOLUMES);
|
|
||||||
TextField numberOfVolumes = new TextField(numberOfVolumesParam);
|
|
||||||
add(numberOfVolumes);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.numberOfPages").localize()));
|
|
||||||
ParameterModel numberOfPagesParam = new IntegerParameter(
|
|
||||||
Monograph.NUMBER_OF_PAGES);
|
|
||||||
TextField numberOfPages = new TextField(numberOfPagesParam);
|
|
||||||
add(numberOfPages);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.monograph.edition").localize()));
|
|
||||||
ParameterModel editionParam = new StringParameter(Monograph.EDITION);
|
|
||||||
TextField edition = new TextField(editionParam);
|
|
||||||
add(edition);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -76,11 +44,6 @@ public class MonographPropertyForm
|
||||||
|
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
Monograph monograph = (Monograph) super.initBasicWidgets(fse);
|
Monograph monograph = (Monograph) super.initBasicWidgets(fse);
|
||||||
|
|
||||||
data.put(Monograph.VOLUME, monograph.getVolume());
|
|
||||||
data.put(Monograph.NUMBER_OF_VOLUMES, monograph.getNumberOfVolumes());
|
|
||||||
data.put(Monograph.NUMBER_OF_PAGES, monograph.getNumberOfPages());
|
|
||||||
data.put(Monograph.EDITION, monograph.getEdition());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -89,17 +52,5 @@ public class MonographPropertyForm
|
||||||
|
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
Monograph monograph = (Monograph) super.processBasicWidgets(fse);
|
Monograph monograph = (Monograph) super.processBasicWidgets(fse);
|
||||||
|
|
||||||
if ((monograph != null) && getSaveCancelSection().getSaveButton().
|
|
||||||
isSelected(fse.getPageState())) {
|
|
||||||
monograph.setVolume((Integer) data.get(Monograph.VOLUME));
|
|
||||||
monograph.setNumberOfVolumes((Integer) data.get(
|
|
||||||
Monograph.NUMBER_OF_VOLUMES));
|
|
||||||
monograph.setNumberOfPages((Integer) data.get(
|
|
||||||
Monograph.NUMBER_OF_PAGES));
|
|
||||||
monograph.setEdition((String) data.get(Monograph.EDITION));
|
|
||||||
|
|
||||||
monograph.save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.FormData;
|
||||||
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
|
import com.arsdigita.cms.ContentType;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.InProceedings;
|
||||||
|
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||||
|
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsPapersAddForm
|
||||||
|
extends BasicItemForm
|
||||||
|
implements FormProcessListener,
|
||||||
|
FormInitListener {
|
||||||
|
|
||||||
|
private ItemSearchWidget m_itemSearch;
|
||||||
|
private final String ITEM_SEARCH = "papers";
|
||||||
|
private ItemSelectionModel m_itemModel;
|
||||||
|
|
||||||
|
public ProceedingsPapersAddForm(ItemSelectionModel itemModel) {
|
||||||
|
super("PapersAddForm", itemModel);
|
||||||
|
m_itemModel = itemModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addWidgets() {
|
||||||
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.select_paper").localize()));
|
||||||
|
m_itemSearch = new ItemSearchWidget(
|
||||||
|
ITEM_SEARCH,
|
||||||
|
ContentType.findByAssociatedObjectType(
|
||||||
|
InProceedings.class.getName()));
|
||||||
|
add(m_itemSearch);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(FormSectionEvent fse) throws FormProcessException {
|
||||||
|
FormData data = fse.getFormData();
|
||||||
|
PageState state = fse.getPageState();
|
||||||
|
|
||||||
|
setVisible(state, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process(FormSectionEvent fse) throws FormProcessException {
|
||||||
|
FormData data = fse.getFormData();
|
||||||
|
PageState state = fse.getPageState();
|
||||||
|
Proceedings proceedings = (Proceedings) getItemSelectionModel().
|
||||||
|
getSelectedObject(state);
|
||||||
|
|
||||||
|
if (!(this.getSaveCancelSection().getCancelButton().
|
||||||
|
isSelected(state))) {
|
||||||
|
proceedings.addPaper((InProceedings) data.get(ITEM_SEARCH));
|
||||||
|
}
|
||||||
|
|
||||||
|
init(fse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||||
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsPapersStep extends SimpleEditStep {
|
||||||
|
|
||||||
|
private static final String ADD_PAPER_SHEET_NAME = "addPaper";
|
||||||
|
|
||||||
|
public ProceedingsPapersStep(ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent) {
|
||||||
|
this(itemModel, parent, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProceedingsPapersStep(ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent,
|
||||||
|
String prefix) {
|
||||||
|
super(itemModel, parent, prefix);
|
||||||
|
|
||||||
|
BasicItemForm addPaperSheet =
|
||||||
|
new ProceedingsPapersAddForm(itemModel);
|
||||||
|
add(ADD_PAPER_SHEET_NAME,
|
||||||
|
(String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.add_paper").localize(),
|
||||||
|
new WorkflowLockedComponentAccess(addPaperSheet, itemModel),
|
||||||
|
addPaperSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
|
ProceedingsPapersTable papersTable = new ProceedingsPapersTable(
|
||||||
|
itemModel);
|
||||||
|
setDisplayComponent(papersTable);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,319 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
|
import com.arsdigita.bebop.ControlLink;
|
||||||
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
|
import com.arsdigita.bebop.Table;
|
||||||
|
import com.arsdigita.bebop.event.TableActionEvent;
|
||||||
|
import com.arsdigita.bebop.event.TableActionListener;
|
||||||
|
import com.arsdigita.bebop.table.TableCellRenderer;
|
||||||
|
import com.arsdigita.bebop.table.TableColumn;
|
||||||
|
import com.arsdigita.bebop.table.TableColumnModel;
|
||||||
|
import com.arsdigita.bebop.table.TableModel;
|
||||||
|
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.SecurityManager;
|
||||||
|
import com.arsdigita.cms.contenttypes.ArticleInCollectedVolumeCollection;
|
||||||
|
import com.arsdigita.cms.contenttypes.CollectedVolume;
|
||||||
|
import com.arsdigita.cms.contenttypes.InProceedings;
|
||||||
|
import com.arsdigita.cms.contenttypes.InProceedingsCollection;
|
||||||
|
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||||
|
import com.arsdigita.cms.dispatcher.Utilities;
|
||||||
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsPapersTable
|
||||||
|
extends Table
|
||||||
|
implements TableActionListener {
|
||||||
|
|
||||||
|
private final Logger s_log = Logger.getLogger(
|
||||||
|
ProceedingsPapersTable.class);
|
||||||
|
private final String TABLE_COL_EDIT = "table_col_edit";
|
||||||
|
private final String TABLE_COL_DEL = "table_col_del";
|
||||||
|
private final String TABLE_COL_UP = "table_col_up";
|
||||||
|
private final String TABLE_COL_DOWN = "table_col_down";
|
||||||
|
private ItemSelectionModel m_itemModel;
|
||||||
|
|
||||||
|
public ProceedingsPapersTable(ItemSelectionModel itemModel) {
|
||||||
|
super();
|
||||||
|
m_itemModel = itemModel;
|
||||||
|
|
||||||
|
setEmptyView(new Label(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.procreedings.no_papers")));
|
||||||
|
|
||||||
|
TableColumnModel colModel = getColumnModel();
|
||||||
|
colModel.add(new TableColumn(
|
||||||
|
0,
|
||||||
|
PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.paper").localize(),
|
||||||
|
TABLE_COL_EDIT));
|
||||||
|
colModel.add(new TableColumn(
|
||||||
|
1,
|
||||||
|
PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.paper.remove").localize(),
|
||||||
|
TABLE_COL_DEL));
|
||||||
|
colModel.add(new TableColumn(
|
||||||
|
2,
|
||||||
|
PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.procedings.paper.up").localize(),
|
||||||
|
TABLE_COL_UP));
|
||||||
|
colModel.add(new TableColumn(
|
||||||
|
3,
|
||||||
|
PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.paper.down").localize(),
|
||||||
|
TABLE_COL_DOWN));
|
||||||
|
|
||||||
|
setModelBuilder(
|
||||||
|
new ProceedingsPapersTableModelBuilder(itemModel));
|
||||||
|
|
||||||
|
colModel.get(0).setCellRenderer(new EditCellRenderer());
|
||||||
|
colModel.get(1).setCellRenderer(new DeleteCellRenderer());
|
||||||
|
colModel.get(2).setCellRenderer(new UpCellRenderer());
|
||||||
|
colModel.get(3).setCellRenderer(new DownCellRenderer());
|
||||||
|
|
||||||
|
addTableActionListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ProceedingsPapersTableModelBuilder
|
||||||
|
extends LockableImpl
|
||||||
|
implements TableModelBuilder {
|
||||||
|
|
||||||
|
private ItemSelectionModel m_itemModel;
|
||||||
|
|
||||||
|
public ProceedingsPapersTableModelBuilder(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
m_itemModel = itemModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableModel makeModel(Table table, PageState state) {
|
||||||
|
table.getRowSelectionModel().clearSelection(state);
|
||||||
|
Proceedings proceedings =
|
||||||
|
(Proceedings) m_itemModel.getSelectedObject(state);
|
||||||
|
return new ProceedingsPapersTableModel(table,
|
||||||
|
state,
|
||||||
|
proceedings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ProceedingsPapersTableModel implements TableModel {
|
||||||
|
|
||||||
|
private Table m_table;
|
||||||
|
private InProceedingsCollection m_papers;
|
||||||
|
private InProceedings m_paper;
|
||||||
|
|
||||||
|
private ProceedingsPapersTableModel(Table table,
|
||||||
|
PageState state,
|
||||||
|
Proceedings proceedings) {
|
||||||
|
m_table = table;
|
||||||
|
m_papers = proceedings.getPapers();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getColumnCount() {
|
||||||
|
return m_table.getColumnModel().size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean nextRow() {
|
||||||
|
boolean ret;
|
||||||
|
|
||||||
|
if ((m_papers != null) && m_papers.next()) {
|
||||||
|
m_paper = m_papers.getPaper();
|
||||||
|
ret = true;
|
||||||
|
} else {
|
||||||
|
ret = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getElementAt(int columnIndex) {
|
||||||
|
switch (columnIndex) {
|
||||||
|
case 0:
|
||||||
|
return m_paper.getTitle();
|
||||||
|
case 1:
|
||||||
|
return PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.paper.remove").
|
||||||
|
localize();
|
||||||
|
case 2:
|
||||||
|
return PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.paper.up").
|
||||||
|
localize();
|
||||||
|
case 3:
|
||||||
|
return PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.paper.down").
|
||||||
|
localize();
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getKeyAt(int columnIndex) {
|
||||||
|
return m_paper.getID();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class EditCellRenderer
|
||||||
|
extends LockableImpl
|
||||||
|
implements TableCellRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getComponent(Table table,
|
||||||
|
PageState state,
|
||||||
|
Object value,
|
||||||
|
boolean isSelected,
|
||||||
|
Object key,
|
||||||
|
int row,
|
||||||
|
int col) {
|
||||||
|
SecurityManager securityManager =
|
||||||
|
Utilities.getSecurityManager(state);
|
||||||
|
Proceedings proceedings = (Proceedings) m_itemModel.getSelectedItem(
|
||||||
|
state);
|
||||||
|
|
||||||
|
boolean canEdit = securityManager.canAccess(
|
||||||
|
state.getRequest(),
|
||||||
|
SecurityManager.EDIT_ITEM,
|
||||||
|
proceedings);
|
||||||
|
|
||||||
|
if (canEdit) {
|
||||||
|
ControlLink link = new ControlLink(value.toString());
|
||||||
|
return link;
|
||||||
|
} else {
|
||||||
|
Label label = new Label(value.toString());
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class DeleteCellRenderer
|
||||||
|
extends LockableImpl
|
||||||
|
implements TableCellRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getComponent(Table table,
|
||||||
|
PageState state,
|
||||||
|
Object value,
|
||||||
|
boolean isSelected,
|
||||||
|
Object key,
|
||||||
|
int row,
|
||||||
|
int column) {
|
||||||
|
SecurityManager securityManager =
|
||||||
|
Utilities.getSecurityManager(state);
|
||||||
|
Proceedings proceedings = (Proceedings) m_itemModel.getSelectedItem(
|
||||||
|
state);
|
||||||
|
|
||||||
|
boolean canEdit = securityManager.canAccess(
|
||||||
|
state.getRequest(),
|
||||||
|
SecurityManager.DELETE_ITEM,
|
||||||
|
proceedings);
|
||||||
|
|
||||||
|
if (canEdit) {
|
||||||
|
ControlLink link = new ControlLink(value.toString());
|
||||||
|
link.setConfirmation((String) PublicationGlobalizationUtil.
|
||||||
|
globalize(
|
||||||
|
"publications.ui.proceedings.paper.confirm_remove").
|
||||||
|
localize());
|
||||||
|
return link;
|
||||||
|
} else {
|
||||||
|
Label label = new Label(value.toString());
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class UpCellRenderer
|
||||||
|
extends LockableImpl
|
||||||
|
implements TableCellRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getComponent(Table table,
|
||||||
|
PageState state,
|
||||||
|
Object value,
|
||||||
|
boolean isSelected,
|
||||||
|
Object key,
|
||||||
|
int row,
|
||||||
|
int col) {
|
||||||
|
if (0 == row) {
|
||||||
|
s_log.debug("Row is first row in table, don't show up link");
|
||||||
|
Label label = new Label("");
|
||||||
|
return label;
|
||||||
|
} else {
|
||||||
|
ControlLink link = new ControlLink(value.toString());
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class DownCellRenderer
|
||||||
|
extends LockableImpl
|
||||||
|
implements TableCellRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getComponent(
|
||||||
|
Table table,
|
||||||
|
PageState state,
|
||||||
|
Object value,
|
||||||
|
boolean isSelected,
|
||||||
|
Object key,
|
||||||
|
int row,
|
||||||
|
int col) {
|
||||||
|
|
||||||
|
CollectedVolume collectedVolume =
|
||||||
|
(CollectedVolume) m_itemModel.getSelectedObject(
|
||||||
|
state);
|
||||||
|
ArticleInCollectedVolumeCollection articles =
|
||||||
|
collectedVolume.getArticles();
|
||||||
|
|
||||||
|
if ((articles.size() - 1)
|
||||||
|
== row) {
|
||||||
|
s_log.debug("Row is last row in table, don't show down link");
|
||||||
|
Label label = new Label("");
|
||||||
|
return label;
|
||||||
|
} else {
|
||||||
|
ControlLink link = new ControlLink(value.toString());
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cellSelected(TableActionEvent event) {
|
||||||
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
|
InProceedings paper =
|
||||||
|
new InProceedings(
|
||||||
|
new BigDecimal(event.getRowKey().toString()));
|
||||||
|
|
||||||
|
Proceedings proceedings =
|
||||||
|
(Proceedings) m_itemModel.getSelectedItem(state);
|
||||||
|
|
||||||
|
InProceedingsCollection papers =
|
||||||
|
proceedings.getPapers();
|
||||||
|
|
||||||
|
TableColumn column = getColumnModel().get(event.getColumn().intValue());
|
||||||
|
|
||||||
|
if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) {
|
||||||
|
|
||||||
|
} else if(column.getHeaderKey().toString().equals(TABLE_COL_DEL)) {
|
||||||
|
proceedings.removePaper(paper);
|
||||||
|
} else if(column.getHeaderKey().toString().equals(TABLE_COL_UP)) {
|
||||||
|
papers.swapWithPrevious(paper);
|
||||||
|
} else if(column.getHeaderKey().toString().equals(TABLE_COL_DOWN)) {
|
||||||
|
papers.swapWithNext(paper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void headSelected(TableActionEvent event) {
|
||||||
|
//Noting to do
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||||
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsPropertiesStep
|
||||||
|
extends PublicationWithPublisherPropertiesStep {
|
||||||
|
|
||||||
|
public ProceedingsPropertiesStep(
|
||||||
|
ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent) {
|
||||||
|
super(itemModel, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Component getProceedingsPropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationPropertySheet(
|
||||||
|
itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.organizer_of_conference"),
|
||||||
|
Proceedings.ORGANIZER_OF_CONFERENCE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.name_of_conference"),
|
||||||
|
Proceedings.NAME_OF_CONFERENCE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.place_of_conference"),
|
||||||
|
Proceedings.PLACE_OF_CONFERENCE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.date_from_of_conference"),
|
||||||
|
Proceedings.DATE_FROM_OF_CONFERENCE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.date_TO_of_conference"),
|
||||||
|
Proceedings.DATE_TO_OF_CONFERENCE);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addBasicProperties(
|
||||||
|
ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent) {
|
||||||
|
SimpleEditStep basicProperties = new SimpleEditStep(itemModel,
|
||||||
|
parent,
|
||||||
|
EDIT_SHEET_NAME);
|
||||||
|
|
||||||
|
BasicPageForm editBasicSheet =
|
||||||
|
new ProceedingsPropertyForm(itemModel, this);
|
||||||
|
|
||||||
|
basicProperties.add(EDIT_SHEET_NAME,
|
||||||
|
(String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.edit_basic_sheet").localize(),
|
||||||
|
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||||
|
itemModel),
|
||||||
|
editBasicSheet.getSaveCancelSection().
|
||||||
|
getCancelButton());
|
||||||
|
|
||||||
|
basicProperties.setDisplayComponent(
|
||||||
|
getPublicationPropertySheet(itemModel));
|
||||||
|
|
||||||
|
getSegmentedPanel().addSegment(
|
||||||
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.basic_properties").localize()),
|
||||||
|
basicProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addSteps(ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent) {
|
||||||
|
super.addSteps(itemModel, parent);
|
||||||
|
|
||||||
|
addStep(new ProceedingsPapersStep(itemModel, parent),
|
||||||
|
"publications.ui.proceedings.papers");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,136 @@
|
||||||
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.FormData;
|
||||||
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
|
import com.arsdigita.bebop.form.Date;
|
||||||
|
import com.arsdigita.bebop.form.TextField;
|
||||||
|
import com.arsdigita.bebop.parameters.DateParameter;
|
||||||
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
|
import com.arsdigita.cms.ContentType;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||||
|
import com.arsdigita.cms.contenttypes.Proceedings;
|
||||||
|
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class ProceedingsPropertyForm
|
||||||
|
extends PublicationWithPublisherPropertyForm
|
||||||
|
implements FormProcessListener,
|
||||||
|
FormInitListener,
|
||||||
|
FormSubmissionListener {
|
||||||
|
|
||||||
|
private ProceedingsPropertiesStep m_step;
|
||||||
|
private ItemSearchWidget m_itemSearch;
|
||||||
|
private final String ITEM_SEARCH = "organizerOfConference";
|
||||||
|
public static final String ID = "proceedingsEdit";
|
||||||
|
|
||||||
|
public ProceedingsPropertyForm(ItemSelectionModel itemModel) {
|
||||||
|
this(itemModel, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProceedingsPropertyForm(ItemSelectionModel itemModel,
|
||||||
|
ProceedingsPropertiesStep step) {
|
||||||
|
super(itemModel, step);
|
||||||
|
m_step = step;
|
||||||
|
addSubmissionListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addWidgets() {
|
||||||
|
super.addWidgets();
|
||||||
|
|
||||||
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.organizer_of_conference").
|
||||||
|
localize()));
|
||||||
|
m_itemSearch =
|
||||||
|
new ItemSearchWidget(ITEM_SEARCH,
|
||||||
|
ContentType.findByAssociatedObjectType(
|
||||||
|
GenericOrganizationalUnit.class.getName()));
|
||||||
|
add(m_itemSearch);
|
||||||
|
|
||||||
|
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.name_of_conference")));
|
||||||
|
ParameterModel nameOfConfParam = new StringParameter(
|
||||||
|
Proceedings.NAME_OF_CONFERENCE);
|
||||||
|
TextField nameOfConf = new TextField(nameOfConfParam);
|
||||||
|
add(nameOfConf);
|
||||||
|
|
||||||
|
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.place_of_conference")));
|
||||||
|
ParameterModel placeOfConfParam = new StringParameter(
|
||||||
|
Proceedings.PLACE_OF_CONFERENCE);
|
||||||
|
TextField placeOfConf = new TextField(placeOfConfParam);
|
||||||
|
add(placeOfConf);
|
||||||
|
|
||||||
|
Calendar today = new GregorianCalendar();
|
||||||
|
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.date_from_of_conference")));
|
||||||
|
ParameterModel dateFromParam = new DateParameter(
|
||||||
|
Proceedings.DATE_FROM_OF_CONFERENCE);
|
||||||
|
Date dateFrom = new Date(dateFromParam);
|
||||||
|
dateFrom.setYearRange(1900, today.get(Calendar.YEAR) + 3);
|
||||||
|
add(dateFrom);
|
||||||
|
|
||||||
|
add(new Label(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.proceedings.date_from_of_conference")));
|
||||||
|
ParameterModel dateToParam = new DateParameter(
|
||||||
|
Proceedings.DATE_FROM_OF_CONFERENCE);
|
||||||
|
Date dateTo = new Date(dateToParam);
|
||||||
|
dateTo.setYearRange(1900, today.get(Calendar.YEAR) + 3);
|
||||||
|
add(dateTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(FormSectionEvent fse) throws FormProcessException {
|
||||||
|
super.init(fse);
|
||||||
|
|
||||||
|
FormData data = fse.getFormData();
|
||||||
|
Proceedings proceedings = (Proceedings) super.initBasicWidgets(fse);
|
||||||
|
|
||||||
|
data.put(ITEM_SEARCH, proceedings.getOrganizerOfConference());
|
||||||
|
data.put(Proceedings.NAME_OF_CONFERENCE,
|
||||||
|
proceedings.getNameOfConference());
|
||||||
|
data.put(Proceedings.PLACE_OF_CONFERENCE,
|
||||||
|
proceedings.getPlaceOfConference());
|
||||||
|
data.put(Proceedings.DATE_FROM_OF_CONFERENCE,
|
||||||
|
proceedings.getDateFromOfConference());
|
||||||
|
data.put(Proceedings.DATE_TO_OF_CONFERENCE,
|
||||||
|
proceedings.getDateToOfConference());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process(FormSectionEvent fse) throws FormProcessException {
|
||||||
|
super.process(fse);
|
||||||
|
|
||||||
|
FormData data = fse.getFormData();
|
||||||
|
Proceedings proceedings = (Proceedings) super.processBasicWidgets(fse);
|
||||||
|
|
||||||
|
|
||||||
|
if ((proceedings != null) && getSaveCancelSection().getSaveButton().
|
||||||
|
isSelected(fse.getPageState())) {
|
||||||
|
proceedings.setOrganizerOfConference(
|
||||||
|
(GenericOrganizationalUnit) data.get(ITEM_SEARCH));
|
||||||
|
proceedings.setNameOfConference((String) data.get(
|
||||||
|
Proceedings.NAME_OF_CONFERENCE));
|
||||||
|
proceedings.setPlaceOfConference((String) data.get(
|
||||||
|
Proceedings.PLACE_OF_CONFERENCE));
|
||||||
|
proceedings.setDateFromOfConference((java.util.Date) data.get(
|
||||||
|
Proceedings.DATE_FROM_OF_CONFERENCE));
|
||||||
|
proceedings.setDateToOfConference((java.util.Date) data.get(
|
||||||
|
Proceedings.DATE_TO_OF_CONFERENCE));
|
||||||
|
|
||||||
|
proceedings.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -32,6 +32,26 @@ public class PublicationWithPublisherPropertiesStep
|
||||||
"publications.ui.with_publisher.isbn"),
|
"publications.ui.with_publisher.isbn"),
|
||||||
PublicationWithPublisher.ISBN);
|
PublicationWithPublisher.ISBN);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.with_publisher.volume"),
|
||||||
|
PublicationWithPublisher.VOLUME);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.with_publisher.number_of_volumes"),
|
||||||
|
PublicationWithPublisher.NUMBER_OF_VOLUMES);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.with_publisher.number_of_pages"),
|
||||||
|
PublicationWithPublisher.NUMBER_OF_PAGES);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.with_publisher.edition"),
|
||||||
|
PublicationWithPublisher.EDITION);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.with_publisher.publisher"),
|
||||||
|
PublicationWithPublisher.PUBLISHER);
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
import com.arsdigita.bebop.form.TextField;
|
||||||
|
import com.arsdigita.bebop.parameters.IntegerParameter;
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
import com.arsdigita.cms.ContentType;
|
import com.arsdigita.cms.ContentType;
|
||||||
|
|
@ -67,13 +68,37 @@ public class PublicationWithPublisherPropertyForm
|
||||||
TextField isbn = new TextField(isbnParam);
|
TextField isbn = new TextField(isbnParam);
|
||||||
add(isbn);
|
add(isbn);
|
||||||
|
|
||||||
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.collected_volume.volume").localize()));
|
||||||
|
ParameterModel volumeParam = new IntegerParameter(
|
||||||
|
PublicationWithPublisher.VOLUME);
|
||||||
|
TextField volume = new TextField(volumeParam);
|
||||||
|
add(volume);
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.with_publisher.url").localize()));
|
"publications.ui.collected_volume.number_of_volumes").
|
||||||
ParameterModel urlParam = new StringParameter(
|
localize()));
|
||||||
PublicationWithPublisher.URL);
|
ParameterModel numberOfVolumesParam =
|
||||||
TextField url = new TextField(urlParam);
|
new IntegerParameter(
|
||||||
add(url);
|
PublicationWithPublisher.NUMBER_OF_VOLUMES);
|
||||||
|
TextField numberOfVolumes = new TextField(numberOfVolumesParam);
|
||||||
|
add(numberOfVolumes);
|
||||||
|
|
||||||
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.collected_volume.number_of_pages").
|
||||||
|
localize()));
|
||||||
|
ParameterModel numberOfPagesParam = new IntegerParameter(
|
||||||
|
PublicationWithPublisher.NUMBER_OF_PAGES);
|
||||||
|
TextField numberOfPages = new TextField(numberOfPagesParam);
|
||||||
|
add(numberOfPages);
|
||||||
|
|
||||||
|
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.collected_volume.edition").
|
||||||
|
localize()));
|
||||||
|
ParameterModel editionModel = new StringParameter(
|
||||||
|
PublicationWithPublisher.EDITION);
|
||||||
|
TextField edition = new TextField(editionModel);
|
||||||
|
add(edition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -87,7 +112,12 @@ public class PublicationWithPublisherPropertyForm
|
||||||
|
|
||||||
data.put(ITEM_SEARCH, publication.getPublisher());
|
data.put(ITEM_SEARCH, publication.getPublisher());
|
||||||
data.put(PublicationWithPublisher.ISBN, publication.getISBN());
|
data.put(PublicationWithPublisher.ISBN, publication.getISBN());
|
||||||
data.put(PublicationWithPublisher.URL, publication.getUrl());
|
data.put(PublicationWithPublisher.VOLUME, publication.getVolume());
|
||||||
|
data.put(PublicationWithPublisher.NUMBER_OF_VOLUMES,
|
||||||
|
publication.getNumberOfVolumes());
|
||||||
|
data.put(PublicationWithPublisher.NUMBER_OF_PAGES,
|
||||||
|
publication.getNumberOfPages());
|
||||||
|
data.put(PublicationWithPublisher.EDITION, publication.getEdition());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +134,15 @@ public class PublicationWithPublisherPropertyForm
|
||||||
isSelected(fse.getPageState())) {
|
isSelected(fse.getPageState())) {
|
||||||
publication.setPublisher((Publisher) data.get(ITEM_SEARCH));
|
publication.setPublisher((Publisher) data.get(ITEM_SEARCH));
|
||||||
publication.setISBN((String) data.get(PublicationWithPublisher.ISBN));
|
publication.setISBN((String) data.get(PublicationWithPublisher.ISBN));
|
||||||
publication.setUrl((String) data.get(PublicationWithPublisher.URL));
|
|
||||||
|
publication.setVolume((Integer) data.get(
|
||||||
|
PublicationWithPublisher.VOLUME));
|
||||||
|
publication.setNumberOfVolumes((Integer) data.get(
|
||||||
|
PublicationWithPublisher.NUMBER_OF_VOLUMES));
|
||||||
|
publication.setNumberOfPages((Integer) data.get(
|
||||||
|
PublicationWithPublisher.NUMBER_OF_PAGES));
|
||||||
|
publication.setEdition((String) data.get(
|
||||||
|
PublicationWithPublisher.EDITION));
|
||||||
|
|
||||||
publication.save();
|
publication.save();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,33 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ReviewPropertiesStep extends PublicationPropertiesStep {
|
public class ReviewPropertiesStep extends ArticleInJournalPropertiesStep {
|
||||||
|
|
||||||
public ReviewPropertiesStep(ItemSelectionModel itemModel,
|
public ReviewPropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getReviewPropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -37,7 +47,7 @@ public class ReviewPropertiesStep extends PublicationPropertiesStep {
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getReviewPropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import java.util.GregorianCalendar;
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ReviewPropertyForm
|
public class ReviewPropertyForm
|
||||||
extends PublicationPropertyForm
|
extends ArticleInJournalPropertyForm
|
||||||
implements FormProcessListener,
|
implements FormProcessListener,
|
||||||
FormInitListener,
|
FormInitListener,
|
||||||
FormSubmissionListener {
|
FormSubmissionListener {
|
||||||
|
|
@ -45,60 +45,6 @@ public class ReviewPropertyForm
|
||||||
@Override
|
@Override
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.journal").localize()));
|
|
||||||
ParameterModel journalParam = new StringParameter(Review.JOURNAL);
|
|
||||||
TextField journal = new TextField(journalParam);
|
|
||||||
add(journal);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.volume").localize()));
|
|
||||||
ParameterModel volumeParam = new IntegerParameter(Review.VOLUME);
|
|
||||||
TextField volume = new TextField(volumeParam);
|
|
||||||
add(volume);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.issue").localize()));
|
|
||||||
ParameterModel issueParam = new StringParameter(Review.ISSUE);
|
|
||||||
TextField issue = new TextField(issueParam);
|
|
||||||
add(issue);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.pagesFrom").localize()));
|
|
||||||
ParameterModel pagesFromParam = new IntegerParameter(Review.PAGES_FROM);
|
|
||||||
TextField pagesFrom = new TextField(pagesFromParam);
|
|
||||||
add(pagesFrom);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publcations.ui.review.pagesTo").localize()));
|
|
||||||
ParameterModel pagesToParam = new IntegerParameter(Review.PAGES_TO);
|
|
||||||
TextField pagesTo = new TextField(pagesToParam);
|
|
||||||
add(pagesTo);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.issn").localize()));
|
|
||||||
ParameterModel issnParam = new StringParameter(Review.ISSN);
|
|
||||||
TextField issn = new TextField(issnParam);
|
|
||||||
add(issn);
|
|
||||||
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.url").localize()));
|
|
||||||
ParameterModel urlParam = new StringParameter(Review.URL);
|
|
||||||
TextField url = new TextField(urlParam);
|
|
||||||
add(url);
|
|
||||||
|
|
||||||
Calendar today = new GregorianCalendar();
|
|
||||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
|
||||||
"publications.ui.review.publicationdate").
|
|
||||||
localize()));
|
|
||||||
ParameterModel pubDateParam =
|
|
||||||
new DateParameter(Review.PUBLICATION_DATE);
|
|
||||||
com.arsdigita.bebop.form.Date pubDate =
|
|
||||||
new com.arsdigita.bebop.form.Date(
|
|
||||||
pubDateParam);
|
|
||||||
pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2);
|
|
||||||
add(pubDate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -107,15 +53,6 @@ public class ReviewPropertyForm
|
||||||
|
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
Review review = (Review) initBasicWidgets(fse);
|
Review review = (Review) initBasicWidgets(fse);
|
||||||
|
|
||||||
data.put(Review.JOURNAL, review.getJournal());
|
|
||||||
data.put(Review.VOLUME, review.getVolume());
|
|
||||||
data.put(Review.ISSUE, review.getIssue());
|
|
||||||
data.put(Review.PAGES_FROM, review.getPagesFrom());
|
|
||||||
data.put(Review.PAGES_TO, review.getPagesTo());
|
|
||||||
data.put(Review.ISSN, review.getISSN());
|
|
||||||
data.put(Review.URL, review.getUrl());
|
|
||||||
data.put(Review.PUBLICATION_DATE, review.getPublicationDate());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -124,19 +61,5 @@ public class ReviewPropertyForm
|
||||||
|
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
Review review = (Review) processBasicWidgets(fse);
|
Review review = (Review) processBasicWidgets(fse);
|
||||||
|
|
||||||
if ((review != null) && getSaveCancelSection().getSaveButton().
|
|
||||||
isSelected(fse.getPageState())) {
|
|
||||||
review.setJournal((String) data.get(Review.JOURNAL));
|
|
||||||
review.setVolume((Integer) data.get(Review.VOLUME));
|
|
||||||
review.setIssue((String) data.get(Review.ISSUE));
|
|
||||||
review.setPagesFrom((Integer) data.get(Review.PAGES_FROM));
|
|
||||||
review.setPagesTo((Integer) data.get(Review.PAGES_TO));
|
|
||||||
review.setISSN((String) data.get(Review.ISSN));
|
|
||||||
review.setUrl((String) data.get(Review.URL));
|
|
||||||
review.setPublicationDate((Date) data.get(Review.PUBLICATION_DATE));
|
|
||||||
|
|
||||||
review.save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.UnPublished;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,6 +22,32 @@ public class UnPublishedPropertiesStep extends PublicationPropertiesStep {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getUnPublishedPropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) PublicationPropertiesStep.
|
||||||
|
getPublicationPropertySheet(itemModel);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.unpublished.place"),
|
||||||
|
UnPublished.PLACE);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.unpublished.organization"),
|
||||||
|
UnPublished.ORGANIZATION);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.unpublished.number"),
|
||||||
|
UnPublished.NUMBER);
|
||||||
|
|
||||||
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
"publications.ui.unpublished.number_of_pages"),
|
||||||
|
UnPublished.NUMBER_OF_PAGES);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -38,7 +67,7 @@ public class UnPublishedPropertiesStep extends PublicationPropertiesStep {
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getUnPublishedPropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,6 +21,14 @@ public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Component getWorkingPaperPropertySheet(
|
||||||
|
ItemSelectionModel itemModel) {
|
||||||
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet)
|
||||||
|
getUnPublishedPropertySheet(itemModel);
|
||||||
|
|
||||||
|
return sheet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addBasicProperties(ItemSelectionModel itemModel,
|
protected void addBasicProperties(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
@ -38,7 +48,7 @@ public class WorkingPaperPropertiesStep extends UnPublishedPropertiesStep {
|
||||||
getCancelButton());
|
getCancelButton());
|
||||||
|
|
||||||
basicProperties.setDisplayComponent(
|
basicProperties.setDisplayComponent(
|
||||||
getPublicationPropertySheet(itemModel));
|
getWorkingPaperPropertySheet(itemModel));
|
||||||
|
|
||||||
getSegmentedPanel().addSegment(
|
getSegmentedPanel().addSegment(
|
||||||
new Label((String) PublicationGlobalizationUtil.globalize(
|
new Label((String) PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE stylesheet [
|
||||||
|
<!ENTITY nbsp " " ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
|
||||||
|
]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Proceedings']" mode="cms:CT_graphics"
|
||||||
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_Proceedings">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.Proceedings']" mode="cms:CT_text"
|
||||||
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_Proceedings">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||||
|
name="ccm-sci-types-organization"
|
||||||
|
prettyName="OpenCCM Content Types"
|
||||||
|
version="6.6.0"
|
||||||
|
release="1"
|
||||||
|
webapp="ROOT">
|
||||||
|
<ccm:dependencies>
|
||||||
|
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||||
|
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||||
|
</ccm:dependencies>
|
||||||
|
<ccm:directories>
|
||||||
|
<ccm:directory name="pdl"/>
|
||||||
|
<ccm:directory name="sql"/>
|
||||||
|
<ccm:directory name="src"/>
|
||||||
|
</ccm:directories>
|
||||||
|
<ccm:contacts>
|
||||||
|
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
|
||||||
|
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
|
||||||
|
</ccm:contacts>
|
||||||
|
<ccm:description>
|
||||||
|
Content types for scientific organizations
|
||||||
|
</ccm:description>
|
||||||
|
</ccm:application>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
model com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.ACSObject;
|
||||||
|
import com.arsdigita.cms.*;
|
||||||
|
|
||||||
|
object type SciDepartment extends GenericOrganizationalUnit {
|
||||||
|
String[0..1] description = ct_scidepartments.description;
|
||||||
|
|
||||||
|
reference key ( ct_scidepartments.organization_id );
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
model com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.ACSObject;
|
||||||
|
import com.arsdigita.cms.*;
|
||||||
|
|
||||||
|
object type SciOrganization extends GenericOrganizationalUnit {
|
||||||
|
String[0..1] description = ct_sciorganizations.description;
|
||||||
|
|
||||||
|
reference key ( ct_sciorganizations.organization_id );
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
model com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.ACSObject;
|
||||||
|
import com.arsdigita.cms.*;
|
||||||
|
|
||||||
|
object type SciProject extends GenericOrganizationalUnit {
|
||||||
|
|
||||||
|
Date[0..1] projectbegin = ct_sciprojects.projectbegin DATE;
|
||||||
|
Date[0..1] projectend = ct_sciprojects.projectend DATE;
|
||||||
|
String[0..1] description = ct_sciprojects.description VARCHAR(4096);
|
||||||
|
String[0..1] funding = ct_sciprojects.funding VARCHAR(2048);
|
||||||
|
|
||||||
|
reference key ( ct_sciprojects.organization_id );
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
begin;
|
||||||
|
\i ddl/postgres/create.sql
|
||||||
|
\i ddl/postgres/deferred.sql
|
||||||
|
end;
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||||
|
|
||||||
|
<ctd:content-type
|
||||||
|
label="SciDepartment"
|
||||||
|
description="Base type for publications"
|
||||||
|
objectType="com.arsdigita.cms.contenttypes.SciDepartment"
|
||||||
|
classname="com.arsdigita.cms.contenttypes.SciDepartment"
|
||||||
|
isInternal="yes">
|
||||||
|
|
||||||
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
|
<ctd:authoring-step
|
||||||
|
labelKey="publications.ui.publication_properties.title"
|
||||||
|
labelBundle="com.arsdigita.cms.contenttypes.ui.SciDepartmentResources"
|
||||||
|
descriptionKey="publications.ui.publication_properties.title.description"
|
||||||
|
descriptionBundle="com.arsdigita.cms.contenttypes.ui.SciDepartmentResources"
|
||||||
|
component="com.arsdigita.cms.contenttypes.ui.SciDepartmentPropertiesStep"
|
||||||
|
ordering="1"/>
|
||||||
|
|
||||||
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
||||||
|
</ctd:authoring-kit>
|
||||||
|
|
||||||
|
</ctd:content-type>
|
||||||
|
|
||||||
|
|
||||||
|
</ctd:content-types>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||||
|
|
||||||
|
<ctd:content-type
|
||||||
|
label="SciOrganization"
|
||||||
|
description="Base type for publications"
|
||||||
|
objectType="com.arsdigita.cms.contenttypes.SciOrganization"
|
||||||
|
classname="com.arsdigita.cms.contenttypes.SciOrganization"
|
||||||
|
isInternal="yes">
|
||||||
|
|
||||||
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
|
<ctd:authoring-step
|
||||||
|
labelKey="publications.ui.publication_properties.title"
|
||||||
|
labelBundle="com.arsdigita.cms.contenttypes.ui.SciOrganizationResources"
|
||||||
|
descriptionKey="publications.ui.publication_properties.title.description"
|
||||||
|
descriptionBundle="com.arsdigita.cms.contenttypes.ui.SciOrganizationResources"
|
||||||
|
component="com.arsdigita.cms.contenttypes.ui.SciOrganizationPropertiesStep"
|
||||||
|
ordering="1"/>
|
||||||
|
|
||||||
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
||||||
|
</ctd:authoring-kit>
|
||||||
|
|
||||||
|
</ctd:content-type>
|
||||||
|
|
||||||
|
|
||||||
|
</ctd:content-types>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||||
|
|
||||||
|
<ctd:content-type
|
||||||
|
label="SciProject"
|
||||||
|
description="Base type for publications"
|
||||||
|
objectType="com.arsdigita.cms.contenttypes.SciProject"
|
||||||
|
classname="com.arsdigita.cms.contenttypes.SciProject"
|
||||||
|
isInternal="yes">
|
||||||
|
|
||||||
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
|
<ctd:authoring-step
|
||||||
|
labelKey="publications.ui.publication_properties.title"
|
||||||
|
labelBundle="com.arsdigita.cms.contenttypes.ui.SciProjectResources"
|
||||||
|
descriptionKey="publications.ui.publication_properties.title.description"
|
||||||
|
descriptionBundle="com.arsdigita.cms.contenttypes.ui.SciProjectResources"
|
||||||
|
component="com.arsdigita.cms.contenttypes.ui.SciProjectPropertiesStep"
|
||||||
|
ordering="1"/>
|
||||||
|
|
||||||
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
||||||
|
</ctd:authoring-kit>
|
||||||
|
|
||||||
|
</ctd:content-type>
|
||||||
|
|
||||||
|
|
||||||
|
</ctd:content-types>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xrd:adapters
|
||||||
|
xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
||||||
|
<!--
|
||||||
|
Extend adapter for ContentItemPanel to also output the associated objects.
|
||||||
|
The default properties for BaseContact are left as is and are inherited from ContentPage
|
||||||
|
-->
|
||||||
|
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
|
||||||
|
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.SciDepartment" extends="com.arsdigita.cms.ContentPage">
|
||||||
|
<xrd:associations rule="include">
|
||||||
|
<xrd:property name="/object/addendum"/>
|
||||||
|
<xrd:property name="/object/contacts"/>
|
||||||
|
<xrd:property name="/object/orgaunit_children"/>
|
||||||
|
<xrd:property name="/object/persons"/>
|
||||||
|
</xrd:associations>
|
||||||
|
</xrd:adapter>
|
||||||
|
</xrd:context>
|
||||||
|
</xrd:adapters>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xrd:adapters
|
||||||
|
xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
||||||
|
<!--
|
||||||
|
Extend adapter for ContentItemPanel to also output the associated objects.
|
||||||
|
The default properties for BaseContact are left as is and are inherited from ContentPage
|
||||||
|
-->
|
||||||
|
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
|
||||||
|
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.SciOrganization" extends="com.arsdigita.cms.ContentPage">
|
||||||
|
<xrd:associations rule="include">
|
||||||
|
<xrd:property name="/object/addendum"/>
|
||||||
|
<xrd:property name="/object/contacts"/>
|
||||||
|
<xrd:property name="/object/orgaunit_children"/>
|
||||||
|
<xrd:property name="/object/persons"/>
|
||||||
|
</xrd:associations>
|
||||||
|
</xrd:adapter>
|
||||||
|
</xrd:context>
|
||||||
|
</xrd:adapters>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xrd:adapters
|
||||||
|
xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
||||||
|
<!--
|
||||||
|
Extend adapter for ContentItemPanel to also output the associated objects.
|
||||||
|
The default properties for BaseContact are left as is and are inherited from ContentPage
|
||||||
|
-->
|
||||||
|
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
|
||||||
|
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.SciProject" extends="com.arsdigita.cms.ContentPage">
|
||||||
|
<xrd:associations rule="include">
|
||||||
|
<xrd:property name="/object/addendum"/>
|
||||||
|
<xrd:property name="/object/contacts"/>
|
||||||
|
<xrd:property name="/object/orgaunit_children"/>
|
||||||
|
<xrd:property name="/object/persons"/>
|
||||||
|
</xrd:associations>
|
||||||
|
</xrd:adapter>
|
||||||
|
</xrd:context>
|
||||||
|
</xrd:adapters>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<registry>
|
||||||
|
<!-- <config class="com.arsdigita.cms.SciOrganizationConfig" storage="ccm-sci-types-organization/sciorganizations.properties"/> -->
|
||||||
|
</registry>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<load>
|
||||||
|
<requires>
|
||||||
|
<table name="inits"/>
|
||||||
|
<table name="acs_objects"/>
|
||||||
|
<table name="cms_items"/>
|
||||||
|
<initializer class="com.arsdigita.cms.Initializer"/>
|
||||||
|
</requires>
|
||||||
|
<provides>
|
||||||
|
<table name="ct_sciorganizatations"/>
|
||||||
|
<table name="ct_scidepartments"/>
|
||||||
|
<table name="ct_sciprojects"/>
|
||||||
|
<initializer name="com.arsdigita.cms.contenttypes.SciOrganizationInitializer"/>
|
||||||
|
<initializer name="com.arsdigita.cms.contenttypes.SciDepartmentInitializer"/>
|
||||||
|
<initializer name="com.arsdigita.cms.contenttypes.SciProjectInitializer"/>
|
||||||
|
</provides>
|
||||||
|
<scripts>
|
||||||
|
<schema directory="ccm-sci-types.organization"/>
|
||||||
|
<data class="com.arsdigita.cms.contenttypes.SciOrganizationLoader"/>
|
||||||
|
<data class="com.arsdigita.cms.contenttypes.SciDepartmentLoader"/>
|
||||||
|
<data class="com.arsdigita.cms.contenttypes.SciProjectLoader"/>
|
||||||
|
</scripts>
|
||||||
|
</load>
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.OID;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciDepartment extends GenericOrganizationalUnit {
|
||||||
|
|
||||||
|
public static final String DESCRIPTION = "description";
|
||||||
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
"com.arsdigita.cms.contenttypes.SciDepartment";
|
||||||
|
|
||||||
|
public SciDepartment() {
|
||||||
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciDepartment(BigDecimal id) throws DataObjectNotFoundException {
|
||||||
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciDepartment(OID oid) throws DataObjectNotFoundException {
|
||||||
|
super(oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciDepartment(DataObject obj) {
|
||||||
|
super(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciDepartment(String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return (String) get(DESCRIPTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
set(DESCRIPTION, description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciDepartmentInitializer extends ContentTypeInitializer {
|
||||||
|
|
||||||
|
private static final Logger s_log = Logger.getLogger(
|
||||||
|
SciDepartmentInitializer.class);
|
||||||
|
|
||||||
|
public SciDepartmentInitializer() {
|
||||||
|
super("empty.pdl.mf", SciDepartment.BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getStylesheets() {
|
||||||
|
return new String[]{
|
||||||
|
"/static/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xsl"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTraversalXML() {
|
||||||
|
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciDepartment.xml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciDepartmentLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
|
private static final String[] TYPES = {
|
||||||
|
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml"
|
||||||
|
};
|
||||||
|
|
||||||
|
public String[] getTypes() {
|
||||||
|
return TYPES;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.OID;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciOrganization extends GenericOrganizationalUnit {
|
||||||
|
|
||||||
|
public static final String DESCRIPTION = "description";
|
||||||
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
"com.arsdigita.cms.contenttypes.SciOrganization";
|
||||||
|
|
||||||
|
public SciOrganization() {
|
||||||
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciOrganization(BigDecimal id) throws DataObjectNotFoundException {
|
||||||
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciOrganization(OID oid) throws DataObjectNotFoundException {
|
||||||
|
super(oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciOrganization(DataObject obj) {
|
||||||
|
super(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciOrganization(String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return (String) get(DESCRIPTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
set(DESCRIPTION, description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciOrganizationInitializer extends ContentTypeInitializer {
|
||||||
|
|
||||||
|
private static final Logger s_log = Logger.getLogger(
|
||||||
|
SciOrganizationInitializer.class);
|
||||||
|
|
||||||
|
public SciOrganizationInitializer() {
|
||||||
|
super("ccm-sci-types-organization.odl.mf",
|
||||||
|
SciOrganization.BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getStylesheets() {
|
||||||
|
return new String[]{
|
||||||
|
"/static/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xsl"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTraversalXML() {
|
||||||
|
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciOrganizationLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
|
private static final String[] TYPES = {
|
||||||
|
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciOrganization.xml"
|
||||||
|
};
|
||||||
|
|
||||||
|
public String[] getTypes() {
|
||||||
|
return TYPES;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
import com.arsdigita.persistence.OID;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jens Pelzetter
|
||||||
|
*/
|
||||||
|
public class SciProject extends GenericOrganizationalUnit{
|
||||||
|
|
||||||
|
public static final String BEGIN = "projectbegin";
|
||||||
|
public static final String END = "projectend";
|
||||||
|
public static final String DESCRIPTION = "description";
|
||||||
|
public static final String FUNDING = "funding";
|
||||||
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
"com.arsdigita.cms.contenttypes.SciProject";
|
||||||
|
|
||||||
|
public SciProject() {
|
||||||
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciProject(BigDecimal id ) throws DataObjectNotFoundException{
|
||||||
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciProject(OID oid) {
|
||||||
|
super(oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciProject(DataObject obj) {
|
||||||
|
super(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SciProject(String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getBegin() {
|
||||||
|
return (Date) get(BEGIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBegin(Date begin) {
|
||||||
|
set(BEGIN, begin);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEnd() {
|
||||||
|
return (Date) get(END);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnd(Date end) {
|
||||||
|
set(END, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return (String) get(DESCRIPTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
set(DESCRIPTION, description);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFunding() {
|
||||||
|
return (String) get(FUNDING);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFunding(String funding) {
|
||||||
|
set(FUNDING, funding);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -6,24 +6,24 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ProjectInitializer extends ContentTypeInitializer {
|
public class SciProjectInitializer extends ContentTypeInitializer {
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(
|
private static final Logger s_log = Logger.getLogger(
|
||||||
ProjectInitializer.class);
|
SciProjectInitializer.class);
|
||||||
|
|
||||||
public ProjectInitializer() {
|
public SciProjectInitializer() {
|
||||||
super("ccm-cms-types-project.pdl.mf", Project.BASE_DATA_OBJECT_TYPE);
|
super("empty.pdl.mf", SciProject.BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getStylesheets() {
|
public String[] getStylesheets() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"/static/content-types/com/arsdigita/cms/contenttypes/Project.xsl"
|
"/static/content-types/com/arsdigita/cms/contenttypes/SciProject.xsl"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTraversalXML() {
|
public String getTraversalXML() {
|
||||||
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Project.xml";
|
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciProject.xml";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,10 +9,10 @@ package com.arsdigita.cms.contenttypes;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ProjectLoader extends AbstractContentTypeLoader {
|
public class SciProjectLoader extends AbstractContentTypeLoader {
|
||||||
|
|
||||||
private static final String[] TYPES = {
|
private static final String[] TYPES = {
|
||||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Project.xml"
|
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml"
|
||||||
};
|
};
|
||||||
|
|
||||||
public String[] getTypes() {
|
public String[] getTypes() {
|
||||||
|
|
@ -11,10 +11,10 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ProjectPropertiesStep
|
public class SciProjectPropertiesStep
|
||||||
extends GenericOrganizationalUnitPropertiesStep {
|
extends GenericOrganizationalUnitPropertiesStep {
|
||||||
|
|
||||||
public ProjectPropertiesStep(ItemSelectionModel itemModel,
|
public SciProjectPropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ public class ProjectPropertiesStep
|
||||||
addStep(new GenericOrganizationalUnitContactPropertiesStep(itemModel,
|
addStep(new GenericOrganizationalUnitContactPropertiesStep(itemModel,
|
||||||
parent),
|
parent),
|
||||||
"cms.contenttypes.ui.orgaunit.contact");
|
"cms.contenttypes.ui.orgaunit.contact");
|
||||||
addStep(new ProjectSubprojectPropertiesStep(itemModel,
|
addStep(new SciProjectSubprojectPropertiesStep(itemModel,
|
||||||
parent),
|
parent),
|
||||||
"cms.contenttypes.ui.project.subprojects");
|
"cms.contenttypes.ui.project.subprojects");
|
||||||
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
|
addStep(new GenericOrganizationalUnitPersonPropertiesStep(itemModel,
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.Project;
|
import com.arsdigita.cms.contenttypes.SciProject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ProjectSubprojectAddForm
|
public class SciProjectSubprojectAddForm
|
||||||
extends GenericOrganizationalUnitChildAddForm {
|
extends GenericOrganizationalUnitChildAddForm {
|
||||||
|
|
||||||
public ProjectSubprojectAddForm(ItemSelectionModel itemModel) {
|
public SciProjectSubprojectAddForm(ItemSelectionModel itemModel) {
|
||||||
super("SubprojectAddForm", itemModel);
|
super("SubprojectAddForm", itemModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getChildDataObjectType() {
|
protected String getChildDataObjectType() {
|
||||||
return Project.BASE_DATA_OBJECT_TYPE;
|
return SciProject.BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -16,24 +16,24 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class ProjectSubprojectPropertiesStep extends SimpleEditStep {
|
public class SciProjectSubprojectPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
private final static Logger s_log = Logger.getLogger(
|
private final static Logger s_log = Logger.getLogger(
|
||||||
ProjectSubprojectPropertiesStep.class);
|
SciProjectSubprojectPropertiesStep.class);
|
||||||
private String ADD_CHILD_SHEET_NAME = "addChild";
|
private String ADD_CHILD_SHEET_NAME = "addChild";
|
||||||
|
|
||||||
public ProjectSubprojectPropertiesStep(ItemSelectionModel itemModel,
|
public SciProjectSubprojectPropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
this(itemModel, parent, null);
|
this(itemModel, parent, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProjectSubprojectPropertiesStep(
|
public SciProjectSubprojectPropertiesStep(
|
||||||
ItemSelectionModel itemModel,
|
ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent,
|
AuthoringKitWizard parent,
|
||||||
String prefix) {
|
String prefix) {
|
||||||
super(itemModel, parent, prefix);
|
super(itemModel, parent, prefix);
|
||||||
|
|
||||||
BasicItemForm addChildSheet = new ProjectSubprojectAddForm(itemModel);
|
BasicItemForm addChildSheet = new SciProjectSubprojectAddForm(itemModel);
|
||||||
add(ADD_CHILD_SHEET_NAME,
|
add(ADD_CHILD_SHEET_NAME,
|
||||||
(String) ContenttypesGlobalizationUtil.globalize(
|
(String) ContenttypesGlobalizationUtil.globalize(
|
||||||
"cms.contenttypes.ui.genericorgaunit.add_child").localize(),
|
"cms.contenttypes.ui.genericorgaunit.add_child").localize(),
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE stylesheet [
|
||||||
|
<!ENTITY nbsp " " ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
|
||||||
|
]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciDepartment']" mode="cms:CT_graphics"
|
||||||
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_SciDepartment">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciDepartment']" mode="cms:CT_text"
|
||||||
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_SciDepartment">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE stylesheet [
|
||||||
|
<!ENTITY nbsp " " ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
|
||||||
|
]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciOrganization']" mode="cms:CT_graphics"
|
||||||
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_SciOrganization">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciOrganization']" mode="cms:CT_text"
|
||||||
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_SciOrganization">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE stylesheet [
|
||||||
|
<!ENTITY nbsp " " ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
|
||||||
|
]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciProject']" mode="cms:CT_graphics"
|
||||||
|
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_SciProject">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.SciProject']" mode="cms:CT_text"
|
||||||
|
name="cms:CT_text_com_arsdigita_cms_contenttypes_SciProject">
|
||||||
|
<p><xsl:value-of select="./name"/></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||||
name="ccm-cms-types-project"
|
name="ccm-sci-types-sciproject"
|
||||||
prettyName="OpenCCM Content Types"
|
prettyName="OpenCCM Content Types"
|
||||||
version="6.6.0"
|
version="6.6.0"
|
||||||
release="1"
|
release="1"
|
||||||
|
|
@ -19,6 +19,6 @@
|
||||||
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
|
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
|
||||||
</ccm:contacts>
|
</ccm:contacts>
|
||||||
<ccm:description>
|
<ccm:description>
|
||||||
The Project Content Type for OpenCCM.
|
A project type for scientific projects.
|
||||||
</ccm:description>
|
</ccm:description>
|
||||||
</ccm:application>
|
</ccm:application>
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
model com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.ACSObject;
|
||||||
|
import com.arsdigita.cms.*;
|
||||||
|
|
||||||
|
object type SciProject extends GenericOrganizationalUnit {
|
||||||
|
|
||||||
|
Date[0..1] projectbegin = ct_sciprojects.projectbegin DATE;
|
||||||
|
Date[0..1] projectend = ct_sciprojects.projectend DATE;
|
||||||
|
String[0..1] description = ct_sciprojects.description VARCHAR(4096);
|
||||||
|
String[0..1] funding = ct_sciprojects.funding VARCHAR(2048);
|
||||||
|
|
||||||
|
reference key ( ct_sciprojects.project_id );
|
||||||
|
}
|
||||||
|
|
@ -5,19 +5,19 @@
|
||||||
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||||
|
|
||||||
<ctd:content-type
|
<ctd:content-type
|
||||||
label="Project"
|
label="Scientific Project"
|
||||||
description="The content type Oroject."
|
description="The content type SciProject."
|
||||||
objectType="com.arsdigita.cms.contenttypes.Project"
|
objectType="com.arsdigita.cms.contenttypes.SciProject"
|
||||||
classname="com.arsdigita.cms.contenttypes.Project">
|
classname="com.arsdigita.cms.contenttypes.SciProject">
|
||||||
|
|
||||||
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
<ctd:authoring-step
|
<ctd:authoring-step
|
||||||
labelKey="cms.contenttypes.project.basic_properties.title"
|
labelKey="cms.contenttypes.sciproject.basic_properties.title"
|
||||||
labelBundle="cms.contenttypes.cms.ui.CMSResources"
|
labelBundle="cms.contenttypes.cms.ui.CMSResources"
|
||||||
descriptionKey="cms.contenttypes.project.basic_properties.description"
|
descriptionKey="cms.contenttypes.sciproject.basic_properties.description"
|
||||||
descriptionBundle="com.arsdigita.cms.ui.CMSResources"
|
descriptionBundle="com.arsdigita.cms.ui.CMSResources"
|
||||||
component="com.arsdigita.cms.contenttypes.ui.ProjectPropertiesStep"
|
component="com.arsdigita.cms.contenttypes.ui.SciProjectPropertiesStep"
|
||||||
ordering="1"/>
|
ordering="1"/>
|
||||||
|
|
||||||
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue