Verschiedene Korrekturen an den neuen Sci-Contenttypen und den dazugehörigen AuthoringSteps
git-svn-id: https://svn.libreccm.org/ccm/trunk@1255 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
299dc8d746
commit
b38c471a81
|
|
@ -77,4 +77,10 @@ public interface GenericOrgaUnitSubordinateOrgaUnitsTableCustomizer {
|
|||
* is filtered using the return value.
|
||||
*/
|
||||
String getAssocType();
|
||||
|
||||
/**
|
||||
* Content type to restrict to item shown to. May be {@code null}.
|
||||
* @return
|
||||
*/
|
||||
String getContentType();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,4 +72,10 @@ public interface GenericOrgaUnitSuperiorOrgaUnitsTableCustomizer {
|
|||
*/
|
||||
String getAssocType();
|
||||
|
||||
/**
|
||||
* Content type to restrict to item shown to. May be {@code null}.
|
||||
* @return
|
||||
*/
|
||||
String getContentType();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,12 @@ public class GenericOrganizationalUnitSubordinateOrgaUnitsTable
|
|||
"link.assocType = '%s'",
|
||||
customizer.getAssocType()));
|
||||
}
|
||||
if ((customizer.getContentType() != null)
|
||||
&& !(customizer.getContentType().isEmpty())) {
|
||||
subordinateOrgaUnits.addFilter(String.format("objectType = '%s'",
|
||||
customizer.
|
||||
getContentType()));
|
||||
}
|
||||
this.customizer = customizer;
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +319,7 @@ public class GenericOrganizationalUnitSubordinateOrgaUnitsTable
|
|||
state);
|
||||
final GenericOrganizationalUnit subOrgaUnit =
|
||||
new GenericOrganizationalUnit(
|
||||
new BigDecimal((String)event.getRowKey()));
|
||||
new BigDecimal((String) event.getRowKey()));
|
||||
final GenericOrganizationalUnitSubordinateCollection subOrgaUnits =
|
||||
orgaunit.
|
||||
getSubordinateOrgaUnits();
|
||||
|
|
|
|||
|
|
@ -107,10 +107,17 @@ public class GenericOrganizationalUnitSuperiorOrgaUnitsTable extends Table {
|
|||
superiorOrgaUnits = orgaunit.getSuperiorOrgaUnits();
|
||||
if ((customizer.getAssocType() != null)
|
||||
&& !(customizer.getAssocType().isEmpty())) {
|
||||
superiorOrgaUnits.addFilter(String.format("link.assocType = '%s'",
|
||||
superiorOrgaUnits.addFilter(String.format(
|
||||
"link.assocType = '%s'",
|
||||
customizer.
|
||||
getAssocType()));
|
||||
}
|
||||
if ((customizer.getContentType() != null)
|
||||
&& !(customizer.getContentType().isEmpty())) {
|
||||
superiorOrgaUnits.addFilter(String.format("objectType = '%s'",
|
||||
customizer.
|
||||
getContentType()));
|
||||
}
|
||||
this.customizer = customizer;
|
||||
}
|
||||
|
||||
|
|
@ -297,7 +304,7 @@ public class GenericOrganizationalUnitSuperiorOrgaUnitsTable extends Table {
|
|||
getSelectedObject(state);
|
||||
final GenericOrganizationalUnit supOrgaUnit =
|
||||
(GenericOrganizationalUnit) DomainObjectFactory.
|
||||
newInstance(OID.valueOf((String)event.getRowKey()));
|
||||
newInstance(OID.valueOf((String) event.getRowKey()));
|
||||
final GenericOrganizationalUnitSuperiorCollection supOrgaUnits =
|
||||
orgaunit.
|
||||
getSuperiorOrgaUnits();
|
||||
|
|
@ -307,11 +314,11 @@ public class GenericOrganizationalUnitSuperiorOrgaUnitsTable extends Table {
|
|||
final String headerKey = column.getHeaderKey().toString();
|
||||
if (TABLE_COL_EDIT.equals(headerKey)) {
|
||||
//Nothing now
|
||||
} else if(TABLE_COL_DEL.equals(headerKey)) {
|
||||
} else if (TABLE_COL_DEL.equals(headerKey)) {
|
||||
orgaunit.removeSuperiorOrgaUnit(supOrgaUnit);
|
||||
} else if (TABLE_COL_UP.equals(headerKey)) {
|
||||
supOrgaUnits.swapWithPrevious(supOrgaUnit);
|
||||
} else if(TABLE_COL_DOWN.equals(headerKey)) {
|
||||
} else if (TABLE_COL_DOWN.equals(headerKey)) {
|
||||
supOrgaUnits.swapWithNext(supOrgaUnit);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import com.arsdigita.cms.contenttypes.ui.PublicationGenericOrganizationalUnitsSt
|
|||
import com.arsdigita.cms.contenttypes.ui.PublicationGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.runtime.DomainInitEvent;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -32,6 +33,8 @@ import com.arsdigita.runtime.DomainInitEvent;
|
|||
*/
|
||||
public class PublicationInitializer extends ContentTypeInitializer {
|
||||
|
||||
private final Logger logger = Logger.getLogger(PublicationInitializer.class);
|
||||
|
||||
public PublicationInitializer() {
|
||||
super("ccm-sci-publications.pdl.mf", Publication.BASE_DATA_OBJECT_TYPE);
|
||||
}
|
||||
|
|
@ -53,9 +56,17 @@ public class PublicationInitializer extends ContentTypeInitializer {
|
|||
10);
|
||||
}
|
||||
|
||||
final String attacToStr = config.getAttachPublicationsStepTo();
|
||||
final String[] attachToCts = attacToStr.split(";");
|
||||
final String attachToStr = config.getAttachPublicationsStepTo();
|
||||
final String[] attachToCts = attachToStr.split(";");
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info(String.format("Attaching publications step to: %s",
|
||||
attachToStr));
|
||||
}
|
||||
for (String attachTo : attachToCts) {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info(String.format("Attaching publications step to: '%s'",
|
||||
attachTo));
|
||||
}
|
||||
AuthoringKitWizard.registerAssetStep(
|
||||
attachTo,
|
||||
GenericOrganizationalUnitPublicationsStep.class,
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ public class GenericOrganizationalUnitPublicationAddForm
|
|||
public void addWidgets() {
|
||||
add(new Label((String) PublicationGlobalizationUtil.globalize(
|
||||
"genericorganizationalunit.ui.publication.select").localize()));
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.
|
||||
findByAssociatedObjectType(Publication.class.getName()));
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH,
|
||||
ContentType.findByAssociatedObjectType(Publication.class.
|
||||
getName()));
|
||||
add(itemSearch);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ public class GenericOrganizationalUnitPublicationsTable
|
|||
columnModel.add(new TableColumn(
|
||||
0,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"genericorganizationalunit.ui.publications.columns.name"),
|
||||
"genericorganizationalunit.ui.publications.columns.name").localize(),
|
||||
TABLE_COL_EDIT));
|
||||
columnModel.add(new TableColumn(
|
||||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"genericorganizationalunit.ui.publications.columns.remove"),
|
||||
"genericorganizationalunit.ui.publications.columns.remove").localize(),
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new ModelBuilder(itemModel));
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ public class PublicationGenericOrganizationalUnitAddForm
|
|||
ITEM_SEARCH);
|
||||
orgaunit = (GenericOrganizationalUnit) orgaunit.getContentBundle().
|
||||
getInstance(publication.getLanguage(), true);
|
||||
|
||||
publication.addOrganizationalUnit(orgaunit);
|
||||
}
|
||||
|
||||
init(fse);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public class PublicationGenericOrganizationalUnitsTable extends Table {
|
|||
return orgaunits.getTitle();
|
||||
case 1:
|
||||
return PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.orgaunits.remove");
|
||||
"publications.ui.orgaunits.remove").localize();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -381,3 +381,7 @@ genericorganizationalunit.ui.publications.title=List of publications
|
|||
publications.ui.internetarticle.url=URL
|
||||
publications.ui.internetarticle.urn=URN
|
||||
publications.ui.internetarticle.doi=DOI
|
||||
genericorganizationalunit.ui.publication.select=Select publication to add
|
||||
publications.ui.orgaunits.columns.remove=Remove
|
||||
genericorganizationalunit.ui.publications.columns.name=Title of the publication
|
||||
genericorganizationalunit.ui.publications.columns.remove=Remove
|
||||
|
|
|
|||
|
|
@ -380,3 +380,7 @@ genericorganizationalunit.ui.publications.title=Publikationsliste
|
|||
publications.ui.internetarticle.url=URL
|
||||
publications.ui.internetarticle.urn=URN
|
||||
publications.ui.internetarticle.doi=DOI
|
||||
genericorganizationalunit.ui.publication.select=Publikation zum hinzuf\u00fcgen ausw\u00e4hlen
|
||||
publications.ui.orgaunits.columns.remove=Entfernen
|
||||
genericorganizationalunit.ui.publications.columns.name=Titel der Publikation
|
||||
genericorganizationalunit.ui.publications.columns.remove=Entfernen
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ public class SciDepartmentProjectsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciProject";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(projectsTable);
|
||||
|
|
|
|||
|
|
@ -137,6 +137,10 @@ public class SciDepartmentSubDepartmentsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciDepartment";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(subDepartmentTable);
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ public class SciDepartmentSuperDepartmentsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciDepartment";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(superDeparmentsTable);
|
||||
|
|
|
|||
|
|
@ -126,6 +126,10 @@ public class SciProjectDepartmentsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciDepartment";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(departmentsTable);
|
||||
|
|
|
|||
|
|
@ -136,6 +136,10 @@ public class SciDepartmentInstitutesStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciInstitute";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(institutesTable);
|
||||
|
|
|
|||
|
|
@ -134,6 +134,10 @@ public class SciInstituteDepartmentsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciDepartment";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(departmentsTable);
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ public class SciInstituteProjectsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciProject";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(projectsTable);
|
||||
|
|
|
|||
|
|
@ -129,6 +129,10 @@ public class SciProjectInstitutesStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciInstitute";
|
||||
}
|
||||
});
|
||||
setDisplayComponent(institutesTable);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ import com.arsdigita.cms.ExtraXMLGenerator;
|
|||
import com.arsdigita.cms.contenttypes.ui.SciProjectExtraXmlGenerator;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.persistence.DataQuery;
|
||||
import com.arsdigita.persistence.OID;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ public class SciProjectInvolvedOrganizationsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(involvedTable);
|
||||
|
|
|
|||
|
|
@ -85,3 +85,4 @@ sciproject.ui.involved_orgas.title=Involved Organizations
|
|||
sciproject.ui.involved_orgas.description=Managed involved organizations
|
||||
scidepartment.ui.superdepartment.add=Add superior department
|
||||
sciproject.ui.edit_basic_properties=Basic properties
|
||||
sciproject.ui.desc=Description
|
||||
|
|
|
|||
|
|
@ -86,3 +86,4 @@ sciproject.ui.involved_orgas.title=Beteiligte Organisationen
|
|||
sciproject.ui.involved_orgas.description=Verwalten von am Projekt beteiligten Organisationen
|
||||
scidepartment.ui.superdepartment.add=\u00dcbergeordnete Abteilung hinzuf\u00fcgen
|
||||
sciproject.ui.edit_basic_properties=Basiseigenschaften
|
||||
sciproject.ui.desc=Beschreibung
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ public class SciProjectSubProjectsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciProject";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(subProjectsTable);
|
||||
|
|
|
|||
|
|
@ -121,6 +121,10 @@ public class SciProjectSuperProjectsStep extends SimpleEditStep {
|
|||
public String getAssocType() {
|
||||
return ASSOC_TYPE;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return "com.arsdigita.cms.contenttypes.SciProject";
|
||||
}
|
||||
});
|
||||
|
||||
setDisplayComponent(superProjectsTable);
|
||||
|
|
|
|||
Loading…
Reference in New Issue