mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
fix build problem with message bundles, changed list to map in wizard config, added null checks when using custom types and fixed topic.gif
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2560 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -57,6 +57,13 @@
|
|||||||
<fileset dir="${dir.config.webclient}" excludes="**/*.sample" />
|
<fileset dir="${dir.config.webclient}" excludes="**/*.sample" />
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
|
<!-- clean up previously generated properties files -->
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${dir.assemble}/WEB-INF/classes/alfresco/messages">
|
||||||
|
<include name="*_en_US.properties" />
|
||||||
|
</fileset>
|
||||||
|
</delete>
|
||||||
|
|
||||||
<copy todir="${dir.assemble}/WEB-INF/classes/alfresco/messages">
|
<copy todir="${dir.assemble}/WEB-INF/classes/alfresco/messages">
|
||||||
<fileset dir="${dir.assemble}/WEB-INF/classes/alfresco/messages"/>
|
<fileset dir="${dir.assemble}/WEB-INF/classes/alfresco/messages"/>
|
||||||
<mapper type="glob" from="*.properties" to="*_en_US.properties"/>
|
<mapper type="glob" from="*.properties" to="*_en_US.properties"/>
|
||||||
|
@@ -584,6 +584,8 @@ public class AdvancedSearchBean
|
|||||||
for (String type : types)
|
for (String type : types)
|
||||||
{
|
{
|
||||||
QName idQName = Repository.resolveToQName(type);
|
QName idQName = Repository.resolveToQName(type);
|
||||||
|
if (idQName != null)
|
||||||
|
{
|
||||||
TypeDefinition typeDef = dictionaryService.getType(idQName);
|
TypeDefinition typeDef = dictionaryService.getType(idQName);
|
||||||
|
|
||||||
if (typeDef != null && dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_CONTENT))
|
if (typeDef != null && dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_CONTENT))
|
||||||
@@ -600,6 +602,7 @@ public class AdvancedSearchBean
|
|||||||
this.contentTypes.add(new SelectItem(idQName.toString(), label));
|
this.contentTypes.add(new SelectItem(idQName.toString(), label));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// make sure the list is sorted by the label
|
// make sure the list is sorted by the label
|
||||||
QuickSort sorter = new QuickSort(this.contentTypes, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
QuickSort sorter = new QuickSort(this.contentTypes, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||||
|
@@ -508,6 +508,8 @@ public abstract class BaseContentWizard extends AbstractWizardBean
|
|||||||
for (ConfigElement child : typesCfg.getChildren())
|
for (ConfigElement child : typesCfg.getChildren())
|
||||||
{
|
{
|
||||||
QName idQName = Repository.resolveToQName(child.getAttribute("name"));
|
QName idQName = Repository.resolveToQName(child.getAttribute("name"));
|
||||||
|
if (idQName != null)
|
||||||
|
{
|
||||||
TypeDefinition typeDef = this.dictionaryService.getType(idQName);
|
TypeDefinition typeDef = this.dictionaryService.getType(idQName);
|
||||||
|
|
||||||
if (typeDef != null &&
|
if (typeDef != null &&
|
||||||
@@ -542,6 +544,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean
|
|||||||
this.objectTypes.add(new SelectItem(idQName.toString(), label));
|
this.objectTypes.add(new SelectItem(idQName.toString(), label));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// make sure the list is sorted by the label
|
// make sure the list is sorted by the label
|
||||||
QuickSort sorter = new QuickSort(this.objectTypes, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
QuickSort sorter = new QuickSort(this.objectTypes, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||||
|
@@ -713,7 +713,7 @@ public class WebClientConfigTest extends BaseTest
|
|||||||
assertEquals("description-id", "advanced_space_details_description", wizard.getDescriptionId());
|
assertEquals("description-id", "advanced_space_details_description", wizard.getDescriptionId());
|
||||||
assertNull("title should be null", wizard.getTitle());
|
assertNull("title should be null", wizard.getTitle());
|
||||||
assertNull("description should be null", wizard.getDescription());
|
assertNull("description should be null", wizard.getDescription());
|
||||||
List<StepConfig> steps = wizard.getSteps();
|
List<StepConfig> steps = wizard.getStepsAsList();
|
||||||
assertNotNull("steps should not be null", steps);
|
assertNotNull("steps should not be null", steps);
|
||||||
|
|
||||||
// retrieve step1 information and check it is correct
|
// retrieve step1 information and check it is correct
|
||||||
|
@@ -158,7 +158,7 @@ public class WizardsConfigElement extends ConfigElementAdapter
|
|||||||
{
|
{
|
||||||
protected String name;
|
protected String name;
|
||||||
protected String managedBean;
|
protected String managedBean;
|
||||||
protected List<StepConfig> steps = new ArrayList<StepConfig>(4);
|
protected Map<String, StepConfig> steps = new LinkedHashMap<String, StepConfig>(4);
|
||||||
|
|
||||||
public WizardConfig(String name, String bean,
|
public WizardConfig(String name, String bean,
|
||||||
String title, String titleId,
|
String title, String titleId,
|
||||||
@@ -185,7 +185,7 @@ public class WizardsConfigElement extends ConfigElementAdapter
|
|||||||
|
|
||||||
public void addStep(StepConfig step)
|
public void addStep(StepConfig step)
|
||||||
{
|
{
|
||||||
this.steps.add(step);
|
this.steps.put(step.getName(), step);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumberSteps()
|
public int getNumberSteps()
|
||||||
@@ -193,25 +193,26 @@ public class WizardsConfigElement extends ConfigElementAdapter
|
|||||||
return this.steps.size();
|
return this.steps.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StepConfig> getSteps()
|
public Map<String, StepConfig> getSteps()
|
||||||
{
|
{
|
||||||
return this.steps;
|
return this.steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<StepConfig> getStepsAsList()
|
||||||
|
{
|
||||||
|
List<StepConfig> stepList = new ArrayList<StepConfig>(this.steps.size());
|
||||||
|
|
||||||
|
for (StepConfig stepCfg : this.steps.values())
|
||||||
|
{
|
||||||
|
stepList.add(stepCfg);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stepList;
|
||||||
|
}
|
||||||
|
|
||||||
public StepConfig getStepByName(String name)
|
public StepConfig getStepByName(String name)
|
||||||
{
|
{
|
||||||
StepConfig step = null;
|
return this.steps.get(name);
|
||||||
|
|
||||||
for (StepConfig currentStep : this.steps)
|
|
||||||
{
|
|
||||||
if (currentStep.getName().equals(name))
|
|
||||||
{
|
|
||||||
step = currentStep;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return step;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user