本文整理了Java中org.restlet.Application.getName()
方法的一些代码示例,展示了Application.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getName()
方法的具体详情如下:
包路径:org.restlet.Application
类名称:Application
方法名:getName
[英]Returns the display name.
[中]返回显示名称。
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public String represent() {
return "Welcome to the " + getApplication().getName() + " !";
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
@Override
public Representation getRepresentation(Status status, Request request,
Response response) {
// Create the data model
Map<String, String> dataModel = new ConcurrentHashMap<String, String>();
dataModel.put("applicationName", Application.getCurrent().getName());
dataModel.put("statusDescription", response.getStatus()
.getDescription());
dataModel.put("statusReasonPhrase", response.getStatus()
.getReasonPhrase());
// Load the FreeMarker template
Representation mailFtl = new ClientResource(
LocalReference.createClapReference(getClass().getPackage())
+ "/MailStatus.ftl").get();
// Wraps the bean with a FreeMarker representation
return new TemplateRepresentation(mailFtl, dataModel,
MediaType.TEXT_HTML);
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
@Override
public Representation getRepresentation(Status status, Request request,
Response response) {
// Create the data model
Map<String, String> dataModel = new TreeMap<String, String>();
dataModel.put("applicationName", Application.getCurrent().getName());
dataModel.put("statusReasonPhrase", response.getStatus()
.getReasonPhrase());
dataModel.put("statusDescription", response.getStatus()
.getDescription());
// Load the FreeMarker template
Representation mailFtl = new ClientResource(
LocalReference.createClapReference(getClass().getPackage())
+ "/MailStatus.ftl").get();
// Wraps the bean with a FreeMarker representation
return new TemplateRepresentation(mailFtl, dataModel,
MediaType.TEXT_HTML);
}
代码示例来源:origin: org.restlet.jse/org.restlet.ext.platform
contract.setDescription(StringUtils.nullToEmpty(application
.getDescription()));
if (application.toString().equals(application.getName())) {
LOGGER.log(Level.WARNING,
"Please provide a name to your application by overriding its method getName. Used "
contract.setName(application.getClass().getSimpleName());
} else {
contract.setName(application.getName());
代码示例来源:origin: org.restlet.jee/org.restlet.ext.platform
contract.setDescription(StringUtils.nullToEmpty(application
.getDescription()));
if (application.toString().equals(application.getName())) {
LOGGER.log(Level.WARNING,
"Please provide a name to your application by overriding its method getName. Used "
contract.setName(application.getClass().getSimpleName());
} else {
contract.setName(application.getName());
代码示例来源:origin: org.restlet.gae/org.restlet.ext.platform
contract.setDescription(StringUtils.nullToEmpty(application
.getDescription()));
if (application.toString().equals(application.getName())) {
LOGGER.log(Level.WARNING,
"Please provide a name to your application by overriding its method getName. Used "
contract.setName(application.getClass().getSimpleName());
} else {
contract.setName(application.getName());
代码示例来源:origin: org.restlet.osgi/org.restlet.ext.platform
contract.setDescription(StringUtils.nullToEmpty(application
.getDescription()));
if (application.toString().equals(application.getName())) {
LOGGER.log(Level.WARNING,
"Please provide a name to your application by overriding its method getName. Used "
contract.setName(application.getClass().getSimpleName());
} else {
contract.setName(application.getName());
代码示例来源:origin: org.restlet.jee/org.restlet.ext.apispark
contract.setDescription(StringUtils.nullToEmpty(application
.getDescription()));
if (application.toString().equals(application.getName())) {
LOGGER.log(Level.WARNING,
"Please provide a name to your application by overriding its method getName. Used "
contract.setName(application.getClass().getSimpleName());
} else {
contract.setName(application.getName());
代码示例来源:origin: org.restlet.osgi/org.restlet
getLogger()
.severe("Unable to start the application \""
+ application.getName()
+ "\". Client connector for protocol "
+ clientProtocol.getName()
getLogger()
.severe("Unable to start the application \""
+ application.getName()
+ "\". Server connector for protocol "
+ serverProtocol.getName()
内容来源于网络,如有侵权,请联系作者删除!