mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Fixed minor issues reported by sonar (Constant Name)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63803 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -55,7 +55,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
|
|||||||
private static final StoreRef SPACES_STORE = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
|
private static final StoreRef SPACES_STORE = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
|
||||||
|
|
||||||
/** Charset name */
|
/** Charset name */
|
||||||
private static final String charsetName = "UTF-8";
|
private static final String CHARSET_NAME = "UTF-8";
|
||||||
|
|
||||||
/** Importer service */
|
/** Importer service */
|
||||||
private ImporterService importerService;
|
private ImporterService importerService;
|
||||||
@@ -252,7 +252,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
|
|||||||
+ "' import file could not be found!"); }
|
+ "' import file could not be found!"); }
|
||||||
|
|
||||||
// Import view
|
// Import view
|
||||||
Reader viewReader = new InputStreamReader(is, charsetName);
|
Reader viewReader = new InputStreamReader(is, CHARSET_NAME);
|
||||||
Location location = new Location(filePlan);
|
Location location = new Location(filePlan);
|
||||||
importerService.importView(viewReader, location, null, null);
|
importerService.importView(viewReader, location, null, null);
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ public class BootstrapTestDataGet extends DeclarativeWebScript
|
|||||||
private static final String ARG_IMPORT = "import";
|
private static final String ARG_IMPORT = "import";
|
||||||
|
|
||||||
private static final String XML_IMPORT = "alfresco/module/org_alfresco_module_rm/dod5015/DODExampleFilePlan.xml";
|
private static final String XML_IMPORT = "alfresco/module/org_alfresco_module_rm/dod5015/DODExampleFilePlan.xml";
|
||||||
private static final String charsetName = "UTF-8";
|
private static final String CHARSET_NAME = "UTF-8";
|
||||||
|
|
||||||
private static final StoreRef SPACES_STORE = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
|
private static final StoreRef SPACES_STORE = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
|
||||||
|
|
||||||
@@ -193,11 +193,11 @@ public class BootstrapTestDataGet extends DeclarativeWebScript
|
|||||||
Reader viewReader = null;
|
Reader viewReader = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
viewReader = new InputStreamReader(is, charsetName);
|
viewReader = new InputStreamReader(is, CHARSET_NAME);
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException error)
|
catch (UnsupportedEncodingException error)
|
||||||
{
|
{
|
||||||
throw new AlfrescoRuntimeException("The Character Encoding '" + charsetName + "' is not supported.", error);
|
throw new AlfrescoRuntimeException("The Character Encoding '" + CHARSET_NAME + "' is not supported.", error);
|
||||||
}
|
}
|
||||||
Location location = new Location(filePlan);
|
Location location = new Location(filePlan);
|
||||||
importerService.importView(viewReader, location, null, null);
|
importerService.importView(viewReader, location, null, null);
|
||||||
|
@@ -41,7 +41,7 @@ import org.springframework.extensions.webscripts.WebScriptRequest;
|
|||||||
public class DodCustomTypesGet extends DeclarativeWebScript
|
public class DodCustomTypesGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
// TODO Investigate a way of not hard-coding the 4 custom types here.
|
// TODO Investigate a way of not hard-coding the 4 custom types here.
|
||||||
private final static List<QName> customTypeAspects = Arrays.asList(new QName[]{DOD5015Model.ASPECT_SCANNED_RECORD,
|
private final static List<QName> CUSTOM_TYPE_ASPECTS = Arrays.asList(new QName[]{DOD5015Model.ASPECT_SCANNED_RECORD,
|
||||||
DOD5015Model.ASPECT_PDF_RECORD, DOD5015Model.ASPECT_DIGITAL_PHOTOGRAPH_RECORD, DOD5015Model.ASPECT_WEB_RECORD});
|
DOD5015Model.ASPECT_PDF_RECORD, DOD5015Model.ASPECT_DIGITAL_PHOTOGRAPH_RECORD, DOD5015Model.ASPECT_WEB_RECORD});
|
||||||
|
|
||||||
private DictionaryService dictionaryService;
|
private DictionaryService dictionaryService;
|
||||||
@@ -57,7 +57,7 @@ public class DodCustomTypesGet extends DeclarativeWebScript
|
|||||||
Map<String, Object> model = new HashMap<String, Object>();
|
Map<String, Object> model = new HashMap<String, Object>();
|
||||||
|
|
||||||
List<AspectDefinition> customTypeAspectDefinitions = new ArrayList<AspectDefinition>(4);
|
List<AspectDefinition> customTypeAspectDefinitions = new ArrayList<AspectDefinition>(4);
|
||||||
for (QName aspectQName : customTypeAspects)
|
for (QName aspectQName : CUSTOM_TYPE_ASPECTS)
|
||||||
{
|
{
|
||||||
AspectDefinition nextAspectDef = dictionaryService.getAspect(aspectQName);
|
AspectDefinition nextAspectDef = dictionaryService.getAspect(aspectQName);
|
||||||
customTypeAspectDefinitions.add(nextAspectDef);
|
customTypeAspectDefinitions.add(nextAspectDef);
|
||||||
|
@@ -51,10 +51,10 @@ public class RMMetaDataGet extends DeclarativeWebScript
|
|||||||
private static final String PARAM_EXTENDED = "extended";
|
private static final String PARAM_EXTENDED = "extended";
|
||||||
|
|
||||||
/** NodeRef pattern */
|
/** NodeRef pattern */
|
||||||
private static final Pattern nodeRefPattern = Pattern.compile(".+://.+/.+");
|
private static final Pattern NODE_REF_PATTERN = Pattern.compile(".+://.+/.+");
|
||||||
|
|
||||||
/** QName pattern */
|
/** QName pattern */
|
||||||
private static final Pattern qnamePattern = Pattern.compile(".+:[^=,]+");
|
private static final Pattern QNAME_PATTERN = Pattern.compile(".+:[^=,]+");
|
||||||
|
|
||||||
/** Namespace service */
|
/** Namespace service */
|
||||||
private NamespaceService namespaceService;
|
private NamespaceService namespaceService;
|
||||||
@@ -108,7 +108,7 @@ public class RMMetaDataGet extends DeclarativeWebScript
|
|||||||
String type = req.getParameter(PARAM_TYPE);
|
String type = req.getParameter(PARAM_TYPE);
|
||||||
if (type != null && type.length() != 0 && type.indexOf(':') != -1)
|
if (type != null && type.length() != 0 && type.indexOf(':') != -1)
|
||||||
{
|
{
|
||||||
Matcher m = qnamePattern.matcher(type);
|
Matcher m = QNAME_PATTERN.matcher(type);
|
||||||
if (m.matches() == true)
|
if (m.matches() == true)
|
||||||
{
|
{
|
||||||
QName qname = QName.createQName(type, namespaceService);
|
QName qname = QName.createQName(type, namespaceService);
|
||||||
@@ -125,7 +125,7 @@ public class RMMetaDataGet extends DeclarativeWebScript
|
|||||||
// quick test before running slow match for full NodeRef pattern
|
// quick test before running slow match for full NodeRef pattern
|
||||||
if (nodeRef.indexOf(':') != -1)
|
if (nodeRef.indexOf(':') != -1)
|
||||||
{
|
{
|
||||||
Matcher m = nodeRefPattern.matcher(nodeRef);
|
Matcher m = NODE_REF_PATTERN.matcher(nodeRef);
|
||||||
if (m.matches())
|
if (m.matches())
|
||||||
{
|
{
|
||||||
NodeRef nodeRefObj = new NodeRef(nodeRef);
|
NodeRef nodeRefObj = new NodeRef(nodeRef);
|
||||||
|
Reference in New Issue
Block a user