Zusätzlicher AuthoringStep für GenericPerson, zeigt eine Liste mit allen Organisationseinheiten (GenericOrganizationalUnit), denen die Person zugewiesen ist (Ticket #1474).
git-svn-id: https://svn.libreccm.org/ccm/trunk@2010 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
19a2b415f9
commit
3ea603c510
|
|
@ -18,7 +18,10 @@
|
|||
*/
|
||||
package com.arsdigita.cms;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
import com.arsdigita.cms.contenttypes.Link;
|
||||
import com.arsdigita.cms.contenttypes.ui.GenericPersonOrgaUnitsStep;
|
||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
import com.arsdigita.cms.dispatcher.AssetURLFinder;
|
||||
import com.arsdigita.cms.dispatcher.ItemDelegatedURLPatternGenerator;
|
||||
import com.arsdigita.cms.dispatcher.ItemTemplatePatternGenerator;
|
||||
|
|
@ -36,6 +39,7 @@ import com.arsdigita.cms.search.LastModifiedUserFilterType;
|
|||
import com.arsdigita.cms.search.LaunchDateFilterType;
|
||||
import com.arsdigita.cms.search.LuceneQueryEngine;
|
||||
import com.arsdigita.cms.search.VersionFilterType;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.workflow.CMSEngine;
|
||||
import com.arsdigita.cms.workflow.CMSTask;
|
||||
import com.arsdigita.cms.workflow.CMSTaskType;
|
||||
|
|
@ -93,7 +97,7 @@ public class Initializer extends CompoundInitializer {
|
|||
|
||||
/** Creates a s_logging category with name = to the full name of class */
|
||||
private static Logger s_log = Logger.getLogger(Initializer.class);
|
||||
|
||||
/** Configuration object for the CMS module */
|
||||
/** Configuration object for the CMS module */
|
||||
private static final CMSConfig s_conf = CMSConfig.getInstance();
|
||||
|
||||
|
|
@ -107,10 +111,8 @@ public class Initializer extends CompoundInitializer {
|
|||
|
||||
s_log.debug("CMS.Initializer.(Constructor) invoked");
|
||||
|
||||
add(new PDLInitializer
|
||||
(new ManifestSource
|
||||
("ccm-cms.pdl.mf",
|
||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||
add(new PDLInitializer(new ManifestSource("ccm-cms.pdl.mf",
|
||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||
|
||||
add(new com.arsdigita.cms.contentsection.Initializer());
|
||||
add(new com.arsdigita.cms.publishToFile.Initializer());
|
||||
|
|
@ -131,27 +133,27 @@ public class Initializer extends CompoundInitializer {
|
|||
super.init(e);
|
||||
|
||||
/* Register object instantiator for Workspace (Content Center) */
|
||||
e.getFactory().registerInstantiator
|
||||
(Workspace.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dobj) {
|
||||
return new Workspace(dobj);
|
||||
}
|
||||
} );
|
||||
e.getFactory().registerInstantiator(Workspace.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dobj) {
|
||||
return new Workspace(dobj);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
LanguageUtil.setSupportedLanguages(
|
||||
Kernel.getConfig().getSupportedLanguages());
|
||||
Kernel.getConfig().getSupportedLanguages());
|
||||
|
||||
/* Register object instantiator for CMS Service */
|
||||
e.getFactory().registerInstantiator
|
||||
(Service.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dobj) {
|
||||
return new Service(dobj);
|
||||
}
|
||||
} );
|
||||
e.getFactory().registerInstantiator(Service.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dobj) {
|
||||
return new Service(dobj);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
URLService.registerFinder(ContentPage.BASE_DATA_OBJECT_TYPE,
|
||||
new ItemURLFinder());
|
||||
|
|
@ -163,38 +165,38 @@ public class Initializer extends CompoundInitializer {
|
|||
new AssetURLFinder());
|
||||
|
||||
URLService.registerFinder(
|
||||
Link.BASE_DATA_OBJECT_TYPE,
|
||||
new URLFinder() {
|
||||
public String find(OID oid, String context)
|
||||
throws NoValidURLException {
|
||||
Link.BASE_DATA_OBJECT_TYPE,
|
||||
new URLFinder() {
|
||||
public String find(OID oid, String context)
|
||||
throws NoValidURLException {
|
||||
|
||||
return find(oid);
|
||||
}
|
||||
public String find( OID oid )
|
||||
throws NoValidURLException {
|
||||
|
||||
Link link;
|
||||
try {
|
||||
link = (Link) DomainObjectFactory.newInstance( oid );
|
||||
} catch( DataObjectNotFoundException ex ) {
|
||||
throw new NoValidURLException
|
||||
( "Cannot find an object with oid: " + oid );
|
||||
return find(oid);
|
||||
}
|
||||
|
||||
if (Link.EXTERNAL_LINK.equals(link.getTargetType())) {
|
||||
return link.getTargetURI();
|
||||
} else {
|
||||
ContentItem target = link.getTargetItem();
|
||||
public String find(OID oid)
|
||||
throws NoValidURLException {
|
||||
|
||||
Link link;
|
||||
try {
|
||||
return URLService.locate( target.getOID() );
|
||||
} catch( URLFinderNotFoundException ex ) {
|
||||
throw new UncheckedWrapperException( ex );
|
||||
link = (Link) DomainObjectFactory.newInstance(oid);
|
||||
} catch (DataObjectNotFoundException ex) {
|
||||
throw new NoValidURLException("Cannot find an object with oid: " + oid);
|
||||
}
|
||||
|
||||
if (Link.EXTERNAL_LINK.equals(link.getTargetType())) {
|
||||
return link.getTargetURI();
|
||||
} else {
|
||||
ContentItem target = link.getTargetItem();
|
||||
|
||||
try {
|
||||
return URLService.locate(target.getOID());
|
||||
} catch (URLFinderNotFoundException ex) {
|
||||
throw new UncheckedWrapperException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
ImageSizerFactory.initialize();
|
||||
registerInstantiators(e.getFactory());
|
||||
|
|
@ -209,8 +211,8 @@ public class Initializer extends CompoundInitializer {
|
|||
// Setup Workspace tab to URL mapping
|
||||
final String workspaceURL = CMS.WORKSPACE_PACKAGE_KEY;
|
||||
final String contentCenterMap = s_conf.getContentCenterMap();
|
||||
WorkspaceSetup workspaceSetup = new WorkspaceSetup( workspaceURL,
|
||||
contentCenterMap);
|
||||
WorkspaceSetup workspaceSetup = new WorkspaceSetup(workspaceURL,
|
||||
contentCenterMap);
|
||||
workspaceSetup.run();
|
||||
|
||||
// register item adapters
|
||||
|
|
@ -220,22 +222,26 @@ public class Initializer extends CompoundInitializer {
|
|||
// Just set the class implementing methods run when for publishing
|
||||
// or unpublishing to file. No initialisation of the class here.
|
||||
try {
|
||||
QueueManager.setListener((PublishToFileListener)
|
||||
ContentSection.getConfig()
|
||||
.getPublishToFileClass().newInstance());
|
||||
QueueManager.setListener((PublishToFileListener) ContentSection.getConfig()
|
||||
.getPublishToFileClass().newInstance());
|
||||
} catch (InstantiationException ex) {
|
||||
throw new UncheckedWrapperException
|
||||
("Failed to instantiate the listener class", ex);
|
||||
throw new UncheckedWrapperException("Failed to instantiate the listener class", ex);
|
||||
} catch (IllegalAccessException ex) {
|
||||
throw new UncheckedWrapperException
|
||||
("Couldn't access the listener class", ex);
|
||||
throw new UncheckedWrapperException("Couldn't access the listener class", ex);
|
||||
}
|
||||
|
||||
MetadataProviderRegistry.registerAdapter(
|
||||
FileAsset.BASE_DATA_OBJECT_TYPE,
|
||||
new AssetMetadataProvider());
|
||||
FileAsset.BASE_DATA_OBJECT_TYPE,
|
||||
new AssetMetadataProvider());
|
||||
|
||||
|
||||
AuthoringKitWizard.registerAssetStep(
|
||||
GenericPerson.BASE_DATA_OBJECT_TYPE,
|
||||
GenericPersonOrgaUnitsStep.class,
|
||||
ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"),
|
||||
ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"),
|
||||
20);
|
||||
|
||||
s_log.debug("CMS.Initializer.init(DomainInitEvent) completed");
|
||||
} // END init(DomainInitEvent e)
|
||||
|
||||
|
|
@ -245,113 +251,112 @@ public class Initializer extends CompoundInitializer {
|
|||
*/
|
||||
private void registerPatternGenerators() {
|
||||
PatternStylesheetResolver.registerPatternGenerator(
|
||||
"item_template_oid",
|
||||
new ItemTemplatePatternGenerator()
|
||||
);
|
||||
"item_template_oid",
|
||||
new ItemTemplatePatternGenerator());
|
||||
|
||||
PatternStylesheetResolver.registerPatternGenerator(
|
||||
"item_delegated_url",
|
||||
new ItemDelegatedURLPatternGenerator()
|
||||
);
|
||||
"item_delegated_url",
|
||||
new ItemDelegatedURLPatternGenerator());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers object instantiators
|
||||
*/
|
||||
private void registerInstantiators(DomainObjectFactory f) {
|
||||
private void registerInstantiators(DomainObjectFactory f) {
|
||||
|
||||
// Register the CMSTaskInstaniator
|
||||
f.registerInstantiator
|
||||
(CMSTask.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new CMSTask(dataObject);
|
||||
}
|
||||
});
|
||||
f.registerInstantiator
|
||||
(CMSTaskType.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new CMSTaskType(dataObject);
|
||||
}
|
||||
});
|
||||
f.registerInstantiator
|
||||
(TaskEventURLGenerator.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new TaskEventURLGenerator(dataObject);
|
||||
}
|
||||
});
|
||||
f.registerInstantiator(CMSTask.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new CMSTask(dataObject);
|
||||
}
|
||||
|
||||
f.registerInstantiator
|
||||
(Workflow.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new Workflow(dataObject);
|
||||
}
|
||||
});
|
||||
});
|
||||
f.registerInstantiator(CMSTaskType.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new CMSTaskType(dataObject);
|
||||
}
|
||||
|
||||
f.registerInstantiator
|
||||
(WorkflowTemplate.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new WorkflowTemplate(dataObject);
|
||||
}
|
||||
});
|
||||
});
|
||||
f.registerInstantiator(TaskEventURLGenerator.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new TaskEventURLGenerator(dataObject);
|
||||
}
|
||||
|
||||
f.registerInstantiator
|
||||
(TemplateContext.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new TemplateContext(dataObject);
|
||||
}
|
||||
@Override
|
||||
public DomainObjectInstantiator
|
||||
resolveInstantiator(DataObject obj) {
|
||||
return this;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
f.registerInstantiator(Workflow.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new Workflow(dataObject);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
f.registerInstantiator(WorkflowTemplate.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new WorkflowTemplate(dataObject);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
f.registerInstantiator(TemplateContext.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
public DomainObject doNewInstance(DataObject dataObject) {
|
||||
return new TemplateContext(dataObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainObjectInstantiator resolveInstantiator(DataObject obj) {
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void registerLuceneEngine() {
|
||||
|
||||
QueryEngineRegistry.registerEngine(IndexerType.LUCENE,
|
||||
new FilterType[] {
|
||||
new CategoryFilterType(),
|
||||
new ContentSectionFilterType(),
|
||||
new CMSContentSectionFilterType(),
|
||||
new ContentTypeFilterType(),
|
||||
new CreationDateFilterType(),
|
||||
new CreationUserFilterType(),
|
||||
new LastModifiedDateFilterType(),
|
||||
new LastModifiedUserFilterType(),
|
||||
new ObjectTypeFilterType(),
|
||||
new PermissionFilterType(),
|
||||
new VersionFilterType()
|
||||
},
|
||||
new FilterType[]{
|
||||
new CategoryFilterType(),
|
||||
new ContentSectionFilterType(),
|
||||
new CMSContentSectionFilterType(),
|
||||
new ContentTypeFilterType(),
|
||||
new CreationDateFilterType(),
|
||||
new CreationUserFilterType(),
|
||||
new LastModifiedDateFilterType(),
|
||||
new LastModifiedUserFilterType(),
|
||||
new ObjectTypeFilterType(),
|
||||
new PermissionFilterType(),
|
||||
new VersionFilterType()
|
||||
},
|
||||
new LuceneQueryEngine());
|
||||
}
|
||||
|
||||
private void registerIntermediaEngine() {
|
||||
|
||||
QueryEngineRegistry.registerEngine(IndexerType.INTERMEDIA,
|
||||
new FilterType[] {
|
||||
new CategoryFilterType(),
|
||||
new ContentSectionFilterType(),
|
||||
new CMSContentSectionFilterType(),
|
||||
new ContentTypeFilterType(),
|
||||
new CreationDateFilterType(),
|
||||
new CreationUserFilterType(),
|
||||
new LastModifiedDateFilterType(),
|
||||
new LastModifiedUserFilterType(),
|
||||
new LaunchDateFilterType(),
|
||||
new ObjectTypeFilterType(),
|
||||
new PermissionFilterType(),
|
||||
new VersionFilterType()
|
||||
},
|
||||
new FilterType[]{
|
||||
new CategoryFilterType(),
|
||||
new ContentSectionFilterType(),
|
||||
new CMSContentSectionFilterType(),
|
||||
new ContentTypeFilterType(),
|
||||
new CreationDateFilterType(),
|
||||
new CreationUserFilterType(),
|
||||
new LastModifiedDateFilterType(),
|
||||
new LastModifiedUserFilterType(),
|
||||
new LaunchDateFilterType(),
|
||||
new ObjectTypeFilterType(),
|
||||
new PermissionFilterType(),
|
||||
new VersionFilterType()
|
||||
},
|
||||
new IntermediaQueryEngine());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,3 +147,8 @@ cms.contenttypes.ui.person.select_contact.no_suitable_language_variant=The selec
|
|||
cms.contenttypes.ui.person.select_contact.already_added=The selected contact has already been added to current item.
|
||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
||||
cms.contenttypes.ui.person.alias.delete.confirm=Are you sure to remove the alias?
|
||||
person.ui.orgaunits.none=This person is not assigned to any organizational units.
|
||||
person.ui.orgaunits.columns.name=Title
|
||||
person.ui.orgaunits.columns.year=Year
|
||||
person.ui.orgaunits.columns.type=Type
|
||||
person.authoring.orgas.title=Organisational Units
|
||||
|
|
|
|||
|
|
@ -158,3 +158,8 @@ cms.contenttypes.ui.person.select_contact.no_suitable_language_variant=Das ausge
|
|||
cms.contenttypes.ui.person.select_contact.already_added=Das ausgew\u00e4hlte Kontakt-Item wurde dem aktuellen Item bereits hinzugef\u00fcgt.
|
||||
cms.contenttypes.ui.person.alias.delete.label=L\u00f6schen
|
||||
cms.contenttypes.ui.person.alias.delete.confirm=Sind Sie sicher, dass Sie das Alias entfernen wollen?
|
||||
person.ui.orgaunits.none=Diese Person ist keiner Organisationseinheit zugewiesen.
|
||||
person.ui.orgaunits.columns.name=Titel
|
||||
person.ui.orgaunits.columns.year=Jahr
|
||||
person.ui.orgaunits.columns.type=Typ
|
||||
person.authoring.orgas.title=Organisationseinheiten
|
||||
|
|
|
|||
|
|
@ -66,8 +66,10 @@ public class TraversalHandler extends DefaultHandler {
|
|||
m_adapters = new HashMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void characters(char[] ch, int start, int len) {}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qn,
|
||||
Attributes attrs) {
|
||||
if (!XMLNS.equals(uri)) {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ public class PublicationBundleCollection extends DomainCollection {
|
|||
m_dataCollection.addOrder("name asc");
|
||||
}
|
||||
|
||||
public Publication getPublicationBundle() {
|
||||
return new Publication(m_dataCollection.getDataObject());
|
||||
public PublicationBundle getPublicationBundle() {
|
||||
return new PublicationBundle(m_dataCollection.getDataObject());
|
||||
}
|
||||
|
||||
public Publication getPublication() {
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ public class PersonPublicationsTable extends Table {
|
|||
return table.getColumnModel().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean nextRow() {
|
||||
boolean ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -404,9 +404,9 @@ publisher.ui.publications.none=Keine Publikationen vorhanden
|
|||
publisher.ui.publications.name=Titel
|
||||
publisher.ui.publications.columns.year=Jahr
|
||||
publisher.ui.publications.columns.type=Typ
|
||||
organization.ui.publications.title=Herausgebene Publikationen
|
||||
organization.ui.publications.title=Herausgegebene Publikationen
|
||||
organization.ui.publications.none=Keine Publikationen
|
||||
organization.ui.publications.description=Herausgebene Publikationen
|
||||
organization.ui.publications.description=Herausgegebene Publikationen
|
||||
organization.ui.publications.columns.name=Titel
|
||||
organization.ui.publications.columns.year=Jahr
|
||||
organization.ui.publications.columns.type=Typ
|
||||
|
|
|
|||
Loading…
Reference in New Issue