本文整理汇总了Java中restx.security.PermitAll类的典型用法代码示例。如果您正苦于以下问题:Java PermitAll类的具体用法?Java PermitAll怎么用?Java PermitAll使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PermitAll类属于restx.security包,在下文中一共展示了PermitAll类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: resolve
import restx.security.PermitAll; //导入依赖的package包/类
@PermitAll
@PUT("/projects/{projectName}/resolve")
public Project resolve(String projectName) {
checkNotNull(projectName); // TODO ça ne peut pas arriver
Project project = projectRepository.findByName(projectName);
if (project == null) {
return null;
}
LOGGER.debug("Try to resolve the project {}", project.getName());
project = dependenciesService.resolve(project);
projectRepository.update(project);
return project;
}
开发者ID:GozerProject,项目名称:gozer,代码行数:19,代码来源:ProjectResource.java
示例2: deleteDevice
import restx.security.PermitAll; //导入依赖的package包/类
@DELETE("/{workspace}/devices/{id}")
@PermitAll
public static Device deleteDevice(int workspace, int id) {
Workspace ws = WorkspaceManager.get(workspace);
Device device = ws.deleteDevice(id);
ws.save();
return device;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:10,代码来源:DevicesResource.java
示例3: postDevice
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/{workspace}/devices")
@PermitAll
public static Device postDevice(int workspace, Device msg) {
Workspace ws = WorkspaceManager.get(workspace);
Device device = ws.addDevice(msg);
ws.save();
return device;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:9,代码来源:DevicesResource.java
示例4: putDevice
import restx.security.PermitAll; //导入依赖的package包/类
@PUT("/{workspace}/devices/{id}")
@PermitAll
public Device putDevice(int workspace, int id, Device msg) {
Workspace ws = WorkspaceManager.get(workspace);
Device device = ws.updateDevice(id, msg);
ws.save();
return device;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:9,代码来源:DevicesResource.java
示例5: runRequest
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/coap")
@PermitAll
public CoapResponseJson runRequest(CoapRequest req) {
CoapClient c = new CoapClient();
c.setURI(req.getUri());
if (req.getMethod().toUpperCase().equals("PUT")) {
return new CoapResponseJson(c.put(req.getReqBody(), MediaTypeRegistry.TEXT_PLAIN));
} else if (req.getMethod().toUpperCase().equals("POST")) {
return new CoapResponseJson(c.post(req.getReqBody(), MediaTypeRegistry.TEXT_PLAIN));
}
return new CoapResponseJson(c.get());
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:13,代码来源:CoapResource.java
示例6: putQuestion
import restx.security.PermitAll; //导入依赖的package包/类
@PUT("/{workspace}/question/{id}")
@PermitAll
public Question putQuestion(int workspace, String id, Question q) {
List<Question> questions = questions(workspace);
for (Question question : questions) {
if (question.getId().equals(q.getId())) {
question.setAnswer(q.getAnswer());
question.setAnswerId(q.getAnswerId());
WorkspaceManager.get(workspace).addAnswer(question.sendResponse());
return q;
}
}
return q;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:15,代码来源:QuestionResource.java
示例7: copyWorkspace
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/{workspace}/copy")
@PermitAll
public static WorkspaceInfo copyWorkspace(int workspace, WorkspaceInfo body) {
Backup b = WorkspaceManager.get(workspace).getBackup();
WorkspaceInfo ws = WorkspaceManager.getInstance().createWorkspace(body);
WorkspaceManager.get(ws.getId()).loadBackup(b);
return ws;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:9,代码来源:WorkspaceResource.java
示例8: postQuery
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/{workspace}/queries")
@PermitAll
public static Query postQuery(int workspace, Query msg) {
Workspace ws = WorkspaceManager.get(workspace);
Query query = ws.addQuery(msg);
ws.save();
return query;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:9,代码来源:QueryResource.java
示例9: deleteQuery
import restx.security.PermitAll; //导入依赖的package包/类
@DELETE("/{workspace}/queries/{id}")
@PermitAll
public Query deleteQuery(int workspace, int id) {
Workspace ws = WorkspaceManager.get(workspace);
Query query = ws.deleteQuery(id);
ws.save();
return query;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:9,代码来源:QueryResource.java
示例10: putQuery
import restx.security.PermitAll; //导入依赖的package包/类
@PUT("/{workspace}/queries/{id}")
@PermitAll
public Query putQuery(int workspace, int id,
Query msg
) {
Workspace ws = WorkspaceManager.get(workspace);
Query query = ws.updateQuery(id, msg);
ws.save();
return query;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:11,代码来源:QueryResource.java
示例11: plan
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/{workspace}/plan")
@PermitAll
public QueryResult plan(int workspace, Query query) {
String result = null;
try {
result = WorkspaceManager.get(workspace).planMashup(query.getQuery(), query.getInput());
} catch (Exception ex) {
String error = "";
ArrayList<SemanticsErrors> errquery = N3Linter.lint(query.getQuery());
ArrayList<SemanticsErrors> errinput = N3Linter.lint(query.getInput());
if (!errquery.isEmpty()) {
error += "Query:\n" + toString(errquery) + "\n";
}
if (!errinput.isEmpty()) {
error += "Input:\n" + toString(errinput) + "\n";
}
if (ex.getMessage() != null) {
error = ex.getMessage() + "\n\n" + error;
}
return new QueryResult(error, errquery, errinput);
}
return new QueryResult(result, null, null);
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:28,代码来源:QueryResource.java
示例12: postBackup
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/{workspace}/all")
@PermitAll
public Backup postBackup(int workspace, Backup backup) {
Workspace ws = WorkspaceManager.get(workspace);
ws.loadBackup(backup);
return backup;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:8,代码来源:BackupResource.java
示例13: loadFile
import restx.security.PermitAll; //导入依赖的package包/类
@GET("/{workspace}/load/{file}")
@PermitAll
public Backup loadFile(int workspace, String file) {
ObjectMapper mapper = new ObjectMapper();
try {
Backup backup = mapper.readValue(IOUtils.toString(getClass().getResourceAsStream("/" + file + ".json")), Backup.class);
return postBackup(workspace, backup);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:14,代码来源:BackupResource.java
示例14: useCases
import restx.security.PermitAll; //导入依赖的package包/类
@GET("/usecases")
@PermitAll
public ArrayList<UseCase> useCases() {
ArrayList<UseCase> usecases = new ArrayList<UseCase>();
usecases.add(new UseCase("Empty configuration", "empty"));
usecases.add(new UseCase("Thermostat with semantic questions", "thermostat"));
usecases.add(new UseCase("Thermostat", "thermostat_no_question"));
usecases.add(new UseCase("Moving Robots", "bots"));
usecases.add(new UseCase("Smart Home", "smarthome"));
usecases.add(new UseCase("DEMO Queries", "demo_queries"));
return usecases;
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:13,代码来源:BackupResource.java
示例15: simulate
import restx.security.PermitAll; //导入依赖的package包/类
@PermitAll
@GET("/simulate")
public ReactorResult simulate(ReactorDefinition definition) {
SimulatorServer.validateReactorDefinition(definition);
BigReactorSimulator simulator = new BigReactorSimulator(
definition.isActivelyCooled(),
SimulatorServer.MAX_NUMBER_OF_TICKS
);
FakeReactorWorld fakeReactorWorld = FakeReactorWorld.makeReactor(
definition.getLayout(),
definition.getxSize(),
definition.getzSize(),
definition.getHeight(),
definition.getControlRodInsertion()
);
ReactorResult rawResult = simulator.simulate(fakeReactorWorld);
return new ReactorResult()
.setCoolantTemperature(rawResult.coolantTemperature)
.setFuelConsumption(rawResult.fuelConsumption)
// for display purposes
.setFuelFertility(rawResult.fuelFertility * 100)
.setFuelHeat(rawResult.fuelHeat)
.setOutput(rawResult.output)
.setReactorDefinition(definition)
.setReactorHeat(rawResult.reactorHeat);
}
开发者ID:sidoh,项目名称:reactor_simulator,代码行数:29,代码来源:SimulatorResource.java
示例16: optimizeInsertion
import restx.security.PermitAll; //导入依赖的package包/类
@PermitAll
@GET("/optimize_insertion")
public Short optimizeInsertion(ReactorDefinition definition) {
SimulatorServer.validateReactorDefinition(definition);
BigReactorSimulator simulator = new BigReactorSimulator(
definition.isActivelyCooled(),
SimulatorServer.MAX_NUMBER_OF_TICKS
);
return new LinearControlRodOptimizer(
ResultMetrics.efficiency(),
simulator
).optimizeInsertion(definition);
}
开发者ID:sidoh,项目名称:reactor_simulator,代码行数:16,代码来源:OptimizeInsertionResource.java
示例17: texquery
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/texquery")
@PermitAll
public MathRequest texquery( MathRequest q ) {
if( q.getType() == null || "".equals( q.getType()) ){
q.setType( "tex" );
}
return q.run();
}
开发者ID:physikerwelt,项目名称:mathsearch-backend-basex,代码行数:9,代码来源:BaseXResource.java
示例18: xquery
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/xquery")
@PermitAll
public MathRequest xquery( MathRequest q ) {
if( q.getType() == null || "".equals( q.getType()) ){
q.setType( "xquery" );
}
return q.run();
}
开发者ID:physikerwelt,项目名称:mathsearch-backend-basex,代码行数:9,代码来源:BaseXResource.java
示例19: AnalyeWikiText
import restx.security.PermitAll; //导入依赖的package包/类
@POST("/AnalyzeWikiText")
@PermitAll
public WikiDocumentOutput AnalyeWikiText(WikiTextRequest input) {
try {
return finder.outDocFromText(config, input.wikitext);
} catch (Exception e) {
e.printStackTrace();
return new WikiDocumentOutput(false);
}
}
开发者ID:ag-gipp,项目名称:mathosphere,代码行数:11,代码来源:MlpResource.java
示例20: getAllDomains
import restx.security.PermitAll; //导入依赖的package包/类
@GET("/domains")
@PermitAll
public Iterable<WineDomain> getAllDomains(Optional<String> aoc) {
if (aoc.isPresent()) {
return domainRepository.getDomainsByAOC(aoc.get());
}
return domainRepository.getAllDomains();
}
开发者ID:vinoApp,项目名称:vino,代码行数:9,代码来源:DomainsResource.java
注:本文中的restx.security.PermitAll类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论