Rohit Bajaj
asked on
keeping helper functions inside controller
HI,
I have following two helper kind of functions in my controller :
My controller functions do make use of this ?
Is it fine to keep them in controller ?
Thanks
I have following two helper kind of functions in my controller :
private String snippetFilename(String title, String mode) {
String filename = title.replaceAll("\\s", "_").replaceAll("\\W", "");
String extension = metaData.getExtensions(mode);
filename += "." + extension;
return filename;
}
private void parseHtml(Snippet snippet) {
snippet.setText(StringUtils.replaceEach(snippet.getText(), new String[]{"&", "\"", "<", ">"}, new String[]{"&", """, "<", ">"}));
}
My controller functions do make use of this ?
Is it fine to keep them in controller ?
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.