Corrections of the JavaDoc comments of various classes which were causing warnings when creating the JavaDoc.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2507 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
5659f0bdb4
commit
f23dfe7b10
|
|
@ -38,15 +38,15 @@ public class AtoZConfig extends AbstractConfig {
|
|||
/** A logger instance to assist debugging. */
|
||||
private static final Logger s_log = Logger.getLogger(AtoZConfig.class);
|
||||
|
||||
/** Singelton config object. */
|
||||
/** Singleton config object. */
|
||||
private static AtoZConfig s_conf;
|
||||
|
||||
/**
|
||||
* Gain a AtoZConfig object.
|
||||
*
|
||||
* Singelton pattern, don't instantiate a config object using the
|
||||
* Singleton pattern, don't instantiate a config object using the
|
||||
* constructor directly!
|
||||
* @return
|
||||
* @return The sole and only instance of this class.
|
||||
*/
|
||||
public static synchronized AtoZConfig getConfig() {
|
||||
if (s_conf == null) {
|
||||
|
|
@ -102,7 +102,8 @@ public class AtoZConfig extends AbstractConfig {
|
|||
|
||||
/**
|
||||
* Provides access to the traversal adapter as stream.
|
||||
* @return
|
||||
*
|
||||
* @return InputStream of the traversal adapter.
|
||||
*/
|
||||
InputStream getTraversalAdapters() {
|
||||
return (InputStream)get(m_adapters);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class CategoryProvider extends AtoZProvider {
|
|||
* @param title
|
||||
* @param description
|
||||
* @param isCompound
|
||||
* @return
|
||||
* @return A new CategoryProvider instance.
|
||||
*/
|
||||
public static CategoryProvider create(String title,
|
||||
String description,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
* 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.atoz;
|
||||
|
||||
import com.arsdigita.domain.DomainCollection;
|
||||
|
|
@ -27,116 +26,108 @@ import com.arsdigita.util.Assert;
|
|||
|
||||
import com.arsdigita.categorization.Category;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ItemProvider extends AtoZProvider {
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.atoz.ItemProvider";
|
||||
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.atoz.ItemProvider";
|
||||
|
||||
public static final String CATEGORY = "category";
|
||||
public static final String LOAD_PATHS = "loadPaths";
|
||||
public static final String CATEGORY = "category";
|
||||
public static final String LOAD_PATHS = "loadPaths";
|
||||
|
||||
public static final String ATOMIC_ENTRIES =
|
||||
"com.arsdigita.atoz.getAtomicItemEntries";
|
||||
public static final String ATOMIC_ENTRIES = "com.arsdigita.atoz.getAtomicItemEntries";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public ItemProvider() {
|
||||
this(BASE_DATA_OBJECT_TYPE);
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public ItemProvider() {
|
||||
this(BASE_DATA_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
protected ItemProvider(String type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param obj
|
||||
*/
|
||||
public ItemProvider(DataObject obj) {
|
||||
super(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param oid
|
||||
*/
|
||||
public ItemProvider(OID oid) {
|
||||
super(oid);
|
||||
}
|
||||
|
||||
public static ItemProvider create(String title,
|
||||
String description,
|
||||
Category category) {
|
||||
ItemProvider provider = new ItemProvider();
|
||||
provider.setup(title, description, category);
|
||||
return provider;
|
||||
}
|
||||
|
||||
public DataQuery getAtomicEntries() {
|
||||
DataQuery items = SessionManager.getSession().retrieveQuery(ATOMIC_ENTRIES);
|
||||
items.setParameter("providerID", getID());
|
||||
return items;
|
||||
}
|
||||
|
||||
protected void setup(String title, String description, Category category) {
|
||||
super.setup(title, description);
|
||||
setCategory(category);
|
||||
}
|
||||
|
||||
public void setCategory(Category category) {
|
||||
Assert.exists(category, Category.class);
|
||||
set(CATEGORY, category);
|
||||
}
|
||||
|
||||
public Category getCategory() {
|
||||
if (get(CATEGORY) == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new Category((DataObject) get(CATEGORY));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
protected ItemProvider(String type) {
|
||||
super(type);
|
||||
}
|
||||
public DomainCollection getAliases() {
|
||||
DomainCollection aliases = new DomainCollection(SessionManager.getSession()
|
||||
.retrieve(ItemAlias.BASE_DATA_OBJECT_TYPE));
|
||||
aliases.addFilter("itemProvider = :providerId").set("providerId", getID());
|
||||
aliases.addOrder("title");
|
||||
return aliases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public ItemProvider(DataObject obj) {
|
||||
super(obj);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param loadPaths
|
||||
*/
|
||||
public void setLoadPaths(String loadPaths) {
|
||||
set(LOAD_PATHS, loadPaths);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public ItemProvider(OID oid) {
|
||||
super(oid);
|
||||
}
|
||||
public String getLoadPaths() {
|
||||
return (String) get(LOAD_PATHS);
|
||||
}
|
||||
|
||||
public static ItemProvider create(String title,
|
||||
String description,
|
||||
Category category) {
|
||||
ItemProvider provider = new ItemProvider();
|
||||
provider.setup(title, description, category);
|
||||
return provider;
|
||||
}
|
||||
|
||||
public DataQuery getAtomicEntries() {
|
||||
DataQuery items = SessionManager.getSession().retrieveQuery(ATOMIC_ENTRIES);
|
||||
items.setParameter("providerID", getID());
|
||||
return items;
|
||||
}
|
||||
|
||||
protected void setup(String title, String description, Category category) {
|
||||
super.setup(title, description);
|
||||
setCategory(category);
|
||||
}
|
||||
|
||||
public void setCategory( Category category ) {
|
||||
Assert.exists( category, Category.class );
|
||||
set( CATEGORY, category );
|
||||
}
|
||||
|
||||
public Category getCategory() {
|
||||
if (get(CATEGORY) == null) {
|
||||
return null;
|
||||
} else {
|
||||
return new Category( (DataObject) get(CATEGORY));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public DomainCollection getAliases() {
|
||||
DomainCollection aliases = new DomainCollection(SessionManager.getSession()
|
||||
.retrieve(ItemAlias.BASE_DATA_OBJECT_TYPE));
|
||||
aliases.addFilter("itemProvider = :providerId").set("providerId", getID());
|
||||
aliases.addOrder("title");
|
||||
return aliases;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param loadPaths
|
||||
*/
|
||||
public void setLoadPaths( String loadPaths ) {
|
||||
set( LOAD_PATHS, loadPaths );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getLoadPaths() {
|
||||
return (String) get( LOAD_PATHS );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public AtoZGenerator getGenerator() {
|
||||
return new ItemGenerator(this);
|
||||
}
|
||||
@Override
|
||||
public AtoZGenerator getGenerator() {
|
||||
return new ItemGenerator(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import java.util.Iterator;
|
|||
|
||||
/**
|
||||
*
|
||||
* @depcreated UI integrated into Application tab at /ccm/admin. This class is now obsolete
|
||||
* @deprecated UI integrated into Application tab at /ccm/admin. This class is now obsolete
|
||||
* and has been replaced by {@link AtoZAdminPane}. This class is kept here for now, but will be
|
||||
* removed in a further release, together with the Admin UI at /ccm/atoz/admin.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -51,9 +51,7 @@ import org.apache.log4j.Logger;
|
|||
|
||||
/**
|
||||
* Component displays the currently attached images for an content item. It is
|
||||
* part of the entry point image authoring step {
|
||||
*
|
||||
* @see ImageStep}.
|
||||
* part of the entry point image authoring step {@see ImageStep}.
|
||||
*
|
||||
* It creates a list of images including meta information (name, type, width,
|
||||
* etc.), a link to remove from the list for each image and at the bottom a link
|
||||
|
|
|
|||
|
|
@ -42,36 +42,29 @@ import java.util.List;
|
|||
public class MultiPartArticle extends ContentPage {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(MultiPartArticle.class);
|
||||
|
||||
/** PDL property names */
|
||||
public static final String SUMMARY = "summary";
|
||||
public static final String SECTIONS = "sections";
|
||||
|
||||
|
||||
public static final String SUMMARY = "summary";
|
||||
public static final String SECTIONS = "sections";
|
||||
/** rank direction changes */
|
||||
public static final int UP = 1;
|
||||
public static final int DOWN = 2;
|
||||
|
||||
|
||||
public static final int UP = 1;
|
||||
public static final int DOWN = 2;
|
||||
/** data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.MultiPartArticle";
|
||||
|
||||
"com.arsdigita.cms.contenttypes.MultiPartArticle";
|
||||
/** named query parameters */
|
||||
public static final String RANK = "rank";
|
||||
public static final String RANK = "rank";
|
||||
public static final String ARTICLE = "article";
|
||||
public static final String SECTION = "section";
|
||||
|
||||
private static MultiPartArticleConfig s_config = new MultiPartArticleConfig();
|
||||
|
||||
static {
|
||||
s_log.debug("Static initalizer starting...");
|
||||
s_config.load();
|
||||
s_config.load();
|
||||
s_log.debug("Static initalizer finished.");
|
||||
}
|
||||
|
||||
|
||||
public static MultiPartArticleConfig getConfig() {
|
||||
return s_config;
|
||||
return s_config;
|
||||
}
|
||||
|
||||
/** Default constructor. */
|
||||
|
|
@ -84,9 +77,8 @@ public class MultiPartArticle extends ContentPage {
|
|||
*
|
||||
* @param id the id of the object to retrieve
|
||||
*/
|
||||
public MultiPartArticle( BigDecimal id )
|
||||
throws DataObjectNotFoundException
|
||||
{
|
||||
public MultiPartArticle(BigDecimal id)
|
||||
throws DataObjectNotFoundException {
|
||||
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||
}
|
||||
|
||||
|
|
@ -95,9 +87,8 @@ public class MultiPartArticle extends ContentPage {
|
|||
*
|
||||
* @param id the object id of the object to retrieve
|
||||
*/
|
||||
public MultiPartArticle( OID id )
|
||||
throws DataObjectNotFoundException
|
||||
{
|
||||
public MultiPartArticle(OID id)
|
||||
throws DataObjectNotFoundException {
|
||||
super(id);
|
||||
}
|
||||
|
||||
|
|
@ -107,12 +98,12 @@ public class MultiPartArticle extends ContentPage {
|
|||
*
|
||||
* @param obj the object data to use
|
||||
*/
|
||||
public MultiPartArticle( DataObject obj ) {
|
||||
public MultiPartArticle(DataObject obj) {
|
||||
super(obj);
|
||||
}
|
||||
|
||||
/** Constructor. */
|
||||
public MultiPartArticle( String type ) {
|
||||
public MultiPartArticle(String type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
|
|
@ -122,11 +113,11 @@ public class MultiPartArticle extends ContentPage {
|
|||
|
||||
/** Accessor. Get the summary for this MultiPartArticle. */
|
||||
public String getSummary() {
|
||||
return (String)get(SUMMARY);
|
||||
return (String) get(SUMMARY);
|
||||
}
|
||||
|
||||
/** Accessor. Set the summary for this MultiPartArticle. */
|
||||
public void setSummary( String summary ) {
|
||||
public void setSummary(String summary) {
|
||||
set(SUMMARY, summary);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +127,7 @@ public class MultiPartArticle extends ContentPage {
|
|||
*
|
||||
* @param section the ArticleSection to add
|
||||
*/
|
||||
public void addSection( ArticleSection section ) {
|
||||
public void addSection(ArticleSection section) {
|
||||
addSection(section, getMaxRank() + 1);
|
||||
}
|
||||
|
||||
|
|
@ -147,14 +138,13 @@ public class MultiPartArticle extends ContentPage {
|
|||
* @param section the ArticleSection to add
|
||||
* @param rank the rank of the ArticleSection in the association.
|
||||
*/
|
||||
public void addSection( ArticleSection section, Integer rank ) {
|
||||
s_log.info("adding section:" + section.getName() +
|
||||
" with rank " + rank.toString());
|
||||
public void addSection(ArticleSection section, Integer rank) {
|
||||
s_log.info("adding section:" + section.getName() + " with rank " + rank.toString());
|
||||
section.setRank(rank);
|
||||
add(SECTIONS,section);
|
||||
add(SECTIONS, section);
|
||||
}
|
||||
|
||||
public void addSection( ArticleSection section, int rank ) {
|
||||
public void addSection(ArticleSection section, int rank) {
|
||||
addSection(section, new Integer(rank));
|
||||
}
|
||||
|
||||
|
|
@ -167,6 +157,7 @@ public class MultiPartArticle extends ContentPage {
|
|||
|
||||
/**
|
||||
* Get the collection of sections.
|
||||
* @return
|
||||
*/
|
||||
public ArticleSectionCollection getSections() {
|
||||
return getSections(true);
|
||||
|
|
@ -178,23 +169,24 @@ public class MultiPartArticle extends ContentPage {
|
|||
*
|
||||
* @param section the ArticleSection to remove
|
||||
*/
|
||||
public void removeSection( ArticleSection section ) {
|
||||
public void removeSection(ArticleSection section) {
|
||||
changeSectionRank(section, getMaxRank());
|
||||
section.delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the rank of a given ArticleSection in this object.
|
||||
* @param sectionID
|
||||
* @param rank
|
||||
*/
|
||||
public void changeSectionRank(BigDecimal sectionID, int rank) {
|
||||
ArticleSection target = (ArticleSection)
|
||||
DomainObjectFactory.newInstance
|
||||
(new OID(ArticleSection.BASE_DATA_OBJECT_TYPE, sectionID));
|
||||
ArticleSection target = (ArticleSection) DomainObjectFactory.newInstance(new OID(
|
||||
ArticleSection.BASE_DATA_OBJECT_TYPE, sectionID));
|
||||
|
||||
changeSectionRank(target, rank);
|
||||
}
|
||||
|
||||
public void changeSectionRank(BigDecimal sectionID, BigDecimal dest ) {
|
||||
public void changeSectionRank(BigDecimal sectionID, BigDecimal dest) {
|
||||
int rank = getRank(dest);
|
||||
changeSectionRank(sectionID, rank);
|
||||
}
|
||||
|
|
@ -204,7 +196,6 @@ public class MultiPartArticle extends ContentPage {
|
|||
changeSectionRank(section, rank);
|
||||
}
|
||||
|
||||
|
||||
protected int getRank(BigDecimal sectionID) {
|
||||
try {
|
||||
ArticleSection section = new ArticleSection(sectionID);
|
||||
|
|
@ -214,7 +205,6 @@ public class MultiPartArticle extends ContentPage {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Change the rank of the sections with the given id within this object.
|
||||
* Sets the section rank to that given, and moves all other section ranks
|
||||
|
|
@ -230,7 +220,7 @@ public class MultiPartArticle extends ContentPage {
|
|||
public void changeSectionRank(ArticleSection source, int destRank) {
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("*** changeSectionRank, section ID = " + source.getID()
|
||||
+ "destRank = " + destRank);
|
||||
+ "destRank = " + destRank);
|
||||
}
|
||||
|
||||
Integer r = source.getRank();
|
||||
|
|
@ -263,7 +253,6 @@ public class MultiPartArticle extends ContentPage {
|
|||
coll.close();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the highest section rank.
|
||||
*/
|
||||
|
|
@ -282,25 +271,26 @@ public class MultiPartArticle extends ContentPage {
|
|||
}
|
||||
|
||||
public static final int SUMMARY_LENGTH = 200;
|
||||
|
||||
public String getSearchSummary() {
|
||||
final String summary = getSummary();
|
||||
|
||||
if (summary == null) {
|
||||
return "";
|
||||
} else {
|
||||
return com.arsdigita.util.StringUtils.truncateString
|
||||
(summary, SUMMARY_LENGTH, true);
|
||||
return com.arsdigita.util.StringUtils.truncateString(summary, SUMMARY_LENGTH, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExtraXMLGenerator> getExtraXMLGenerators() {
|
||||
final List<ExtraXMLGenerator> generators = super.getExtraXMLGenerators();
|
||||
|
||||
|
||||
//generators.add(new ArticleSectionPanel());
|
||||
generators.add(new MultiPartArticleDataXMLGenerator());
|
||||
generators.add(new ArticleSectionXMLGenerator());
|
||||
|
||||
|
||||
return generators;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.mparticle;
|
||||
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.ControlLink;
|
||||
import com.arsdigita.bebop.Label;
|
||||
|
|
@ -47,7 +46,6 @@ import org.apache.log4j.Logger;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* A table that displays the sections for the currently
|
||||
* selected MultiPartArticle.
|
||||
|
|
@ -55,16 +53,14 @@ import java.math.BigDecimal;
|
|||
* @author <a href="mailto:dturner@arsdigita.com">Dave Turner</a>
|
||||
* @version $Id: SectionTable.java 2099 2010-04-17 15:35:14Z pboy $
|
||||
*/
|
||||
public class SectionTable extends Table
|
||||
{
|
||||
public class SectionTable extends Table {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(SectionTable.class);
|
||||
|
||||
// match columns by (symbolic) index, makes for easier reordering
|
||||
public static final int COL_INDEX_TITLE = 0; // "Section";
|
||||
public static final int COL_INDEX_EDIT = 1; // "Edit";
|
||||
public static final int COL_INDEX_MOVE = 2; // "Move";
|
||||
public static final int COL_INDEX_TITLE = 0; // "Section";
|
||||
public static final int COL_INDEX_EDIT = 1; // "Edit";
|
||||
public static final int COL_INDEX_MOVE = 2; // "Move";
|
||||
public static final int COL_INDEX_DELETE = 3; // "Delete";
|
||||
|
||||
private ItemSelectionModel m_selArticle;
|
||||
private ItemSelectionModel m_selSection;
|
||||
private ItemSelectionModel m_moveSection;
|
||||
|
|
@ -76,34 +72,30 @@ public class SectionTable extends Table
|
|||
* which holds the sections to display.
|
||||
* @param moveSection
|
||||
*/
|
||||
public SectionTable ( ItemSelectionModel selArticle,
|
||||
ItemSelectionModel moveSection ) {
|
||||
public SectionTable(ItemSelectionModel selArticle,
|
||||
ItemSelectionModel moveSection) {
|
||||
|
||||
super();
|
||||
m_selArticle = selArticle;
|
||||
m_moveSection = moveSection;
|
||||
|
||||
TableColumnModel model = getColumnModel();
|
||||
model.add( new TableColumn(
|
||||
COL_INDEX_TITLE,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_section")
|
||||
) ));
|
||||
model.add( new TableColumn(
|
||||
COL_INDEX_EDIT,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_edit")
|
||||
) ));
|
||||
model.add( new TableColumn(
|
||||
COL_INDEX_MOVE,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_move")
|
||||
) ));
|
||||
model.add( new TableColumn(
|
||||
COL_INDEX_DELETE,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_delete")
|
||||
) ));
|
||||
model.add(new TableColumn(
|
||||
COL_INDEX_TITLE,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_section"))));
|
||||
model.add(new TableColumn(
|
||||
COL_INDEX_EDIT,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_edit"))));
|
||||
model.add(new TableColumn(
|
||||
COL_INDEX_MOVE,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_move"))));
|
||||
model.add(new TableColumn(
|
||||
COL_INDEX_DELETE,
|
||||
new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.header_delete"))));
|
||||
|
||||
model.get(1).setCellRenderer(new SectionTableCellRenderer(true));
|
||||
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
||||
|
|
@ -112,105 +104,96 @@ public class SectionTable extends Table
|
|||
|
||||
setModelBuilder(new SectionTableModelBuilder(m_selArticle, m_moveSection));
|
||||
|
||||
addTableActionListener ( new TableActionListener () {
|
||||
public void cellSelected ( TableActionEvent event ) {
|
||||
PageState state = event.getPageState();
|
||||
addTableActionListener(new TableActionListener() {
|
||||
public void cellSelected(TableActionEvent event) {
|
||||
PageState state = event.getPageState();
|
||||
|
||||
TableColumn col = getColumnModel().get(event.getColumn()
|
||||
.intValue());
|
||||
TableColumn col = getColumnModel().get(event.getColumn()
|
||||
.intValue());
|
||||
|
||||
if ( col.getModelIndex() == COL_INDEX_MOVE ) {
|
||||
if ( m_moveSection.getSelectedKey(state) == null ) {
|
||||
m_moveSection.setSelectedKey(state,
|
||||
m_selSection
|
||||
.getSelectedKey(state));
|
||||
} else {
|
||||
MultiPartArticle article = (MultiPartArticle)
|
||||
m_selArticle.getSelectedObject(state);
|
||||
if (col.getModelIndex() == COL_INDEX_MOVE) {
|
||||
if (m_moveSection.getSelectedKey(state) == null) {
|
||||
m_moveSection.setSelectedKey(state,
|
||||
m_selSection
|
||||
.getSelectedKey(state));
|
||||
} else {
|
||||
MultiPartArticle article = (MultiPartArticle) m_selArticle.
|
||||
getSelectedObject(state);
|
||||
|
||||
BigDecimal id = (BigDecimal)
|
||||
m_moveSection.getSelectedKey(state);
|
||||
ArticleSection sect = (ArticleSection)
|
||||
DomainObjectFactory.newInstance
|
||||
(new OID
|
||||
(ArticleSection.BASE_DATA_OBJECT_TYPE, id));
|
||||
BigDecimal id = (BigDecimal) m_moveSection.getSelectedKey(state);
|
||||
ArticleSection sect = (ArticleSection) DomainObjectFactory.newInstance(
|
||||
new OID(ArticleSection.BASE_DATA_OBJECT_TYPE, id));
|
||||
|
||||
BigDecimal dest =
|
||||
new BigDecimal((String)event.getRowKey());
|
||||
ArticleSection destSect = (ArticleSection)
|
||||
DomainObjectFactory.newInstance
|
||||
(new OID
|
||||
(ArticleSection.BASE_DATA_OBJECT_TYPE, dest));
|
||||
BigDecimal dest =
|
||||
new BigDecimal((String) event.getRowKey());
|
||||
ArticleSection destSect = (ArticleSection) DomainObjectFactory.newInstance(
|
||||
new OID(ArticleSection.BASE_DATA_OBJECT_TYPE, dest));
|
||||
|
||||
// if sect is lower in rank than the dest
|
||||
// then move below is default behavior
|
||||
int rank = destSect.getRank().intValue();
|
||||
if (sect.getRank().intValue() > rank) {
|
||||
// otherwise, add one to get "move below"
|
||||
rank++;
|
||||
}
|
||||
|
||||
article.changeSectionRank(sect, rank);
|
||||
m_moveSection.setSelectedKey(state, null);
|
||||
// if sect is lower in rank than the dest
|
||||
// then move below is default behavior
|
||||
int rank = destSect.getRank().intValue();
|
||||
if (sect.getRank().intValue() > rank) {
|
||||
// otherwise, add one to get "move below"
|
||||
rank++;
|
||||
}
|
||||
|
||||
article.changeSectionRank(sect, rank);
|
||||
m_moveSection.setSelectedKey(state, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void headSelected ( TableActionEvent event ) {
|
||||
// do nothing
|
||||
}
|
||||
});
|
||||
public void headSelected(TableActionEvent event) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void setSectionModel ( ItemSelectionModel selSection ) {
|
||||
if ( selSection == null ) {
|
||||
public void setSectionModel(ItemSelectionModel selSection) {
|
||||
if (selSection == null) {
|
||||
s_log.warn("null item model");
|
||||
}
|
||||
m_selSection = selSection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The model builder to generate a suitable model for the SectionTable
|
||||
*/
|
||||
protected class SectionTableModelBuilder extends LockableImpl
|
||||
implements TableModelBuilder {
|
||||
implements TableModelBuilder {
|
||||
|
||||
protected ItemSelectionModel m_selArticle;
|
||||
protected ItemSelectionModel m_moveSection;
|
||||
|
||||
|
||||
/**
|
||||
* Private class constructor.
|
||||
* @param selArticle
|
||||
* @param moveSection
|
||||
*/
|
||||
public SectionTableModelBuilder ( ItemSelectionModel selArticle,
|
||||
ItemSelectionModel moveSection ) {
|
||||
public SectionTableModelBuilder(ItemSelectionModel selArticle,
|
||||
ItemSelectionModel moveSection) {
|
||||
m_selArticle = selArticle;
|
||||
m_moveSection = moveSection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param table
|
||||
* @param state
|
||||
* @return
|
||||
*/
|
||||
public TableModel makeModel ( Table table, PageState state ) {
|
||||
public TableModel makeModel(Table table, PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
|
||||
MultiPartArticle article = (MultiPartArticle)m_selArticle
|
||||
.getSelectedObject(state);
|
||||
MultiPartArticle article = (MultiPartArticle) m_selArticle
|
||||
.getSelectedObject(state);
|
||||
|
||||
return new SectionTableModel(table, state, article, m_moveSection);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Internal class
|
||||
*/
|
||||
|
|
@ -223,34 +206,33 @@ public class SectionTable extends Table
|
|||
private ItemSelectionModel m_moveSection;
|
||||
private ArticleSection m_section;
|
||||
|
||||
|
||||
/** Constructor.
|
||||
* @param table
|
||||
* @param state
|
||||
* @param article
|
||||
* @param moveSection
|
||||
*/
|
||||
public SectionTableModel ( Table table, PageState state,
|
||||
MultiPartArticle article,
|
||||
ItemSelectionModel moveSection ) {
|
||||
public SectionTableModel(Table table, PageState state,
|
||||
MultiPartArticle article,
|
||||
ItemSelectionModel moveSection) {
|
||||
m_colModel = table.getColumnModel();
|
||||
m_state = state;
|
||||
m_sections = article.getSections();
|
||||
m_table = (SectionTable)table;
|
||||
m_table = (SectionTable) table;
|
||||
m_moveSection = moveSection;
|
||||
}
|
||||
|
||||
/** Return the number of columsn this TableModel has. */
|
||||
public int getColumnCount () {
|
||||
public int getColumnCount() {
|
||||
return m_colModel.size();
|
||||
}
|
||||
|
||||
/** Move to the next row and return true if the model is now positioned
|
||||
* on a valid row.
|
||||
*/
|
||||
public boolean nextRow () {
|
||||
if ( m_sections.next() ) {
|
||||
m_section = (ArticleSection)m_sections.getArticleSection();
|
||||
public boolean nextRow() {
|
||||
if (m_sections.next()) {
|
||||
m_section = (ArticleSection) m_sections.getArticleSection();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -259,38 +241,36 @@ public class SectionTable extends Table
|
|||
/**
|
||||
* Return the data element for the given column and the current row.
|
||||
*/
|
||||
public Object getElementAt( int columnIndex ) {
|
||||
public Object getElementAt(int columnIndex) {
|
||||
|
||||
if ( m_colModel == null ) { return null; }
|
||||
if (m_colModel == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// match columns by (symbolic) index, makes for easier reordering
|
||||
if ( columnIndex == COL_INDEX_TITLE ) {
|
||||
if (columnIndex == COL_INDEX_TITLE) {
|
||||
return m_section.getTitle();
|
||||
} else if ( columnIndex == COL_INDEX_EDIT ) {
|
||||
//return "edit";
|
||||
return new Label(
|
||||
} else if (columnIndex == COL_INDEX_EDIT) {
|
||||
//return "edit";
|
||||
return new Label(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_edit")
|
||||
);
|
||||
} else if ( columnIndex == COL_INDEX_DELETE ) {
|
||||
// return "delete";
|
||||
return new Label(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_edit"));
|
||||
} else if (columnIndex == COL_INDEX_DELETE) {
|
||||
// return "delete";
|
||||
return new Label(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_delete")
|
||||
);
|
||||
} else if ( columnIndex == COL_INDEX_MOVE ) {
|
||||
if ( m_moveSection.getSelectedKey(m_state) == null ) {
|
||||
// return "move";
|
||||
return new Label(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_move")
|
||||
);
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_delete"));
|
||||
} else if (columnIndex == COL_INDEX_MOVE) {
|
||||
if (m_moveSection.getSelectedKey(m_state) == null) {
|
||||
// return "move";
|
||||
return new Label(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_move"));
|
||||
} else {
|
||||
// return "move below here";
|
||||
return new Label(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_move_below")
|
||||
);
|
||||
// return "move below here";
|
||||
return new Label(
|
||||
MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_move_below"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -300,67 +280,62 @@ public class SectionTable extends Table
|
|||
/**
|
||||
* Return the key for the given column and the current row.
|
||||
*/
|
||||
public Object getKeyAt ( int columnIndex ) {
|
||||
public Object getKeyAt(int columnIndex) {
|
||||
return m_section.getID();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class SectionTableCellRenderer extends LockableImpl
|
||||
implements TableCellRenderer {
|
||||
implements TableCellRenderer {
|
||||
|
||||
private boolean m_active;
|
||||
|
||||
public SectionTableCellRenderer () {
|
||||
public SectionTableCellRenderer() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
public SectionTableCellRenderer
|
||||
( boolean active ) {
|
||||
public SectionTableCellRenderer(boolean active) {
|
||||
m_active = active;
|
||||
}
|
||||
|
||||
public Component getComponent ( Table table, PageState state,
|
||||
Object value, boolean isSelected,
|
||||
Object key, int row, int column ) {
|
||||
public Component getComponent(Table table, PageState state,
|
||||
Object value, boolean isSelected,
|
||||
Object key, int row, int column) {
|
||||
|
||||
Component ret = null;
|
||||
SecurityManager sm = CMS.getSecurityManager(state);
|
||||
ContentItem item = (ContentItem)m_selArticle.getSelectedObject(state);
|
||||
|
||||
boolean active = m_active && sm.canAccess(state.getRequest(),
|
||||
ContentItem item = (ContentItem) m_selArticle.getSelectedObject(state);
|
||||
|
||||
boolean active = m_active && sm.canAccess(state.getRequest(),
|
||||
SecurityManager.EDIT_ITEM,
|
||||
item);
|
||||
|
||||
if ( value instanceof Label ) {
|
||||
if ( active ) {
|
||||
ret = new ControlLink((Component)value);
|
||||
if (value instanceof Label) {
|
||||
if (active) {
|
||||
ret = new ControlLink((Component) value);
|
||||
} else {
|
||||
ret = (Component)value;
|
||||
ret = (Component) value;
|
||||
}
|
||||
|
||||
} else if ( value instanceof String ) {
|
||||
|
||||
} else if (value instanceof String) {
|
||||
// Backwards compatibility, should be removed asap!
|
||||
if ( active ) {
|
||||
if (active) {
|
||||
ret = new ControlLink(value.toString());
|
||||
} else {
|
||||
ret = new Label(value.toString());
|
||||
}
|
||||
} else {
|
||||
ret = new Label(MPArticleGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_not_defined"),
|
||||
false);
|
||||
"cms.contenttypes.ui.mparticle.section_table.link_not_defined"),
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -781,7 +781,7 @@ public final class CMSConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieve path of the root folter for template folders. Path is
|
||||
* Retrieve path of the root folder for template folders. Path is
|
||||
* relative to webapp root.
|
||||
*/
|
||||
public final String getTemplateRoot() {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class MainPage extends CMSApplicationPage implements ActionListener {
|
|||
|
||||
/* Set the class attribute value (down in SimpleComponent). */
|
||||
setClassAttr("cms-admin");
|
||||
|
||||
|
||||
BigDecimalParameter typeId = new BigDecimalParameter(CONTENT_TYPE);
|
||||
addGlobalStateParam(typeId);
|
||||
m_typeSel = new ACSObjectSelectionModel(
|
||||
|
|
|
|||
|
|
@ -27,130 +27,129 @@ import com.arsdigita.persistence.OID;
|
|||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.persistence.metadata.ObjectType;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Base class. Provides default functionality for auditing ACSObjects.
|
||||
*
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Joseph Bank
|
||||
* @author Joseph Bank
|
||||
* @version 1.0
|
||||
* @version $Id: AuditedACSObject.java 2089 2010-04-17 07:55:43Z pboy $
|
||||
*/
|
||||
|
||||
public abstract class AuditedACSObject extends ACSObject implements Audited {
|
||||
|
||||
/**
|
||||
* Audit trail.
|
||||
*/
|
||||
/**
|
||||
* Audit trail.
|
||||
*/
|
||||
private BasicAuditTrail m_audit_trail;
|
||||
|
||||
private BasicAuditTrail m_audit_trail;
|
||||
/**
|
||||
* Gets the user who created the object. May be null.
|
||||
*
|
||||
* @return the user who created the object.
|
||||
*/
|
||||
@Override
|
||||
public User getCreationUser() {
|
||||
return m_audit_trail.getCreationUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user who created the object. May be null.
|
||||
* @return the user who created the object.
|
||||
*/
|
||||
/**
|
||||
* Gets the creation date of the object.
|
||||
*
|
||||
* @return the creation date.
|
||||
*/
|
||||
@Override
|
||||
public Date getCreationDate() {
|
||||
return m_audit_trail.getCreationDate();
|
||||
}
|
||||
|
||||
public User getCreationUser() {
|
||||
return m_audit_trail.getCreationUser();
|
||||
}
|
||||
/**
|
||||
* Gets the IP address associated with creating an object. May be null.
|
||||
*
|
||||
* @return the creation IP address.
|
||||
*/
|
||||
@Override
|
||||
public String getCreationIP() {
|
||||
return m_audit_trail.getCreationIP();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the creation date of the object.
|
||||
* @return the creation date.
|
||||
*/
|
||||
/**
|
||||
* Gets the user who last modified the object. May be null.
|
||||
*
|
||||
* @return the last modifying user.
|
||||
*/
|
||||
@Override
|
||||
public User getLastModifiedUser() {
|
||||
return m_audit_trail.getLastModifiedUser();
|
||||
}
|
||||
|
||||
public Date getCreationDate() {
|
||||
return m_audit_trail.getCreationDate();
|
||||
}
|
||||
/**
|
||||
* Gets the last modified date.
|
||||
*
|
||||
* @return the last modified date.
|
||||
*/
|
||||
@Override
|
||||
public Date getLastModifiedDate() {
|
||||
return m_audit_trail.getLastModifiedDate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the IP address associated with creating an object. May be
|
||||
* null.
|
||||
* @return the creation IP address.
|
||||
*/
|
||||
/**
|
||||
* Gets the last modified IP address. May be null.
|
||||
*
|
||||
* @return the IP address associated with the last modification.
|
||||
*/
|
||||
@Override
|
||||
public String getLastModifiedIP() {
|
||||
return m_audit_trail.getLastModifiedIP();
|
||||
}
|
||||
|
||||
public String getCreationIP() {
|
||||
return m_audit_trail.getCreationIP();
|
||||
}
|
||||
/**
|
||||
* Initialises with a basic audit trail and an Auditing Observer. This method is called from the
|
||||
* DomainObject constructor, so it is invoked whenever a new ACSObject is constructed.
|
||||
*/
|
||||
@Override
|
||||
protected void initialize() {
|
||||
super.initialize();
|
||||
|
||||
/**
|
||||
* Gets the user who last modified the object. May be null.
|
||||
* @return the last modifying user.
|
||||
*/
|
||||
//Get the audit trail for this object
|
||||
m_audit_trail = BasicAuditTrail.retrieveForACSObject(this);
|
||||
addObserver(new AuditingObserver(m_audit_trail));
|
||||
}
|
||||
|
||||
public User getLastModifiedUser() {
|
||||
return m_audit_trail.getLastModifiedUser();
|
||||
}
|
||||
/**
|
||||
* Equivalent to the corresponding ACSObject constructor.
|
||||
*
|
||||
* @param AuditedACSObjectData
|
||||
*/
|
||||
protected AuditedACSObject(DataObject AuditedACSObjectData) {
|
||||
super(AuditedACSObjectData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last modified date.
|
||||
* @return the last modified date.
|
||||
*/
|
||||
/**
|
||||
* Equivalent to the corresponding ACSObject constructor.
|
||||
*
|
||||
* @param typeName
|
||||
*/
|
||||
public AuditedACSObject(String typeName) {
|
||||
super(typeName);
|
||||
}
|
||||
|
||||
public Date getLastModifiedDate() {
|
||||
return m_audit_trail.getLastModifiedDate();
|
||||
}
|
||||
/**
|
||||
* Equivalent to the corresponding ACSObject constructor.
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
public AuditedACSObject(ObjectType type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last modified IP address. May be null.
|
||||
* @return the IP address associated with the last modification.
|
||||
*/
|
||||
/**
|
||||
* Equivalent to the corresponding ACSObject constructor.
|
||||
*
|
||||
* @param oid
|
||||
*/
|
||||
public AuditedACSObject(OID oid) throws DataObjectNotFoundException {
|
||||
super(oid);
|
||||
}
|
||||
|
||||
public String getLastModifiedIP() {
|
||||
return m_audit_trail.getLastModifiedIP();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes with a basic audit trail and an Auditing Observer.
|
||||
* This method is called from the DomainObject constructor, so it
|
||||
* is invoked whenever a new ACSObject is constructed.
|
||||
*
|
||||
* @post m_audit_trail != null
|
||||
*/
|
||||
|
||||
protected void initialize() {
|
||||
super.initialize();
|
||||
|
||||
//Get the audit trail for this object
|
||||
|
||||
m_audit_trail = BasicAuditTrail.retrieveForACSObject(this);
|
||||
addObserver(new AuditingObserver(m_audit_trail));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Equaivalent to the corresponding ACSObject constructor.
|
||||
*/
|
||||
|
||||
protected AuditedACSObject(DataObject AuditedACSObjectData) {
|
||||
super(AuditedACSObjectData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Equaivalent to the corresponding ACSObject constructor.
|
||||
*/
|
||||
|
||||
public AuditedACSObject(String typeName) {
|
||||
super(typeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Equaivalent to the corresponding ACSObject constructor.
|
||||
*/
|
||||
public AuditedACSObject(ObjectType type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Equaivalent to the corresponding ACSObject constructor.
|
||||
*/
|
||||
|
||||
public AuditedACSObject(OID oid) throws DataObjectNotFoundException {
|
||||
super(oid);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class AuditingSaveFactory {
|
|||
/**
|
||||
* Sets the prototype object for the factory.
|
||||
*
|
||||
* @param a prototype AuditingSaveInfo object
|
||||
* @param proto a prototype AuditingSaveInfo object
|
||||
*/
|
||||
public static void setPrototype(AuditingSaveInfo proto) {
|
||||
s_proto.set(proto);
|
||||
|
|
|
|||
|
|
@ -117,12 +117,6 @@ public abstract class PackageLoader extends AbstractScript {
|
|||
s_log.info("Loading: Done");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param args
|
||||
* @return
|
||||
*/
|
||||
public static ParameterReader reader(String[] args) {
|
||||
CompoundParameterReader result = new CompoundParameterReader();
|
||||
result.add(new JavaPropertyReader(props(args)));
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ import javax.servlet.http.HttpServletResponse;
|
|||
* Web Developer Support Application Servlet class, central entry point to create and process the applications UI.
|
||||
*
|
||||
* We should have subclassed BebopApplicationServlet but couldn't overwrite doService() method to add permission
|
||||
* checking. So we use our own page mapping. The general logic is the same as for BebopApplicationServlet. {
|
||||
* checking. So we use our own page mapping. The general logic is the same as for BebopApplicationServlet.
|
||||
*
|
||||
* @see com.arsdigita.bebop.page.BebopApplicationServlet}
|
||||
* {@see com.arsdigita.bebop.page.BebopApplicationServlet}
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @author pb
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ public class Application extends Resource {
|
|||
* @param fragment URL fragment of the application
|
||||
* @param title
|
||||
* @param parent parent Application
|
||||
* @return
|
||||
* @return The new Application
|
||||
*/
|
||||
public static Application createApplication(final ApplicationType type,
|
||||
final String fragment,
|
||||
|
|
@ -158,7 +158,7 @@ public class Application extends Resource {
|
|||
* @param fragment URL fragment of the application
|
||||
* @param title
|
||||
* @param parent
|
||||
* @return
|
||||
* @return The new application
|
||||
*/
|
||||
public static Application createApplication(final String typeName,
|
||||
final String fragment,
|
||||
|
|
@ -175,7 +175,7 @@ public class Application extends Resource {
|
|||
* @param title
|
||||
* @param parent
|
||||
* @param createContainerGroup
|
||||
* @return
|
||||
* @return The new application
|
||||
*/
|
||||
public static Application createApplication(
|
||||
final String typeName,
|
||||
|
|
@ -205,7 +205,7 @@ public class Application extends Resource {
|
|||
* @param title
|
||||
* @param parent parent application
|
||||
* @param createContainerGroup
|
||||
* @return
|
||||
* @return The new application
|
||||
*/
|
||||
public static Application createApplication(
|
||||
final ApplicationType type,
|
||||
|
|
@ -233,7 +233,7 @@ public class Application extends Resource {
|
|||
* @param title descriptive name
|
||||
* @param parent
|
||||
* @param createContainerGroup
|
||||
* @return
|
||||
* @return The new application
|
||||
*/
|
||||
private static Application make(final ApplicationType type,
|
||||
final String fragment,
|
||||
|
|
@ -283,8 +283,8 @@ public class Application extends Resource {
|
|||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @param id The id of the application instance.
|
||||
* @return The application instance identified by {@code id}.
|
||||
*/
|
||||
public static Application retrieveApplication(BigDecimal id) {
|
||||
OID oid = new OID(BASE_DATA_OBJECT_TYPE, id);
|
||||
|
|
@ -294,8 +294,8 @@ public class Application extends Resource {
|
|||
|
||||
/**
|
||||
*
|
||||
* @param oid
|
||||
* @return
|
||||
* @param oid The {@link OID} of the application to retrieve.
|
||||
* @return The application instance identified by {@code oid}
|
||||
*/
|
||||
public static Application retrieveApplication(OID oid) {
|
||||
DataObject dataObject = SessionManager.getSession().retrieve(oid);
|
||||
|
|
@ -309,8 +309,8 @@ public class Application extends Resource {
|
|||
|
||||
/**
|
||||
*
|
||||
* @param dobj
|
||||
* @return
|
||||
* @param dobj A {@link DataObject} representing a application instance.
|
||||
* @return A DomainObject representing the application instance.
|
||||
*/
|
||||
public static Application retrieveApplication(DataObject dobj) {
|
||||
Assert.exists(dobj, DataObject.class);
|
||||
|
|
@ -324,11 +324,6 @@ public class Application extends Resource {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static Application getContainingApplication(ACSObject obj) {
|
||||
Assert.exists(obj, ACSObject.class);
|
||||
ACSObject result = obj.gimmeContainer();
|
||||
|
|
@ -342,8 +337,9 @@ public class Application extends Resource {
|
|||
|
||||
/**
|
||||
*
|
||||
* @param path
|
||||
* @return (Can return null.)
|
||||
* @param path Path of the application to retrieve
|
||||
* @return The application mounted at {@code path} or {@code null} if there is not such
|
||||
* application.
|
||||
*/
|
||||
public static Application retrieveApplicationForPath(String path) {
|
||||
|
||||
|
|
@ -397,7 +393,7 @@ public class Application extends Resource {
|
|||
/**
|
||||
* .
|
||||
* Ordered from most distant to closest ancestor.
|
||||
* @return
|
||||
* @return List of the ancestor applications.
|
||||
*/
|
||||
public List getAncestorApplications() {
|
||||
// This is the stupid implementation.
|
||||
|
|
@ -436,7 +432,7 @@ public class Application extends Resource {
|
|||
/**
|
||||
*
|
||||
* @param applicationType
|
||||
* @return
|
||||
* @return Collection of the child applications
|
||||
*/
|
||||
public ApplicationCollection getChildApplicationsForType(String applicationType) {
|
||||
ApplicationCollection children = getChildApplications();
|
||||
|
|
@ -583,7 +579,7 @@ public class Application extends Resource {
|
|||
*
|
||||
* @param applicationObjectType
|
||||
* @param path
|
||||
* @return
|
||||
* @return {@code true} if the application type is installed, {@code false} otherwise.
|
||||
*/
|
||||
public static boolean isInstalled(String applicationObjectType,
|
||||
String path) {
|
||||
|
|
@ -619,10 +615,6 @@ public class Application extends Resource {
|
|||
return canonicalURL;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getContextPath() {
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author
|
||||
* @author unknown
|
||||
*/
|
||||
public class PersonalPortalPage extends Page {
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import com.arsdigita.portal.Portlet;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author
|
||||
* @author unknown
|
||||
*/
|
||||
public class RSSFeedPortletEditorForm extends PortletConfigFormSection {
|
||||
|
||||
|
|
|
|||
|
|
@ -211,8 +211,6 @@ public class SeriesExtraXmlGenerator implements ExtraXMLGenerator {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
final Element volumesElem = parent.newChildElement("volumes");
|
||||
for (VolumeEntry entry : volumeList) {
|
||||
createVolumeXml(entry.getPublication(), entry.getVolumeOfSeries(), volumesElem, state);
|
||||
|
|
|
|||
Loading…
Reference in New Issue