text
stringlengths 0
2.2M
|
---|
wsdvec.push_back(wsd);
|
}
|
else if(cs.markers.find("@Controller")!=cs.markers.end())
|
{
|
std::vector<Marker> controllers = cs.markers["@Controller"];
|
for (int var = 0; var < (int)controllers.size(); ++var) {
|
std::string url = controllers.at(var).getAttributeValue("path");
|
StringUtil::trim(url);
|
if(url=="")
|
{
|
logger << ("No url defined for Controller, skipping...") << std::endl;
|
continue;
|
}
|
std::string scope = controllers.at(var).getAttributeValue("scope");
|
StringUtil::trim(scope);
|
std::string clas = cs.getFullyQualifiedClassName();
|
StringUtil::trim(clas);
|
if(clas!="")
|
{
|
normalizeUrl(appName, url);
|
ConfigurationData::getInstance()->controllerObjectMap[appName][url] = clas;
|
Bean bean(clas,"",clas,scope,false,true,appName);
|
ConfigurationData::getInstance()->ffeadContext.addBean(bean);
|
}
|
logger << ("Adding Controller for " + (appName + url) + " :: " + clas) << std::endl;
|
}
|
}
|
else if(cs.markers.find("@AjaxInterface")!=cs.markers.end())
|
{
|
std::vector<Marker> ajaxintfs = cs.markers["@AjaxInterface"];
|
for (int var = 0; var < (int)ajaxintfs.size(); ++var) {
|
std::string url = ajaxintfs.at(var).getAttributeValue("path");
|
if(StringUtil::trimCopy(url)=="")
|
{
|
logger << ("No path defined for AjaxInterface, skipping...") << std::endl;
|
continue;
|
}
|
if(cs.markers.find("@Secure")!=cs.markers.end())
|
{
|
int totl = cs.markers["@Secure"].size();
|
SecureAspect aspect;
|
aspect.role = cs.markers["@Secure"].at(totl-1).getAttributeValue("role");
|
aspect.path = url;
|
normalizeUrl(appName, aspect.path);
|
bool valid = true;
|
if(StringUtil::trimCopy(aspect.role)=="")
|
{
|
logger << ("No role defined for Secure path, skipping...") << std::endl;
|
valid = false;
|
}
|
if(cs.markers["@Secure"].size()>1)
|
{
|
logger << ("Found more than one @Secure marker, only the last defined marker will be considered, ignoring others..") << std::endl;
|
}
|
std::string provName = cs.markers["@Secure"].at(totl-1).getAttributeValue("providerName");
|
if(StringUtil::trimCopy(provName)=="")
|
{
|
logger << ("No providerName defined for Secure path, skipping...") << std::endl;
|
valid = false;
|
}
|
if(valid && ConfigurationData::getInstance()->securityObjectMap[appName].find(provName)
|
!=ConfigurationData::getInstance()->securityObjectMap[appName].end())
|
{
|
Security securityObject = ConfigurationData::getInstance()->securityObjectMap[appName][provName];
|
if(securityObject.addAspect(aspect))
|
{
|
ConfigurationData::getInstance()->securityObjectMap[appName][provName] = securityObject;
|
logger << ("Security: Adding Secure Path => " + aspect.path + " , role => " + aspect.role) << std::endl;
|
}
|
}
|
else if(valid)
|
{
|
logger << ("Security Provider " + provName + " not found, skipping...") << std::endl;
|
}
|
}
|
if(url.find("*")==std::string::npos && url.find("regex(")==std::string::npos)
|
{
|
normalizeUrl(appName, url);
|
std::string clas = cs.getFullyQualifiedClassName();
|
ConfigurationData::getInstance()->ajaxInterfaceMap[appName][url] = clas;
|
pathvec.push_back(appName);
|
std::string usrincludes = defpath + "include/";
|
vecvp.push_back(usrincludes);
|
stat.push_back(false);
|
ajintpthMap[clas] = url;
|
afcd.push_back(clas);
|
logger << ("Adding Ajax Interface for " + (appName+url) + " :: " + clas) << std::endl;
|
isJsObjects = true;
|
}
|
else
|
{
|
logger << ("Skipping Ajax Interface as path contains */regex function") << std::endl;
|
}
|
}
|
}
|
else if(cs.markers.find("@Filter")!=cs.markers.end())
|
{
|
std::vector<Marker> filters = cs.markers["@Filter"];
|
for (int var = 0; var < (int)filters.size(); ++var) {
|
std::string url = filters.at(var).getAttributeValue("path");
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.