blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
332
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
50
| license_type
stringclasses 2
values | repo_name
stringlengths 7
115
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 557
values | visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 17
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 82
values | src_encoding
stringclasses 28
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
5.41M
| extension
stringclasses 11
values | content
stringlengths 7
5.41M
| authors
listlengths 1
1
| author
stringlengths 0
161
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0733d29c9f58096781c3ef12ff83307ce5f361c0
|
459d09199bd0ce31c2a4e04c00ff2ffb9a3ac88a
|
/basicdrones/src/main/java/ar/com/proyecto/basicwardrobe/models/responses/GenericResponse.java
|
b1dccf8bf54d672644ed6dc1d85c30805f58455d
|
[] |
no_license
|
Sophie-134/BasicDrones
|
ec61c62efda0397d9ee5b515f20dff83f724fd6c
|
073ab0b04b81a85b74888f86d577270264086f1c
|
refs/heads/master
| 2023-01-02T08:36:45.294855 | 2020-10-29T02:03:58 | 2020-10-29T02:03:58 | 296,167,044 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 175 |
java
|
package ar.com.proyecto.basicwardrobe.models.responses;
public class GenericResponse {
public boolean isOk = false;
public int id;
public String message = "";
}
|
[
"[email protected]"
] | |
2b56a99395baab2845094ec23aff9e13fc9531d2
|
a08ecb4b7313cbe73da24940da9aed3a726a9db5
|
/app/src/main/java/com/webgurus/utils/UtilsFound.java
|
03e4907afb5c355feb5d01ef339fe1e23b4a9391
|
[] |
no_license
|
subhamkotiyal/SapphireAttendance
|
440c63aeb98ff64472066eafaa4710107360d8ff
|
14ffecbac14215178a03c9f2037ba62ba407bbcb
|
refs/heads/main
| 2023-06-27T02:32:20.944617 | 2021-07-06T19:47:43 | 2021-07-06T19:47:43 | 383,581,716 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,085 |
java
|
package com.webgurus.utils;
import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.content.ComponentName;
import android.content.Context;
import android.os.Build;
import androidx.annotation.RequiresApi;
import com.webgurus.MyService;
public class UtilsFound {
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public static void scheduleJob(Context context){
ComponentName serviceComponent = new ComponentName(context, MyService.class);
JobInfo.Builder builder = new JobInfo.Builder(0, serviceComponent);
builder.setMinimumLatency(1 * 1000); // wait at least
builder.setOverrideDeadline(3 * 1000); // maximum delay
//builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED); // require unmetered network
//builder.setRequiresDeviceIdle(true); // device should be idle
//builder.setRequiresCharging(false); // we don't care if the device is charging or not
JobScheduler jobScheduler = context.getSystemService(JobScheduler.class);
jobScheduler.schedule(builder.build());
}
}
|
[
"[email protected]"
] | |
91e0f3eac08445a228d6c4e258c48146dd5c1842
|
378c391871a638412929b91674a506ecda35b178
|
/CloudbrushGPU/src/Brush/CutChimericLinks.java
|
27192abf8f61f7e88bb94644e92d13eb53575407
|
[] |
no_license
|
zenlc2000/CloudbrushGPU
|
ef0df3fef965c2b720f07401dc0a7ea03318f851
|
7f843207d5067c8bcba104ad9997a62233024d3d
|
refs/heads/master
| 2021-01-21T00:21:12.936752 | 2015-03-04T22:28:48 | 2015-03-04T22:28:48 | 23,367,721 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 17,501 |
java
|
/*
CutChimericLinks.java
2012 Ⓒ CloudBrush, developed by Chien-Chih Chen ([email protected]),
released under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
at: https://github.com/ice91/CloudBrush
*/
package Brush;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
//import java.util.HashMap;
//import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
//import java.util.Map;
//import java.util.Set;
//import java.util.Collections;
import java.util.Comparator;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.FileOutputFormat;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reducer;
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.RunningJob;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.hadoop.mapred.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.apache.log4j.Logger;
public class CutChimericLinks extends Configured implements Tool
{
private static final Logger sLogger = Logger.getLogger(CutChimericLinks.class);
//\\\\\\\\\\\\\\\\\\\\\\\\\\\ String comparison
public static float fastcomparsion(String word1, String word2){
float result = 0;
if (word1.length() < word2.length()){
word2 = word2.substring(0, word1.length());
} else {
word1 = word1.substring(0, word2.length());
}
//int distance1 = Node.getLevenshteinDistance(word1, word2);
int distance1 = 0;
int gap = 0;
for (int i=0; i < word1.length(); i++) {
if (word1.charAt(i) != word2.charAt(i)) {
distance1 = distance1 + 1/* + gap*/;
gap = gap + 1;
} else {
gap = 0;
}
}
result = (float)distance1 / (float)word1.length();
return result;
}
// CutChimericLinksMapper
///////////////////////////////////////////////////////////////////////////
public static class CutChimericLinksMapper extends MapReduceBase
implements Mapper<LongWritable, Text, Text, Text>
{
@SuppressWarnings("unused")
private static int K = 0;
/*public static int MAXBUBBLELEN = 0;*/
public void configure(JobConf job)
{
K = Integer.parseInt(job.get("K"));
/*MAXBUBBLELEN = Integer.parseInt(job.get("MAXBUBBLELEN"));*/
}
public void map(LongWritable lineid, Text nodetxt,
OutputCollector<Text, Text> output, Reporter reporter)
throws IOException
{
Node node = new Node();
node.fromNodeMsg(nodetxt.toString());
// int fdegree = node.degree("f");
// int rdegree = node.degree("r");
int tips = 0;
for(String key : Node.edgetypes ) {
List<String> edges = node.getEdges(key);
if (edges != null)
{
for(int i = 0; i < edges.size(); i++){
String [] vals = edges.get(i).split("!");
String edge_id = vals[0];
String oval_size = vals[1];
String con = Node.flip_link(key);
output.collect(new Text(edge_id), new Text(Node.DARKMSG + "\t" + con + "\t" + node.getNodeId() + "\t" + node.str_raw() + "\t" + oval_size + "\t" + node.cov() + "\t" + tips));
}
}
}
output.collect(new Text(node.getNodeId()), new Text(node.toNodeMsg()));
reporter.incrCounter("Brush", "nodes", 1);
}
}
// CutChimericLinksReducer
///////////////////////////////////////////////////////////////////////////
public static class CutChimericLinksReducer extends MapReduceBase
implements Reducer<Text, Text, Text, Text>
{
// private static int K = 0;
// private static int READLEN = 0;
private static float majority = 0.6f;
private static float PWM_N = 0.1f;
public void configure(JobConf job) {
// K = Integer.parseInt(job.get("K"));
// READLEN = (int)Long.parseLong(job.get("READLENGTH"));
majority = Float.parseFloat(job.get("MAJORITY"));
PWM_N = Float.parseFloat(job.get("PWM_N"));
}
public class EdgeInfo
{
public String id;
public String str;
public String edge_type;
public int overlap_size;
public float cov;
// public int tips;
// for gray edge
public EdgeInfo(String[] vals, int offset) throws IOException
{
id = vals[offset+1];
edge_type = vals[offset+0];
str = vals[offset+2];
overlap_size = Integer.parseInt(vals[offset+3]);
cov = Float.parseFloat(vals[offset+4]);
// tips = Integer.parseInt(vals[offset+5]);
// for black edge's end tag
}
// for black edge
public EdgeInfo(String con1, String node_id1, String str_raw1, int oval_size1, float cov1/*, int tips1*/){
id = node_id1;
edge_type = con1;
str = str_raw1;
overlap_size = oval_size1;
cov = cov1;
//tips = tips1;
}
public String toString()
{
return edge_type + " " + id + " " + overlap_size + " " + str + " " + cov;
}
}
class EdgeComparator implements Comparator<EdgeInfo> {
public int compare(EdgeInfo element1, EdgeInfo element2) {
EdgeInfo obj1 = element1;
EdgeInfo obj2 = element2;
// con + "|" + node_id + "|" + str_raw + "|" + oval_size + "|" +
// cov + "|" + end;
if ((Node.dna2str(obj1.str).length() - obj1.overlap_size) - (Node
.dna2str(obj2.str).length() - obj2.overlap_size) > 0) {
return -1;
}
if ((Node.dna2str(obj1.str).length() - obj1.overlap_size) - (Node
.dna2str(obj2.str).length() - obj2.overlap_size) < 0) {
return 1;
} else {
return 0;
}
}
}
class OvelapSizeComparator implements Comparator<EdgeInfo> {
public int compare(EdgeInfo element1, EdgeInfo element2) {
EdgeInfo obj1 = element1;
EdgeInfo obj2 = element2;
if (obj1.overlap_size - obj2.overlap_size > 0) {
return -1;
}
if (obj1.overlap_size - obj2.overlap_size < 0) {
return 1;
}
if (obj1.overlap_size - obj2.overlap_size == 0) {
return 0;
}
if (obj1.str.length() - obj2.str.length() < 0) {
return -1;
}
if (obj1.str.length() - obj2.str.length() > 0) {
return 1;
}
if (obj1.str.length() - obj2.str.length() == 0) {
return 0;
}
if (obj1.id.compareTo(obj2.id) < 0) {
return -1;
}
if (obj1.id.compareTo(obj2.id) > 0) {
return 1;
}
else{
return 1;
}
}
}
class OvelapSizeComparator_f implements Comparator<EdgeInfo> {
public int compare(EdgeInfo element1, EdgeInfo element2) {
EdgeInfo obj1 = element1;
EdgeInfo obj2 = element2;
if (obj1.overlap_size - obj2.overlap_size > 0) {
return -1;
}
if (obj1.overlap_size - obj2.overlap_size < 0) {
return 1;
}
if (obj1.overlap_size - obj2.overlap_size == 0) {
return 0;
}
if (obj1.str.length() - obj2.str.length() < 0) {
return -1;
}
if (obj1.str.length() - obj2.str.length() > 0) {
return 1;
}
if (obj1.str.length() - obj2.str.length() == 0) {
return 1;
}
if (obj1.id.compareTo(obj2.id) < 0) {
return -1;
}
if (obj1.id.compareTo(obj2.id) > 0) {
return 1;
} else {
return 0;
}
}
}
class OvelapSizeComparator_r implements Comparator<EdgeInfo> {
public int compare(EdgeInfo element1, EdgeInfo element2) {
EdgeInfo obj1 = element1;
EdgeInfo obj2 = element2;
if (obj1.overlap_size - obj2.overlap_size > 0) {
return -1;
}
if (obj1.overlap_size - obj2.overlap_size < 0) {
return 1;
}
if (obj1.overlap_size - obj2.overlap_size == 0) {
return 0;
}
if (obj1.str.length() - obj2.str.length() < 0) {
return -1;
}
if (obj1.str.length() - obj2.str.length() > 0) {
return 1;
}
if (obj1.str.length() - obj2.str.length() == 0) {
return 0;
}
if (obj1.id.compareTo(obj2.id) < 0) {
return 1;
}
if (obj1.id.compareTo(obj2.id) > 0) {
return -1;
} else {
return 0;
}
}
}
public void reduce(Text nodeid, Iterator<Text> iter,
OutputCollector<Text, Text> output, Reporter reporter)
throws IOException
{
Node node = new Node(nodeid.toString());
List<EdgeInfo> flist = new ArrayList<EdgeInfo>();
List<EdgeInfo> rlist = new ArrayList<EdgeInfo>();
int sawnode = 0;
while(iter.hasNext())
{
String msg = iter.next().toString();
//System.err.println(key.toString() + "\t" + msg);
String [] vals = msg.split("\t");
if (vals[0].equals(Node.NODEMSG))
{
node.parseNodeMsg(vals, 0);
sawnode++;
}
else if (vals[0].equals(Node.DARKMSG))
{
EdgeInfo ei = new EdgeInfo(vals[1], vals[2], vals[3], Integer.parseInt(vals[4]), Float.parseFloat(vals[5]));
//blist.add(ei);
if (ei.edge_type.charAt(0) == 'f') {
flist.add(ei);
} else if (ei.edge_type.charAt(0) == 'r') {
rlist.add(ei);
}
}
else
{
throw new IOException("Unknown msgtype: " + msg);
}
}
if (sawnode != 1)
{
throw new IOException("ERROR: Didn't see exactly 1 nodemsg (" + sawnode + ") for " + nodeid.toString());
}
//\\\
EdgeInfo edge = null;
// int Consensus_threshold = (READLEN - K)/2;
if (flist.size() > 1) {
Collections.sort(flist, new OvelapSizeComparator_f());
//\\PWM
List<String> f_edge_list = new ArrayList<String>();
EdgeInfo f_edge = null;
String f_consensus = "";
for(int i = 0; i < flist.size(); i++) {
f_edge = flist.get(i);
String str = Node.dna2str(f_edge.str);
String str_cut = "";
if (f_edge.edge_type.charAt(1) == 'r'){
str = Node.rc(str);
}
str_cut = str.substring(f_edge.overlap_size);
f_edge_list.add(str_cut+"!"+f_edge.cov);
}
f_consensus = Node.Consensus(f_edge_list, majority, PWM_N);
//f_consensus = Node.Consensus2(f_edge_list, PWM_N);
//\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (f_consensus != null /*&& f_consensus.length() >= Consensus_threshold*/) {
for(int i = 0; i < flist.size(); i++) {
edge= flist.get(i);
String str = Node.dna2str(edge.str);
if (edge.edge_type.charAt(1) == 'r'){
str = Node.rc(str);
}
String str_cut = "";
str_cut = str.substring(edge.overlap_size);
int count_match = 0;
int miss_match = 0;
// int compare_len = 0;
for(int j=0; j < str_cut.length() && j < f_consensus.length(); j++ ) {
if (str_cut.charAt(j) == f_consensus.charAt(j)) {
count_match = count_match + 1;
} else {
if (!(f_consensus.charAt(j) == 'N')) {
miss_match = miss_match + 1;
}
}
// compare_len = j;
}
if (miss_match <=0 /*(float)count_match/(float)compare_len > 0.8*/) {
// keep edge
} else {
node.addRemovalEdge(node.getNodeId(), edge.edge_type, edge.id, edge.overlap_size);
node.addRemovalEdge(edge.id, Node.flip_link(edge.edge_type), node.getNodeId(), edge.overlap_size);
reporter.incrCounter("Brush", "edge_removal", 1);
}
}
}
}
if (rlist.size() > 1) {
Collections.sort(rlist, new OvelapSizeComparator_r());
//\\PWM
List<String> r_edge_list = new ArrayList<String>();
EdgeInfo r_edge = null;
String r_consensus = "";
for(int i = 0; i < rlist.size(); i++) {
r_edge = rlist.get(i);
String str = Node.dna2str(r_edge.str);
String str_cut = "";
if (r_edge.edge_type.charAt(1) == 'r'){
str = Node.rc(str);
}
str_cut = str.substring(r_edge.overlap_size);
r_edge_list.add(str_cut+"!"+r_edge.cov);
}
r_consensus = Node.Consensus(r_edge_list, majority, PWM_N);
//r_consensus = Node.Consensus2(r_edge_list, PWM_N);
//\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (r_consensus != null /*&& r_consensus.length() >= Consensus_threshold*/) {
for(int i = 0; i < rlist.size(); i++) {
edge= rlist.get(i);
String str = Node.dna2str(edge.str);
if (edge.edge_type.charAt(1) == 'r'){
str = Node.rc(str);
}
String str_cut = "";
str_cut = str.substring(edge.overlap_size);
int count_match = 0;
int miss_match = 0;
// int compare_len = 0;
for(int j=0; j < str_cut.length() && j < r_consensus.length(); j++ ) {
if (str_cut.charAt(j) == r_consensus.charAt(j)) {
count_match = count_match + 1;
} else {
if (!(r_consensus.charAt(j) == 'N')) {
miss_match = miss_match + 1;
}
}
// compare_len = j;
}
if (miss_match <=0/*(float)count_match/(float)compare_len > 0.8*/) {
// keep edge
} else {
node.addRemovalEdge(node.getNodeId(), edge.edge_type, edge.id, edge.overlap_size);
node.addRemovalEdge(edge.id, Node.flip_link(edge.edge_type), node.getNodeId(), edge.overlap_size);
reporter.incrCounter("Brush", "edge_removal", 1);
}
}
}
}
output.collect(nodeid, new Text(node.toNodeMsg()));
}
}
// Run Tool
///////////////////////////////////////////////////////////////////////////
public RunningJob run(String inputPath, String outputPath) throws Exception
{
sLogger.info("Tool name: CutChimericLinks");
sLogger.info(" - input: " + inputPath);
sLogger.info(" - output: " + outputPath);
JobConf conf = new JobConf(CutChimericLinks.class);
conf.setJobName("CutChimericLinks " + inputPath + " " + BrushConfig.K);
//conf.setFloat("Error_Rate", ErrorRate);
//conf.setFloat("Exp_Cov", Exp_Cov);
BrushConfig.initializeConfiguration(conf);
FileInputFormat.addInputPath(conf, new Path(inputPath));
FileOutputFormat.setOutputPath(conf, new Path(outputPath));
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
conf.setMapOutputKeyClass(Text.class);
conf.setMapOutputValueClass(Text.class);
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(Text.class);
conf.setMapperClass(CutChimericLinksMapper.class);
conf.setReducerClass(CutChimericLinksReducer.class);
//delete the output directory if it exists already
FileSystem.get(conf).delete(new Path(outputPath), true);
return JobClient.runJob(conf);
}
// Parse Arguments and run
///////////////////////////////////////////////////////////////////////////
public int run(String[] args) throws Exception
{
String inputPath = "";
String outputPath = "";
BrushConfig.K = 21;
run(inputPath, outputPath);
return 0;
}
// Main
///////////////////////////////////////////////////////////////////////////
public static void main(String[] args) throws Exception
{
int res = ToolRunner.run(new Configuration(), new CutChimericLinks(), args);
System.exit(res);
}
}
|
[
"[email protected]"
] | |
b35465d2b321aa25e354caf772bd72993d7f7723
|
4ce527543821f4647d4f0cde9621af62d182c04b
|
/app/src/main/java/org/faith/bebetter/LoginAndUserCreation/LoginActivity.java
|
89f67e45570cbc58f76707cead808e9fb50f1721
|
[] |
no_license
|
SamuelHauptmannvanDam/Login3-master-KotlinReady
|
3ea2dbbeba486a54f7c5f6a8fdaf73235090a588
|
de31f42bdc3e3a8feedafbbac1196bc23bf9384e
|
refs/heads/master
| 2023-01-02T03:30:34.998872 | 2020-10-13T13:41:42 | 2020-10-13T13:41:42 | 272,950,586 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 6,705 |
java
|
package org.faith.bebetter.LoginAndUserCreation;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.faith.bebetter.R;
import org.faith.bebetter.MainActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.InstanceIdResult;
public class LoginActivity extends AppCompatActivity {
private EditText Email, Password;
private TextView Info;
private Button Login;
private int counter = 5;
private TextView userRegistration;
private FirebaseAuth firebaseAuth;
private ProgressDialog progressDialog;
private TextView forgotPassword;
private DatabaseReference mUserDatabase;
//To check if filled
String email, password;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
Email = (EditText)findViewById(R.id.etNameLogin);
Password = (EditText)findViewById(R.id.etPasswordLogin);
Info = (TextView) findViewById(R.id.tvInfoLogin);
Login = (Button) findViewById(R.id.btnLoginLogin);
userRegistration = (TextView)findViewById(R.id.tvClaimProfileLogin);
forgotPassword = (TextView)findViewById(R.id.tvForgotPasswordLogin);
//Info.setText("Number of attempts remaining: 5");
//Firebase authentication
firebaseAuth = FirebaseAuth.getInstance();
//Database reference.
mUserDatabase = FirebaseDatabase.getInstance().getReference();
progressDialog = new ProgressDialog(this);
FirebaseUser user = firebaseAuth.getCurrentUser();
//Checks if user is already logged in and sends them on, rather than forcing user to login after ever closing of app.
if (user != null){
finish();
startActivity(new Intent(LoginActivity.this, MainActivity.class));
}
Password.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
if (checkIsInfoFilled()){
validate(Email.getText().toString(), Password.getText().toString());
}
return true;
}
return false;
}
});
//Set button activities.
Login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (checkIsInfoFilled()){
validate(Email.getText().toString(), Password.getText().toString());
}
}
});
userRegistration.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, RegistrationActivity.class));
}
});
forgotPassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, PasswordActivity.class));
}
});
}
private Boolean checkIsInfoFilled(){
Boolean result = false;
password = Password.getText().toString();
email = Email.getText().toString();
if (password.isEmpty() || email.isEmpty()){
Toast.makeText(this, "Please enter all the details", Toast.LENGTH_SHORT).show();
}else{
result = true;
}
return result;
}
private void validate(String userName, String userPassword){
firebaseAuth.signInWithEmailAndPassword(userName, userPassword).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
progressDialog.dismiss(); //Terminates our progressDialog message.
if (task.isSuccessful()){
checkEmailVerification();
//set Notification token
firebaseAuth = FirebaseAuth.getInstance();
mUserDatabase = FirebaseDatabase.getInstance().getReference();
String current_user_id = firebaseAuth.getCurrentUser().getUid();
FirebaseInstanceId.getInstance().getInstanceId()
.addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
@Override
public void onComplete(@NonNull Task<InstanceIdResult> task) {
// Get new Instance ID token
String token = task.getResult().getToken();
mUserDatabase.child("Users").child(current_user_id).child("user_token").setValue(token);
}
});
//Sets device token
progressDialog.setMessage("You´re now being being beamed in!");
progressDialog.show();
} else {
Toast.makeText(LoginActivity.this, "Login Failed", Toast.LENGTH_SHORT).show();
counter--;
Info.setText("Number of attempts remaining: " + String.valueOf(counter));
if(counter == 0){
Login.setEnabled(false);
}
}
}
});
}
private void checkEmailVerification(){
FirebaseUser firebaseUser = firebaseAuth.getInstance().getCurrentUser();
Boolean emailflag = firebaseUser.isEmailVerified();
if(emailflag){
finish();
startActivity(new Intent(LoginActivity.this, MainActivity.class));
} else {
Toast.makeText(this, "You still need to verify your email.", Toast.LENGTH_SHORT).show();
firebaseAuth.signOut();
}
}
}
|
[
"samuelhauptmannvandam@"
] |
samuelhauptmannvandam@
|
a0e219a4fa35bbc439f211bb46837b68846b5bb3
|
a389476733fce8a17548c1b05f850c54d26b8523
|
/NHN_Board/src/main/java/com/nhnentertainment/freeboard/controller/HomeController.java
|
199316c071438006a67d71c6d1bdae2a85a6cb05
|
[] |
no_license
|
NoHyunbin/NHN
|
27de63e07040f1e0da08cfde33d1aeff1afe8f9c
|
2a295bb350d3dd994ea8d8c893a2d4598503fd73
|
refs/heads/master
| 2021-01-12T06:35:01.587221 | 2018-05-16T02:49:30 | 2018-05-16T02:49:30 | 77,388,923 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 511 |
java
|
package com.nhnentertainment.freeboard.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
@RequestMapping("/")
public String home(Model model) {
logger.info("Home실행");
return "redirect:/list";
}
}
|
[
"[email protected]"
] | |
41e27ad1dd307d254aa15474902e547a1a80f0a1
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/OSEnum.java
|
57edb9389af5f4aecf2df6a56020e4eb22f5536d
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664 | 2021-03-10T15:03:07 | 2021-03-10T15:03:07 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 851 |
java
|
7
https://raw.githubusercontent.com/zeoio/fabric-toolkit/master/bcp-install-common/src/main/java/com/cgb/bcpinstall/common/entity/OSEnum.java
/*
* Copyright CGB Corp All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cgb.bcpinstall.common.entity;
public enum OSEnum {
LINUX,
MAC,
WINDOWS
}
|
[
"[email protected]"
] | |
22b74af2cea9539c11e8ca4be0283b4097b85a9a
|
eb2700e01760566e584570d244e4de0d569b4a39
|
/Kommunikativer Stabilbaukasten - GS Sa 2/macoun2011/java/MacRunners/app/controllers/Security.java
|
cd919a03cd28f9bc2a89c97ba09dbab285f35a16
|
[] |
no_license
|
pradeep2012/2011
|
13ee46e97575de24eb4dde3c765b5ec08d71a61d
|
ea6a78b7be571bc65e5c156c6ebd590f632e683d
|
refs/heads/master
| 2021-01-22T12:02:41.147227 | 2012-02-24T11:04:15 | 2012-02-24T11:04:15 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,639 |
java
|
package controllers;
import java.util.UUID;
import javax.persistence.PersistenceException;
import play.data.validation.Required;
import play.libs.Codec;
import play.libs.Crypto;
import play.mvc.Router;
import models.User;
public class Security extends controllers.Secure.Security {
static boolean authenticate(String username, String password) {
return User.connect(username, Codec.hexSHA1(password)) != null;
}
static void onDisconnected() {
Application.index();
}
static void onAuthenticated() {
Application.index();
}
public static void register(@Required String username, @Required String password) {
response.contentType = "text/javascript";
try {
new User(username,Codec.hexSHA1(password)).save();
session.put("username", username);
renderText("top.location.href='" + Router.reverse("Application.index").url +"'"); // redirect to index page via ajax reload
} catch(PersistenceException e) { // Username already exists
renderText("$('#name').addClass( 'ui-state-error' );updateTips('Benutzerkonto besteht bereits.')");
}
}
public static void login(@Required String username, @Required String password) {
response.contentType = "text/javascript";
if (authenticate(username, password)) {
// Mark user as connected
session.put("username", username);
renderText("top.location.href='" + Router.reverse("Application.index").url +"'"); // redirect to index page via ajax reload
} else { // Username already exists
renderText("$('#name').addClass( 'ui-state-error' );updateTips('Benutzername oder Kennwort unbekannt.')");
}
}
}
|
[
"[email protected]"
] | |
41f99499352aea7e81fa191d061b0910a8cb42df
|
7394100703f574b865d600464dfdc95b7e0976d2
|
/src/com/zoltu/shinro/HeaderPiece.java
|
b06840b8887a9cb438b02f4e11f34c1cee54c56d
|
[] |
no_license
|
MicahZoltu/shinro
|
c2f400b2e45445f02d52665a0c173bd461a90e0e
|
57204df061be7da380d1dc0e051dd06f07634394
|
refs/heads/master
| 2020-03-12T12:42:37.794387 | 2011-08-19T17:13:50 | 2011-08-19T17:13:50 | 130,624,625 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,248 |
java
|
package com.zoltu.shinro;
import android.graphics.Color;
public abstract class HeaderPiece extends PointingPiece
{
public HeaderPiece(Map pMap, int pColumn, int pRow)
{
super(pMap, pColumn, pRow);
}
@Override public void OnMapConstructionComplete()
{
super.OnMapConstructionComplete();
UpdateDrawable();
UpdateHighlight();
}
@Override protected void OnUpdate()
{
UpdateHighlight();
}
private boolean HasTooManySuspectedBombs()
{
if (mSuspectedBombCount > mBombCount) return true;
else return false;
}
private boolean HasTooManySuspectedNonBombs()
{
if (mSuspectedSpaceCount > (mUnknownPieces.size() - mBombCount)) return true;
else return false;
}
private void UpdateDrawable()
{
// Get the resource identifier for the correct number.
int lResourceId = mMap.GetGame().getResources().getIdentifier("number_" + Integer.toString(mBombCount), "drawable", mMap.GetGame().getPackageName());
SetDrawable(lResourceId);
}
private void UpdateHighlight()
{
if (HasTooManySuspectedBombs() || HasTooManySuspectedNonBombs()) AddHighlight(Color.RED);
else RemoveHighlight(Color.RED);
if (mBombCount == mSuspectedBombCount) AddHighlight(Color.WHITE);
else RemoveHighlight(Color.WHITE);
}
}
|
[
"[email protected]"
] | |
36cce452425cbdc543738f0a614a37ab4f0f9942
|
c5a48bf0f82b0c26b905c0d36c5be1da8401ee47
|
/src/main/java/fullweb/FullWebHttp2ClientInitializer.java
|
4e29b15a532e803db3d496daade221f278c389b5
|
[] |
no_license
|
Dragon-Yu/poseidon
|
1cc83f117c3d7a988149257f3248422d9165db19
|
1e7c5b9d24ee6f6b8582b51d0a0482c98a958a20
|
refs/heads/master
| 2021-01-11T01:18:09.786361 | 2016-10-13T17:58:30 | 2016-10-13T17:58:30 | 71,061,120 | 1 | 0 | null | 2016-10-16T16:01:28 | 2016-10-16T16:01:28 | null |
UTF-8
|
Java
| false | false | 1,713 |
java
|
package fullweb;
import com.google.common.collect.ImmutableSet;
import http2.client.Http2ClientInitializer;
import io.netty.channel.Channel;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.ssl.ApplicationProtocolNames;
import io.netty.handler.ssl.SslContext;
import io.netty.util.internal.ConcurrentSet;
import java.net.URL;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by Johnson on 16/7/19.
*/
public class FullWebHttp2ClientInitializer extends Http2ClientInitializer implements TraceController {
private Set<URL> visitedUrls = new ConcurrentSet<>();
private Map<URL, TraceInfo> tracerInfoMap = new ConcurrentHashMap<>();
public FullWebHttp2ClientInitializer(SslContext sslCtx, int maxContentLength) {
super(sslCtx, maxContentLength);
}
@Override
public void initChannel(SocketChannel ch) throws Exception {
super.initChannel(ch);
setResponseHandler(new FullWebHttp2ResponseHandler(this));
}
public Set<URL> getVisitedUrls() {
return ImmutableSet.copyOf(visitedUrls);
}
public Map<URL, TraceInfo> getTraces() {
return tracerInfoMap;
}
public synchronized boolean urlVisited(URL url) {
return visitedUrls.contains(url);
}
public synchronized void visitUrl(URL url, Channel channel) {
visitedUrls.add(url);
TraceInfo info = new TraceInfo(url, ApplicationProtocolNames.HTTP_2);
info.setRequestTimeStamp(System.nanoTime());
tracerInfoMap.put(url, info);
}
@Override
public void completeVisit(Channel channel, URL url) {
tracerInfoMap.get(url).setResponseTimeStamp(System.nanoTime());
}
@Override
public void onContentHandled() {
}
}
|
[
"[email protected]"
] | |
fbdd582d52f80df5b3a781308e4cd9585da80bc0
|
be2aa768a848078a06351f0b761a6def884dded1
|
/Documents/NetBeansProjects/HoraDoSistema1/src/horadosistema1/HoraDoSistema1.java
|
a6017b8c7ab2105ac91538e6cdf66076ff39985c
|
[] |
no_license
|
daniela104/horaDoSistema
|
3b2e8725606f9bc8e51ead506ff9f68f16c898b2
|
a1097d92d5d538ff804da389a86e362f0c4e2649
|
refs/heads/master
| 2023-03-15T00:06:04.839520 | 2021-02-25T02:54:13 | 2021-02-25T02:54:13 | 342,102,364 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 591 |
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package horadosistema1;
import java.util.Date;
/**
*
* @author reyna
*/
public class HoraDoSistema1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Date relogio= new Date();
System.out.println("a hora do sistema é");
System.out.println(relogio.toString());
}
}
|
[
"[email protected]"
] | |
524bea5335c2eefe8ceacb18bbfe901a061d0639
|
10f7ee3eb2311929702f4457749c2fba8f12b650
|
/app/src/test/java/com/technicalnisith/covid19updates/ExampleUnitTest.java
|
399e3c9ce8d6114746c66089eca0fdef29fd24e9
|
[] |
no_license
|
NisithMondal/Covid19Application16-05-2020
|
3866f5364f2626e66b8131d32b4578a82e43dcef
|
66df2fc4fae4775d67edcff0032e54304161fda9
|
refs/heads/master
| 2022-06-17T23:52:06.406274 | 2020-05-16T11:17:21 | 2020-05-16T11:17:21 | 264,421,412 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 395 |
java
|
package com.technicalnisith.covid19updates;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
|
[
"[email protected]"
] | |
934f585b49e744230c3a288553b4ab35c05c6aed
|
89ccb7c4728460fdefb586f169f8d8ac43f7a5f4
|
/cx/domain/user-domain/src/main/java/com/arjen0203/codex/domain/user/dto/CreateUser.java
|
f03a547f19525cdaed0ca2fc84ed2d4e2e861745
|
[] |
no_license
|
arjen0203/TwitterButForCodeBackEnd
|
416d0442110513715e9c1a60c61b2265922f29a9
|
49be6574cbfe122e7d7f8b19afd27ccf9477ab5d
|
refs/heads/master
| 2023-06-02T04:59:45.848785 | 2021-06-19T17:54:40 | 2021-06-19T17:54:40 | 347,965,867 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 372 |
java
|
package com.arjen0203.codex.domain.user.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/** DTO containing the information needed to Create a User. */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CreateUser {
private String username;
private String email;
private String password;
private RoleDto role;
}
|
[
"[email protected]"
] | |
3a962213655c7657036c92ad32a18689a9ee6fc7
|
aac5aab8d733f7ee207bf8d0d4e64030aa593d37
|
/proj_104_catalina_impl/src/org/apache/catalina/connector/RequestWrapper.java
|
b806746a0327a26285322622379661a75dc24ed9
|
[] |
no_license
|
lichsword/Tomcat
|
6be5f2b501cb7a262e2189cf288e342380db03c4
|
278aabcb370fb8b61d5571f4944b61f4c36fb2e0
|
refs/heads/master
| 2021-01-17T14:32:30.725094 | 2014-04-22T07:19:14 | 2014-04-22T07:19:14 | 17,353,207 | 0 | 2 | null | null | null | null |
UTF-8
|
Java
| false | false | 11,835 |
java
|
/*
* $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestWrapper.java,v 1.4 2002/03/18 07:15:39 remm Exp $
* $Revision: 1.4 $
* $Date: 2002/03/18 07:15:39 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [email protected].
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* [Additional notices, if required by prior licensing conditions]
*
*/
package org.apache.catalina.connector;
import java.io.InputStream;
import java.io.IOException;
import java.net.Socket;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletRequest;
import org.apache.catalina.Connector;
import org.apache.catalina.Context;
import org.apache.catalina.Request;
import org.apache.catalina.Response;
import org.apache.catalina.Wrapper;
/**
* Abstract convenience class that wraps a Catalina-internal <b>Request</b>
* object. By default, all methods are delegated to the wrapped request,
* but subclasses can override individual methods as required to provide the
* functionality that they require.
*
* @author Craig R. McClanahan
* @version $Revision: 1.4 $ $Date: 2002/03/18 07:15:39 $
* @deprecated
*/
public abstract class RequestWrapper implements Request {
// ----------------------------------------------------------- Constructors
/**
* Construct a wrapper for the specified request.
*
* @param request The request to be wrapped
*/
public RequestWrapper(Request request) {
super();
this.request = request;
}
// ----------------------------------------------------- Instance Variables
/**
* The wrapped request.
*/
protected Request request = null;
/**
* Return the wrapped request.
*/
public Request getWrappedRequest() {
return (this.request);
}
// ------------------------------------------------------------- Properties
/**
* Return the authorization credentials sent with this request.
*/
public String getAuthorization() {
return (request.getAuthorization());
}
/**
* Set the authorization credentials sent with this request.
*
* @param authorization The new authorization credentials
*/
public void setAuthorization(String authorization) {
request.setAuthorization(authorization);
}
/**
* Return the Connector through which this Request was received.
*/
public Connector getConnector() {
return (request.getConnector());
}
/**
* Set the Connector through which this Request was received.
*
* @param connector The new connector
*/
public void setConnector(Connector connector) {
request.setConnector(connector);
}
/**
* Return the Context within which this Request is being processed.
*/
public Context getContext() {
return (request.getContext());
}
/**
* Set the Context within which this Request is being processed. This
* must be called as soon as the appropriate Context is identified, because
* it identifies the value to be returned by <code>getContextPath()</code>,
* and thus enables parsing of the request URI.
*
* @param context The newly associated Context
*/
public void setContext(Context context) {
request.setContext(context);
}
/**
* Return descriptive information about this Request implementation and
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
public String getInfo() {
return (request.getInfo());
}
/**
* Return the <code>ServletRequest</code> for which this object
* is the facade.
*/
public ServletRequest getRequest() {
return (request.getRequest());
}
/**
* Return the Response with which this Request is associated.
*/
public Response getResponse() {
return (request.getResponse());
}
/**
* Set the Response with which this Request is associated.
*
* @param response The new associated response
*/
public void setResponse(Response response) {
request.setResponse(response);
}
/**
* Return the Socket (if any) through which this Request was received.
* This should <strong>only</strong> be used to access underlying state
* information about this Socket, such as the SSLSession associated with
* an SSLSocket.
*/
public Socket getSocket() {
return (request.getSocket());
}
/**
* Set the Socket (if any) through which this Request was received.
*
* @param socket The socket through which this request was received
*/
public void setSocket(Socket socket) {
request.setSocket(socket);
}
/**
* Return the input stream associated with this Request.
*/
public InputStream getStream() {
return (request.getStream());
}
/**
* Set the input stream associated with this Request.
*
* @param stream The new input stream
*/
public void setStream(InputStream stream) {
request.setStream(stream);
}
/**
* Return the Wrapper within which this Request is being processed.
*/
public Wrapper getWrapper() {
return (request.getWrapper());
}
/**
* Set the Wrapper within which this Request is being processed. This
* must be called as soon as the appropriate Wrapper is identified, and
* before the Request is ultimately passed to an application servlet.
*
* @param wrapper The newly associated Wrapper
*/
public void setWrapper(Wrapper wrapper) {
request.setWrapper(wrapper);
}
// --------------------------------------------------------- Public Methods
/**
* Create and return a ServletInputStream to read the content
* associated with this Request.
*
* @exception java.io.IOException if an input/output error occurs
*/
public ServletInputStream createInputStream() throws IOException {
return (request.createInputStream());
}
/**
* Perform whatever actions are required to flush and close the input
* stream or reader, in a single operation.
*
* @exception java.io.IOException if an input/output error occurs
*/
public void finishRequest() throws IOException {
request.finishRequest();
}
/**
* Release all object references, and initialize instance variables, in
* preparation for reuse of this object.
*/
public void recycle() {
request.recycle();
}
/**
* Set the content length associated with this Request.
*
* @param length The new content length
*/
public void setContentLength(int length) {
request.setContentLength(length);
}
/**
* Set the content type (and optionally the character encoding)
* associated with this Request. For example,
* <code>text/html; charset=ISO-8859-4</code>.
*
* @param type The new content type
*/
public void setContentType(String type) {
request.setContentType(type);
}
/**
* Set the protocol name and version associated with this Request.
*
* @param protocol Protocol name and version
*/
public void setProtocol(String protocol) {
request.setProtocol(protocol);
}
/**
* Set the remote IP address associated with this Request. NOTE: This
* value will be used to resolve the value for <code>getRemoteHost()</code>
* if that method is called.
*
* @param remote The remote IP address
*/
public void setRemoteAddr(String remote) {
request.setRemoteAddr(remote);
}
/**
* Set the name of the scheme associated with this request. Typical values
* are <code>http</code>, <code>https</code>, and <code>ftp</code>.
*
* @param scheme The scheme
*/
public void setScheme(String scheme) {
request.setScheme(scheme);
}
/**
* Set the value to be returned by <code>isSecure()</code>
* for this Request.
*
* @param secure The new isSecure value
*/
public void setSecure(boolean secure) {
request.setSecure(secure);
}
/**
* Set the name of the server (virtual host) to process this request.
*
* @param name The server name
*/
public void setServerName(String name) {
request.setServerName(name);
}
/**
* Set the port number of the server to process this request.
*
* @param port The server port
*/
public void setServerPort(int port) {
request.setServerPort(port);
}
}
|
[
"[email protected]"
] | |
2ba58da0a6e737be410062867e3e565c1fc23289
|
56b71d38bbd6a68a15b9d0282647e360b8671114
|
/src/com/esb/jinying/sap/mastdata/rvs/ecc/XI_394737D733F43D81Af326D3A5Cfd8Aa9_ServiceLocator.java
|
93311bddc677803172e6abb78d454eef8688b82f
|
[] |
no_license
|
BaTianCheng/Gauss-private
|
41c7c8fb58b384b57531f5825526272653d7fea5
|
df98894dd0b9cc548ed4a354d73234920d26ab84
|
refs/heads/master
| 2021-06-29T13:24:04.620226 | 2017-09-17T14:52:38 | 2017-09-17T14:52:38 | 93,713,844 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 8,532 |
java
|
/**
* XI_394737D733F43D81Af326D3A5Cfd8Aa9_ServiceLocator.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.esb.jinying.sap.mastdata.rvs.ecc;
public class XI_394737D733F43D81Af326D3A5Cfd8Aa9_ServiceLocator extends org.apache.axis.client.Service implements com.esb.jinying.sap.mastdata.rvs.ecc.XI_394737D733F43D81Af326D3A5Cfd8Aa9_Service {
public XI_394737D733F43D81Af326D3A5Cfd8Aa9_ServiceLocator() {
}
public XI_394737D733F43D81Af326D3A5Cfd8Aa9_ServiceLocator(org.apache.axis.EngineConfiguration config) {
super(config);
}
public XI_394737D733F43D81Af326D3A5Cfd8Aa9_ServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
super(wsdlLoc, sName);
}
// Use to get a proxy class for HTTP_Port
private java.lang.String HTTP_Port_address = "http://srvgxp.goodee.cn:80/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_RVS&receiverParty=&receiverService=&interface=SI_Department_os&interfaceNamespace=urn%3Aecc%3Arvs%3Amastdata";
public java.lang.String getHTTP_PortAddress() {
return HTTP_Port_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String HTTP_PortWSDDServiceName = "HTTP_Port";
public java.lang.String getHTTP_PortWSDDServiceName() {
return HTTP_PortWSDDServiceName;
}
public void setHTTP_PortWSDDServiceName(java.lang.String name) {
HTTP_PortWSDDServiceName = name;
}
public com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_os getHTTP_Port() throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(HTTP_Port_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getHTTP_Port(endpoint);
}
public com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_os getHTTP_Port(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub _stub = new com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub(portAddress, this);
_stub.setPortName(getHTTP_PortWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setHTTP_PortEndpointAddress(java.lang.String address) {
HTTP_Port_address = address;
}
// Use to get a proxy class for HTTPS_Port
private java.lang.String HTTPS_Port_address = "https://srvgxp.goodee.cn/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_RVS&receiverParty=&receiverService=&interface=SI_Department_os&interfaceNamespace=urn%3Aecc%3Arvs%3Amastdata";
public java.lang.String getHTTPS_PortAddress() {
return HTTPS_Port_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String HTTPS_PortWSDDServiceName = "HTTPS_Port";
public java.lang.String getHTTPS_PortWSDDServiceName() {
return HTTPS_PortWSDDServiceName;
}
public void setHTTPS_PortWSDDServiceName(java.lang.String name) {
HTTPS_PortWSDDServiceName = name;
}
public com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_os getHTTPS_Port() throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(HTTPS_Port_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getHTTPS_Port(endpoint);
}
public com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_os getHTTPS_Port(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub _stub = new com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub(portAddress, this);
_stub.setPortName(getHTTPS_PortWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setHTTPS_PortEndpointAddress(java.lang.String address) {
HTTPS_Port_address = address;
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
* This service has multiple ports for a given interface;
* the proxy implementation returned may be indeterminate.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
try {
if (com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_os.class.isAssignableFrom(serviceEndpointInterface)) {
com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub _stub = new com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub(new java.net.URL(HTTP_Port_address), this);
_stub.setPortName(getHTTP_PortWSDDServiceName());
return _stub;
}
if (com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_os.class.isAssignableFrom(serviceEndpointInterface)) {
com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub _stub = new com.esb.jinying.sap.mastdata.rvs.ecc.SI_Department_osBindingStub(new java.net.URL(HTTPS_Port_address), this);
_stub.setPortName(getHTTPS_PortWSDDServiceName());
return _stub;
}
}
catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("HTTP_Port".equals(inputPortName)) {
return getHTTP_Port();
}
else if ("HTTPS_Port".equals(inputPortName)) {
return getHTTPS_Port();
}
else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("urn:ecc:rvs:mastdata", "XI_394737d733f43d81af326d3a5cfd8aa9_Service");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName("urn:ecc:rvs:mastdata", "HTTP_Port"));
ports.add(new javax.xml.namespace.QName("urn:ecc:rvs:mastdata", "HTTPS_Port"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("HTTP_Port".equals(portName)) {
setHTTP_PortEndpointAddress(address);
}
else
if ("HTTPS_Port".equals(portName)) {
setHTTPS_PortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}
|
[
"[email protected]"
] | |
577b7bf52e2b882237db2cc9e3e5b41f6015bdff
|
8a9ffb6a588a3d55adb707356ed015fd7c5fdbf3
|
/src/me/mattsutter/conditionred/FavoritesMenu.java
|
20526795c71d228f6a39595f6c4f1660f3e78ec8
|
[] |
no_license
|
ELY3M/me.mattsutter.conditionred
|
f1054328c6e4cc711ad0149d07fa60fe666676be
|
b79d4c357451aab28b39c92d0302aa568fbdfd78
|
refs/heads/master
| 2020-04-05T09:21:21.334400 | 2016-04-19T00:38:45 | 2016-04-19T00:38:45 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 7,395 |
java
|
package me.mattsutter.conditionred;
import static me.mattsutter.conditionred.MapActivity.PICK_SITE;
import static me.mattsutter.conditionred.MapActivity.SHOW_RADAR_VIEW;
import static me.mattsutter.conditionred.MapActivity.CURRENT_SITE_ID;
import me.mattsutter.conditionred.util.DatabaseQuery;
import static me.mattsutter.conditionred.util.DatabaseQueryHelper.SITE_ID;
import android.app.ListActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class FavoritesMenu extends ListActivity{
protected Menu menu;
private static final int GOTO = 5;
private static final int ADD_THIS_SITE = 2;
private static final int ADD_SITE = 3;
private static final int REMOVE_SITE = 4;
protected static final String FAVORITES = "favs";
private static final int SITE_MENU_ID = 834;
// private final int REMOVE_MENU_ID = 345;
private ArrayAdapter<String> fav_list;
private int fav_num;
private String selected_site;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.radar_site_menu);
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
fav_list = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
fav_num = settings.getInt(FAVORITES, 0);
if (fav_num > 0)
for (int i=1; i<=fav_num; i++){
String site = settings.getString(FAVORITES + Integer.toString(i), "KMKX");
fav_list.add(DatabaseQuery.getSiteCity(site));
}
else
fav_list.add("Add a new site");
this.registerForContextMenu(this.getListView());
setListAdapter(fav_list);
}
@Override
public boolean onCreateOptionsMenu(Menu _menu){
super.onCreateOptionsMenu(_menu);
menu = _menu;
int base = Menu.FIRST;
MenuItem item1 = menu.add(base, ADD_THIS_SITE, base, "Add current site");
item1.setIcon(R.drawable.ic_menu_goto);
MenuItem item2 = menu.add(base, ADD_SITE, base+1, "Add new site");
item2.setIcon(R.drawable.ic_menu_add);
// MenuItem item3 = menu.add(base, REMOVE_SITE, base+2, "Remove Site");
// item3.setIcon(R.drawable.ic_menu_delete);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()){
case (ADD_THIS_SITE):
addThisSite();
return true;
case (ADD_SITE):
Intent get_site = new Intent(PICK_SITE);
startActivityForResult(get_site, SITE_MENU_ID);
return true;
//case (REMOVE_SITE):
//Intent get_product = new Intent(PRODUCT_MENU);
//startActivityForResult(get_product, REMOVE_MENU_ID);
//return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
protected void onActivityResult(int request_code, int result_code, Intent data){
if (request_code == SITE_MENU_ID && result_code == RESULT_OK)
addSite(data);
else
super.onActivityResult(request_code, result_code, data);
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id){
if (fav_num > 0){
Intent data = new Intent(SHOW_RADAR_VIEW);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
data.putExtra(CURRENT_SITE_ID, settings.getString(FAVORITES + Integer.toString(position + 1), "KMKX"));
setResult(RESULT_OK, data);
finish();
}
else{
Intent get_site = new Intent(PICK_SITE);
startActivityForResult(get_site, SITE_MENU_ID);
}
}
protected boolean checkForDuplicates(String site, SharedPreferences settings){
//SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
String city = DatabaseQuery.getSiteCity(site);
for (int i=0; i < fav_num; i++){
if (city.equals(fav_list.getItem(i))){
return true;
}
}
return false;
}
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menu_info){
super.onCreateContextMenu(menu, v, menu_info);
if (fav_num > 0){
menu.add(Menu.NONE, GOTO, Menu.FIRST, "Go to site");
menu.add(Menu.NONE, REMOVE_SITE, Menu.FIRST + 3, "Delete");
}
menu.add(Menu.NONE, ADD_THIS_SITE, Menu.FIRST + 1, "Add current site");
menu.add(Menu.NONE, ADD_SITE, Menu.FIRST + 2, "Add new site");
}
@Override
public boolean onContextItemSelected(MenuItem item) {
AdapterView.AdapterContextMenuInfo menu_info = (AdapterContextMenuInfo) item.getMenuInfo();
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
switch(item.getItemId()){
case GOTO:
Intent data = new Intent(SHOW_RADAR_VIEW);
data.putExtra(CURRENT_SITE_ID, settings.getString(FAVORITES + Integer.toString(menu_info.position + 1), "KMKX"));
setResult(RESULT_OK, data);
finish();
break;
case ADD_THIS_SITE:
addThisSite();
break;
case ADD_SITE:
Intent get_site = new Intent(PICK_SITE);
startActivityForResult(get_site, SITE_MENU_ID);
break;
case REMOVE_SITE:
fav_list.remove(fav_list.getItem(menu_info.position));
SharedPreferences.Editor editor = settings.edit();
editor.remove(FAVORITES + Integer.toString(menu_info.position + 1));
String site;
for (int i = menu_info.position + 1; i < fav_num; i++){
site = settings.getString(FAVORITES + Integer.toString(i + 1), "KMKX");
editor.putString(FAVORITES + Integer.toString(i), site);
}
fav_num--;
editor.putInt(FAVORITES, fav_num);
editor.commit();
if (fav_num ==0)
fav_list.add("Add a new site");
break;
default:
return false;
}
return true;
}
protected void addSite(Intent data){
selected_site = data.getStringExtra(CURRENT_SITE_ID);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
if (!checkForDuplicates(selected_site, settings)){
if (fav_num == 0)
fav_list.clear();
fav_num++;
SharedPreferences.Editor editor = settings.edit();
editor.putString(FAVORITES + Integer.toString(fav_num), selected_site);
editor.putInt(FAVORITES, fav_num);
editor.commit();
fav_list.add(DatabaseQuery.getSiteCity(selected_site));
}
}
protected void addThisSite(){
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
selected_site = settings.getString(SITE_ID, "KMKX");
if (!checkForDuplicates(selected_site, settings)){
if (fav_num == 0)
fav_list.clear();
fav_num++;
SharedPreferences.Editor editor = settings.edit();
editor.putString(FAVORITES + Integer.toString(fav_num), selected_site);
editor.putInt(FAVORITES, fav_num);
editor.commit();
fav_list.add(DatabaseQuery.getSiteCity(selected_site));
}
}
}
|
[
"[email protected]"
] | |
cc8b5fac65ca52677434d4911224b1396f02b674
|
0ea6d41c96faa730fb6093231d5a0bff82e1b397
|
/src/main/java/com/example/demo/util/LogHelper.java
|
9433901d2fc4b6d3244e279d17fd62ac63c48149
|
[
"MIT"
] |
permissive
|
technakal/udacity-security-project
|
1e5daa03965aa1479eaa48a7ee1b09a65c52a175
|
929dd4efc206572022fa9f1d0a1a5cf7f00d4a14
|
refs/heads/master
| 2020-09-27T13:52:43.767752 | 2019-12-15T14:44:36 | 2019-12-15T14:44:36 | 226,532,226 | 0 | 0 |
MIT
| 2019-12-15T14:44:37 | 2019-12-07T15:06:25 |
Java
|
UTF-8
|
Java
| false | false | 408 |
java
|
package com.example.demo.util;
public class LogHelper {
public static String buildLogString(String message) {
String logMessage = "devlog | ";
return logMessage + message.trim();
}
public static String buildLogString(String[] messages) {
String logMessage = "devlog | ";
for (String message : messages) {
logMessage += message + " ";
}
return logMessage.trim();
}
}
|
[
"[email protected]"
] | |
bcf4bcdd649ba7c5c6b72256a82b22d2382534dc
|
de3efa9ed9d440893cd7cabcd1a939885a78f083
|
/sources/sirius/src/main/java/com/antares/commons/predicate/DatePredicateFactory.java
|
ac68ffbef1ead4ab24f82a33b328ec99208e893e
|
[] |
no_license
|
pedrohmolina/admin-ong
|
2c98884f2743e3cb88e705d53bfa20ceb49eab4f
|
d06474bfa88caa3ad2907cefb3848dc843c09f56
|
refs/heads/master
| 2021-01-21T17:45:56.468102 | 2011-11-23T04:06:00 | 2011-11-23T04:06:00 | 32,761,657 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,323 |
java
|
package com.antares.commons.predicate;
import java.util.Date;
import com.antares.commons.exception.IncorrectRestrictionTypeException;
import com.antares.commons.util.Utils;
import com.google.common.base.Predicate;
/**
* Factory Concreto que crea predicados para campos de tipo fecha
*
* @version 1.0.0 Created 01/05/2011 by Julian Martinez
* @author <a href:mailto:[email protected]> Julian Martinez </a>
*/
public class DatePredicateFactory extends PredicateFactory {
public Predicate<?> createPredicate(String propertyName, RestrictionType restrictionType, String value) throws IncorrectRestrictionTypeException {
Predicate<Date> predicate = null;
Date dateValue = Utils.parseDate(value);
switch(restrictionType) {
case DATE_EQUAL: predicate = setValues(new DateEqualPredicate(), propertyName, dateValue); break;
case DATE_NOT_EQUAL: predicate = setValues(new DateNotEqualPredicate(), propertyName, dateValue); break;
case DATE_BEFORE: predicate = setValues(new DateBeforePredicate(), propertyName, dateValue); break;
case DATE_AFTER: predicate = setValues(new DateAfterPredicate(), propertyName, dateValue); break;
default: throw new IncorrectRestrictionTypeException("The restricion " + restrictionType + " is not permitted for a date field");
}
return predicate;
}
private FilterPredicate<Date> setValues(FilterPredicate<Date> predicate, String propertyName, Date expectedValue) {
predicate.setPropertyName(propertyName);
predicate.setExpectedValue(expectedValue);
return predicate;
}
private static class DateEqualPredicate extends FilterPredicate<Date> {
@Override
public boolean apply(Date fieldValue) {
return expectedValue.equals(fieldValue);
}
}
private static class DateNotEqualPredicate extends FilterPredicate<Date> {
@Override
public boolean apply(Date fieldValue) {
return !expectedValue.equals(fieldValue);
}
}
private static class DateBeforePredicate extends FilterPredicate<Date> {
@Override
public boolean apply(Date fieldValue) {
return expectedValue.after(fieldValue);
}
}
private static class DateAfterPredicate extends FilterPredicate<Date> {
@Override
public boolean apply(Date fieldValue) {
return expectedValue.before(fieldValue);
}
}
}
|
[
"otakon@566f87ed-7663-a5b8-1e60-18e6c9073d6a"
] |
otakon@566f87ed-7663-a5b8-1e60-18e6c9073d6a
|
2b2378913a882507b82665c779b62b5128fc35e7
|
904b854a6be994c824d50d9af3e4f3a9c3b5e4fb
|
/src/main/java/com/mycompany/myapp/service/dto/BookDTO.java
|
55be48a5c541de9d4d844cff77386a54ac5f3be9
|
[] |
no_license
|
tejas-polakam/jHipsterMonolith
|
ac5b344ab89e28a43110174d1b6579b5b14b0c9e
|
9214ecd8e2cbc2233d0d7ecedf0a6112c6a18b5f
|
refs/heads/master
| 2022-12-23T05:07:27.627405 | 2019-07-01T00:30:05 | 2019-07-01T00:30:05 | 194,573,530 | 0 | 1 | null | 2022-12-16T04:59:49 | 2019-07-01T00:13:57 |
Java
|
UTF-8
|
Java
| false | false | 2,533 |
java
|
package com.mycompany.myapp.service.dto;
import java.time.LocalDate;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
/**
* A DTO for the {@link com.mycompany.myapp.domain.Book} entity.
*/
public class BookDTO implements Serializable {
private Long id;
private String title;
private String description;
private LocalDate publicationDate;
private BigDecimal price;
private Long manytooneId;
private String manytooneName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public LocalDate getPublicationDate() {
return publicationDate;
}
public void setPublicationDate(LocalDate publicationDate) {
this.publicationDate = publicationDate;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Long getManytooneId() {
return manytooneId;
}
public void setManytooneId(Long authorId) {
this.manytooneId = authorId;
}
public String getManytooneName() {
return manytooneName;
}
public void setManytooneName(String authorName) {
this.manytooneName = authorName;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BookDTO bookDTO = (BookDTO) o;
if (bookDTO.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), bookDTO.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "BookDTO{" +
"id=" + getId() +
", title='" + getTitle() + "'" +
", description='" + getDescription() + "'" +
", publicationDate='" + getPublicationDate() + "'" +
", price=" + getPrice() +
", manytoone=" + getManytooneId() +
", manytoone='" + getManytooneName() + "'" +
"}";
}
}
|
[
"[email protected]"
] | |
0ed18f70d9c5ed7b42b7242a91047175519e60a4
|
baef97f4bf0c360eb1bd022cdbde78445037eef2
|
/components-impl/src/main/java/com/abhinav/lagom/unmanaged/impl/ComponentsServiceImpl.java
|
a174fb66ec073c14d3e41455e248f3c16c5217b9
|
[] |
no_license
|
abhinavsinha1991/Lagom-Unmanaged-Service-With-Cassandra
|
7445a861ff55b4cb8879513f591b3bf1477a7034
|
821fdd0e2dc956c7d9cb2f9434eb103345d53f9f
|
refs/heads/master
| 2020-03-19T04:43:14.394730 | 2018-06-03T13:29:08 | 2018-06-03T13:29:08 | 135,858,245 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,082 |
java
|
package com.abhinav.lagom.unmanaged.impl;
import akka.NotUsed;
import com.abhinav.lagom.unmanaged.external.api.DigitalOceanService;
import com.abhinav.lagom.unmanaged.external.models.ComponentData;
import com.abhinav.lagom.unmanaged.api.ComponentsService;
import com.abhinav.lagom.unmanaged.external.models.Components;
import com.abhinav.lagom.unmanaged.mapper.ResponseMapper;
import com.abhinav.lagom.unmanaged.models.ComponentsResponse;
import com.google.inject.Inject;
import com.lightbend.lagom.javadsl.api.ServiceCall;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletionStage;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.lightbend.lagom.javadsl.persistence.cassandra.CassandraSession;
public class ComponentsServiceImpl implements ComponentsService {
private DigitalOceanService digitalOceanService;
private final ResponseMapper responseMapper;
private CassandraSession cassandraSession;
private static final Logger LOGGER = LoggerFactory.getLogger(ComponentsServiceImpl.class);
private static final List<String> validStatusList = Arrays.asList("operational", "degraded_performance", "partial_outage", "major_outage");
@Inject
public ComponentsServiceImpl(DigitalOceanService digitalOceanService, ResponseMapper responseMapper, CassandraSession cassandraSession) {
this.digitalOceanService = digitalOceanService;
this.responseMapper = responseMapper;
this.cassandraSession = cassandraSession;
}
public CompletionStage<ComponentData> hitAPI() {
CompletionStage<ComponentData> componentDataFromDoApi = digitalOceanService
.getComponents()
.invoke();
return componentDataFromDoApi;
}
@Override
public ServiceCall<NotUsed, ComponentsResponse> getComponents(Optional<String> name) {
return request ->
{
CompletionStage<ComponentData> componentData = hitAPI();
String name1 = name.orElse("");
LOGGER.info("Query parameter received is {}", name1);
String[] arr = name1.split(",");
List<String> namelist = Arrays.asList(arr);
return componentData.thenApply(
userInfo ->
{
cassandraSession.underlying().thenAccept(a-> System.out.println(a.getLoggedKeyspace()));
LOGGER.info("Total no. of components fetched from external service is: {} ", userInfo.components.size());
LOGGER.info("List of valid status is" + validStatusList);
List<Components> componentsList;
Stream<Components> componentsStream = userInfo.components.stream()
.filter(b -> b.getGroup_id() != null)
.filter(c -> validStatusList.stream().anyMatch(d -> d.equals(c.getStatus())))
.map(d-> {
String newString= d.getGroup_id().concat(d.getPage_id());
d.setComposite_id(Integer.toString(newString.hashCode()));
return d;
});
if (!name1.equals("")) {
componentsList = componentsStream
.filter(a -> namelist.contains(a.getName()))
.collect(Collectors.toList());
} else {
componentsList = componentsStream.collect(Collectors.toList());
}
LOGGER.info("Filtered list size of components is: {} ", componentsList.size());
try {
cassandraSession.selectAll("select * from comp_data.comps").thenAccept(a-> System.out.println(a.size()));
componentsList.stream().forEach(a -> cassandraSession.executeWrite("INSERT INTO comp_data.comps" +
"(name, status, composite_id)" +
"VALUES(?, ?, ?)",a.getName(),a.getStatus(), a.getComposite_id()));
} catch (Exception e) {
e.printStackTrace();
}
ComponentsResponse userResponse = responseMapper.getResponse(componentsList);
return userResponse;
}
);
};
}
}
|
[
"[email protected]"
] | |
6f33b2d8f976ec7e17f499f17a46e45dbe709cf9
|
b8189e7badcfaad6ce1c1d0d06151b9be881e709
|
/src/AllTests/SideScroll.java
|
ea4f73ebfa2a8af61e69bd0a340cb96c9263a061
|
[] |
no_license
|
santhosh0118/Ebay_Assaignment
|
df0b09d70229bfbb917bfe3cb81a37cca86377f7
|
39d4c86d9b15560b5e93999024887d392f00d5eb
|
refs/heads/master
| 2021-01-18T18:35:11.620561 | 2014-09-24T11:35:52 | 2014-09-24T11:35:52 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,586 |
java
|
package AllTests;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.AfterMethod;
import test_utils.Helper;
public class SideScroll extends Helper{
public static Helper h=new Helper();
@Test
public void Sideescroll() {
//Login
h.sleep(2);
h.login();
//Clicking on the ebay logo to load the page completly.
if(driver.findElements(By.id(Or.getProperty("EbayLogo_id"))).size()>0){
System.out.println("Ebay logo Element Identified");
}else{
System.out.println("Ebay Element Cann't be Identify");
}
h.sleep(2);
driver.findElement(By.id(Or.getProperty("EbayLogo_id"))).click();
//Storing the container Elements into Arraylist
h.sleep(5);
if(driver.findElements(By.className(Or.getProperty("ScrollContainer_class"))).size()>0){
System.out.println("Container Element Identified");
}else{
System.out.println("Container Element Cann't be Identify");
}
if(driver.findElements(By.className(Or.getProperty("Radiobuttons_TagName"))).size()>0){
System.out.println("Elements in Container are Identified");
}else{
System.out.println("Elements in Container Cann't be Identify");
}
List<WebElement> sidescroll = driver.findElement(By.className(Or.getProperty("ScrollContainer_class"))).findElements(By.className(Or.getProperty("Radiobuttons_TagName")));
System.out.println("Number of items in container : " + sidescroll.size());
//Clicking the links and Printing their class.
for(int i=0;i<sidescroll.size();i++){
//System.out.println("Class Name After Selecting The Item : " + sidescroll.get(i).getAttribute("aria-label"));
//System.out.println("Class Name Before Selecting The Item : " + sidescroll.get(i).getAttribute("class"));
sidescroll.get(i).click();
if(sidescroll.get(i).getAttribute("class").equals("pg sel")){
System.out.println(sidescroll.get(i).getAttribute("aria-label") +" is Selected");
}else{
System.out.println("not selected");
}
}
//Verifying the right click button
System.out.println(" ");
System.out.println("Verifying links using Right Arrow ");
System.out.println("======================================================================================");
for (int j=0;j<sidescroll.size();j++){
driver.findElement(By.cssSelector("button.arrow.right")).click();
if(sidescroll.get(j).getAttribute("class").equals("pg sel")){
System.out.println(sidescroll.get(j).getAttribute("aria-label") +" is Selected");
}else{
System.out.println("not selected");
}
}
//Verifying the left click button
System.out.println(" ");
System.out.println("Verifying links using left Arrow ");
System.out.println("======================================================================================");
for (int k = sidescroll.size()-1;k>=0;k--){
System.out.println(sidescroll.get(k).getAttribute("aria-label") +" is Selected");
driver.findElement(By.cssSelector("button.arrow.left")).click();
}
}
@BeforeMethod
public void beforeMethod() {
//Opening the browser
h.browserType();
//Loading the website
h.loadPage();
}
@AfterMethod
public void afterMethod() {
//Closing the browser
h.closingBrowser();
}
}
|
[
"[email protected]"
] | |
a26b7de7e88632e1140388e12d5faebe31d2916e
|
f7f9d7fa841e856927e02513ecc74dc00c935f8a
|
/server/src/test/java/org/codelibs/fesen/search/profile/ProfileResultTests.java
|
3f73134e0f8877c45157d969b6011668c65ad4e2
|
[
"CDDL-1.0",
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"NAIST-2003",
"LicenseRef-scancode-generic-export-compliance",
"ICU",
"SunPro",
"Python-2.0",
"CC-BY-SA-3.0",
"MPL-1.1",
"GPL-2.0-only",
"CPL-1.0",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CC-PDDC",
"BSD-2-Clause",
"LicenseRef-scancode-unicode-mappings",
"LicenseRef-scancode-unicode",
"CC0-1.0",
"Apache-1.1",
"EPL-1.0",
"Classpath-exception-2.0"
] |
permissive
|
codelibs/fesen
|
3f949fd3533e8b25afc3d3475010d1b1a0d95c09
|
b2440fbda02e32f7abe77d2be95ead6a16c8af06
|
refs/heads/main
| 2022-07-27T21:14:02.455938 | 2021-12-21T23:54:20 | 2021-12-21T23:54:20 | 330,334,670 | 4 | 0 |
Apache-2.0
| 2022-05-17T01:54:31 | 2021-01-17T07:07:56 |
Java
|
UTF-8
|
Java
| false | false | 10,805 |
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.codelibs.fesen.search.profile;
import org.codelibs.fesen.common.Strings;
import org.codelibs.fesen.common.bytes.BytesReference;
import org.codelibs.fesen.common.xcontent.ToXContent;
import org.codelibs.fesen.common.xcontent.XContentBuilder;
import org.codelibs.fesen.common.xcontent.XContentFactory;
import org.codelibs.fesen.common.xcontent.XContentParser;
import org.codelibs.fesen.common.xcontent.XContentType;
import org.codelibs.fesen.search.profile.ProfileResult;
import org.codelibs.fesen.test.ESTestCase;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Predicate;
import static org.codelibs.fesen.common.xcontent.XContentHelper.toXContent;
import static org.codelibs.fesen.common.xcontent.XContentParserUtils.ensureExpectedToken;
import static org.codelibs.fesen.test.XContentTestUtils.insertRandomFields;
import static org.codelibs.fesen.test.hamcrest.FesenAssertions.assertToXContentEquivalent;
public class ProfileResultTests extends ESTestCase {
public static ProfileResult createTestItem(int depth) {
String type = randomAlphaOfLengthBetween(5, 10);
String description = randomAlphaOfLengthBetween(5, 10);
int breakdownsSize = randomIntBetween(0, 5);
Map<String, Long> breakdown = new HashMap<>(breakdownsSize);
while (breakdown.size() < breakdownsSize) {
long value = randomNonNegativeLong();
if (randomBoolean()) {
// also often use "small" values in tests
value = value % 10000;
}
breakdown.put(randomAlphaOfLengthBetween(5, 10), value);
}
int debugSize = randomIntBetween(0, 5);
Map<String, Object> debug = new HashMap<>(debugSize);
while (debug.size() < debugSize) {
debug.put(randomAlphaOfLength(5), randomAlphaOfLength(4));
}
int childrenSize = depth > 0 ? randomIntBetween(0, 1) : 0;
List<ProfileResult> children = new ArrayList<>(childrenSize);
for (int i = 0; i < childrenSize; i++) {
children.add(createTestItem(depth - 1));
}
return new ProfileResult(type, description, breakdown, debug, randomNonNegativeLong(), children);
}
public void testFromXContent() throws IOException {
doFromXContentTestWithRandomFields(false);
}
/**
* This test adds random fields and objects to the xContent rendered out to ensure we can parse it
* back to be forward compatible with additions to the xContent
*/
public void testFromXContentWithRandomFields() throws IOException {
doFromXContentTestWithRandomFields(true);
}
private void doFromXContentTestWithRandomFields(boolean addRandomFields) throws IOException {
ProfileResult profileResult = createTestItem(2);
XContentType xContentType = randomFrom(XContentType.values());
boolean humanReadable = randomBoolean();
BytesReference originalBytes = toShuffledXContent(profileResult, xContentType, ToXContent.EMPTY_PARAMS, humanReadable);
BytesReference mutated;
if (addRandomFields) {
// "breakdown" and "debug" just consists of key/value pairs, we shouldn't add anything random there
Predicate<String> excludeFilter = (s) ->
s.endsWith(ProfileResult.BREAKDOWN.getPreferredName()) || s.endsWith(ProfileResult.DEBUG.getPreferredName());
mutated = insertRandomFields(xContentType, originalBytes, excludeFilter, random());
} else {
mutated = originalBytes;
}
ProfileResult parsed;
try (XContentParser parser = createParser(xContentType.xContent(), mutated)) {
ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser);
parsed = ProfileResult.fromXContent(parser);
assertEquals(XContentParser.Token.END_OBJECT, parser.currentToken());
assertNull(parser.nextToken());
}
assertEquals(profileResult.getTime(), parsed.getTime());
assertToXContentEquivalent(originalBytes, toXContent(parsed, xContentType, humanReadable), xContentType);
}
public void testToXContent() throws IOException {
List<ProfileResult> children = new ArrayList<>();
children.add(new ProfileResult(
"child1",
"desc1",
org.codelibs.fesen.core.Map.of("key1", 100L),
org.codelibs.fesen.core.Map.of(),
100L,
org.codelibs.fesen.core.List.of())
);
children.add(new ProfileResult(
"child2",
"desc2",
org.codelibs.fesen.core.Map.of("key1", 123356L),
org.codelibs.fesen.core.Map.of(),
123356L,
org.codelibs.fesen.core.List.of()));
Map<String, Long> breakdown = new LinkedHashMap<>();
breakdown.put("key1", 123456L);
breakdown.put("stuff", 10000L);
Map<String, Object> debug = new LinkedHashMap<>();
debug.put("a", "foo");
debug.put("b", "bar");
ProfileResult result = new ProfileResult("someType", "some description", breakdown, debug, 223456L, children);
XContentBuilder builder = XContentFactory.jsonBuilder().prettyPrint();
result.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertEquals("{\n" +
" \"type\" : \"someType\",\n" +
" \"description\" : \"some description\",\n" +
" \"time_in_nanos\" : 223456,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 123456,\n" +
" \"stuff\" : 10000\n" +
" },\n" +
" \"debug\" : {\n" +
" \"a\" : \"foo\",\n" +
" \"b\" : \"bar\"\n" +
" },\n" +
" \"children\" : [\n" +
" {\n" +
" \"type\" : \"child1\",\n" +
" \"description\" : \"desc1\",\n" +
" \"time_in_nanos\" : 100,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 100\n" +
" }\n" +
" },\n" +
" {\n" +
" \"type\" : \"child2\",\n" +
" \"description\" : \"desc2\",\n" +
" \"time_in_nanos\" : 123356,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 123356\n" +
" }\n" +
" }\n" +
" ]\n" +
"}", Strings.toString(builder));
builder = XContentFactory.jsonBuilder().prettyPrint().humanReadable(true);
result.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertEquals("{\n" +
" \"type\" : \"someType\",\n" +
" \"description\" : \"some description\",\n" +
" \"time\" : \"223.4micros\",\n" +
" \"time_in_nanos\" : 223456,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 123456,\n" +
" \"stuff\" : 10000\n" +
" },\n" +
" \"debug\" : {\n" +
" \"a\" : \"foo\",\n" +
" \"b\" : \"bar\"\n" +
" },\n" +
" \"children\" : [\n" +
" {\n" +
" \"type\" : \"child1\",\n" +
" \"description\" : \"desc1\",\n" +
" \"time\" : \"100nanos\",\n" +
" \"time_in_nanos\" : 100,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 100\n" +
" }\n" +
" },\n" +
" {\n" +
" \"type\" : \"child2\",\n" +
" \"description\" : \"desc2\",\n" +
" \"time\" : \"123.3micros\",\n" +
" \"time_in_nanos\" : 123356,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 123356\n" +
" }\n" +
" }\n" +
" ]\n" +
"}", Strings.toString(builder));
result = new ProfileResult(
"profileName",
"some description",
org.codelibs.fesen.core.Map.of("key1", 12345678L),
org.codelibs.fesen.core.Map.of(),
12345678L,
org.codelibs.fesen.core.List.of()
);
builder = XContentFactory.jsonBuilder().prettyPrint().humanReadable(true);
result.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertEquals("{\n" +
" \"type\" : \"profileName\",\n" +
" \"description\" : \"some description\",\n" +
" \"time\" : \"12.3ms\",\n" +
" \"time_in_nanos\" : 12345678,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 12345678\n" +
" }\n" +
"}", Strings.toString(builder));
result = new ProfileResult(
"profileName",
"some description",
org.codelibs.fesen.core.Map.of("key1", 1234567890L),
org.codelibs.fesen.core.Map.of(),
1234567890L,
org.codelibs.fesen.core.List.of()
);
builder = XContentFactory.jsonBuilder().prettyPrint().humanReadable(true);
result.toXContent(builder, ToXContent.EMPTY_PARAMS);
assertEquals("{\n" +
" \"type\" : \"profileName\",\n" +
" \"description\" : \"some description\",\n" +
" \"time\" : \"1.2s\",\n" +
" \"time_in_nanos\" : 1234567890,\n" +
" \"breakdown\" : {\n" +
" \"key1\" : 1234567890\n" +
" }\n" +
"}", Strings.toString(builder));
}
}
|
[
"[email protected]"
] | |
1d2641789e09b880b1b239aa220700e448b32005
|
d31e20af5707c2f5a0b5406463881c9a14936efc
|
/src/main/java/br/com/vipmania/controller/UserController.java
|
5d32f110e81ce8b80de4e40579557e190905b8a4
|
[] |
no_license
|
LucasFerrazSilva/vipmania
|
a726b7201dcd2bccd56dcdb2894057f7838f3e6a
|
adfadb77ae9779bf7e762de6c532d2ad659a83b5
|
refs/heads/master
| 2021-05-05T05:14:56.576588 | 2018-10-26T12:24:32 | 2018-10-26T12:24:32 | 118,673,879 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 3,639 |
java
|
package br.com.vipmania.controller;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import br.com.vipmania.dao.UserDAO;
import br.com.vipmania.model.User;
import br.com.vipmania.validation.UserValidator;
@Controller
public class UserController {
@Autowired
private UserDAO dao;
@RequestMapping("/user/list")
public ModelAndView list() {
ModelAndView modelAndView = new ModelAndView("/user/list");
modelAndView.addObject("users", dao.list());
return modelAndView;
}
@RequestMapping("/user/form/{id}")
public ModelAndView form(@PathVariable("id") User user) {
ModelAndView modelAndView = new ModelAndView("/user/form");
modelAndView.addObject("user", (user != null ? user : new User()));
return modelAndView;
}
@RequestMapping("/user/home")
public ModelAndView home(@AuthenticationPrincipal User user) {
ModelAndView modelAndView = new ModelAndView("/user/form");
modelAndView.addObject("user", (user != null ? user : new User()));
return modelAndView;
}
@RequestMapping(value="/user/save", method=POST)
@Transactional
public ModelAndView save(@Valid User user, BindingResult bindingResult, RedirectAttributes redirectAttributes) {
if(bindingResult.hasErrors())
return form(user);
ModelAndView modelAndView = new ModelAndView("redirect:/");
dao.save(user);
redirectAttributes.addFlashAttribute("message", "Usuário cadastrado com sucesso!");
return modelAndView;
}
@RequestMapping("/user/changePasswordForm/{id}")
public ModelAndView changePasswordForm(@PathVariable("id") User user) {
ModelAndView modelAndView = new ModelAndView("/user/changePasswordForm");
modelAndView.addObject("user", user);
return modelAndView;
}
@RequestMapping(value="/user/changePassword", method=POST)
@Transactional
public ModelAndView changePassword(@Valid User user, BindingResult bindingResult, RedirectAttributes redirectAttributes) {
User actualUser = dao.get(user.getId());
if(actualUser.hasSamePassword(user.getActualPassword()) && user.hasValidNewPassword()) {
actualUser.setPasswordAndEncrypt(user.getNewPassword());
ModelAndView modelAndView = new ModelAndView("redirect:/");
dao.save(actualUser);
redirectAttributes.addFlashAttribute("message", "Senha alterada com sucesso!");
return modelAndView;
}
else {
ModelAndView modelAndView = new ModelAndView("redirect:/user/changePasswordForm/" + user.getId());
redirectAttributes.addFlashAttribute("message", "Erro ao alterar senha");
return modelAndView;
}
}
@RequestMapping("/user/createAccount")
public ModelAndView createAccount() {
ModelAndView modelAndView = new ModelAndView("/user/createAccount");
modelAndView.addObject("user", new User());
return modelAndView;
}
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.addValidators(new UserValidator());
}
}
|
[
"[email protected]"
] | |
d8a3af9720925191e4d48d6592d967c45ae280b1
|
f89170732586ff4caf28cb10fbfe0ab1c804d303
|
/src/main/java/com/menjin/api/service/APIAuthService.java
|
275370b2d3694f193984d01c58a506de03d16129
|
[] |
no_license
|
wille-li/menjin
|
b3bee31bcd6838f22d5ce08c0cc4c7a6aa919458
|
6a9ffd9c8f3ba1f2a9b949a25297b7c1813415a5
|
refs/heads/master
| 2020-07-17T21:58:09.282880 | 2018-08-12T15:09:49 | 2018-08-12T15:09:49 | 73,924,921 | 0 | 0 | null | 2016-12-29T14:35:44 | 2016-11-16T13:54:46 |
JavaScript
|
UTF-8
|
Java
| false | false | 332 |
java
|
package com.menjin.api.service;
import com.menjin.api.model.APIAuth;
public interface APIAuthService {
public Integer authByUsernameAndPassword(APIAuth aPIAuth);
public Integer authByToken(APIAuth aPIAuth);
public Integer createAuthInfo(APIAuth aPIAuth);
public Integer deleteAuthInfo(APIAuth aPIAuth);
}
|
[
"[email protected]"
] | |
e64b234ea307f804b96d835688321d61d0cde8df
|
56d9a917225720540067d22a29726ffb67cf8523
|
/src/main/java/challenge/design_patterns/creational_patterns/abstract_factory/pizza_store_ex/factory/pizza/SicilianPizzaFactory.java
|
a68424c08f36db93074b252a54c97d78f16fac7a
|
[] |
no_license
|
xuanvinhln/java-challenge
|
0775386854b4472b72f325fd17b560ee41d40cc6
|
91e443b3ab10190a2c40542fb20a287006073a83
|
refs/heads/master
| 2023-04-15T21:10:56.233738 | 2021-04-23T04:48:17 | 2021-04-23T04:48:17 | 352,489,016 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,381 |
java
|
package challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.factory.pizza;
import challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.factory.topping.BaseToppingFactory;
import challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.factory.topping.SicilianToppingFactory;
import challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.product.pizza.CheesePizza;
import challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.product.pizza.PepperoniPizza;
import challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.product.pizza.Pizza;
import challenge.design_patterns.creational_patterns.abstract_factory.pizza_store_ex.product.pizza.VeggiePizza;
public class SicilianPizzaFactory extends BasePizzaFactory {
@Override
public Pizza createPizza(String type) {
Pizza pizza;
BaseToppingFactory toppingFactory = new SicilianToppingFactory();
switch (type.toLowerCase()) {
case "cheese":
pizza = new CheesePizza(toppingFactory);
break;
case "pepperoni":
pizza = new PepperoniPizza(toppingFactory);
break;
case "veggie":
pizza = new VeggiePizza(toppingFactory);
break;
default:
throw new IllegalArgumentException("No such pizza.");
}
pizza.addIngredients();
pizza.bakePizza();
return pizza;
}
}
|
[
"[email protected]"
] | |
a7152de37a07bc15f1fbae10f7be587eb0c13be5
|
8dbb354ab75f04a3b2490e6306ee6fbf4faab498
|
/src/com/chloridrik/VueGen.java
|
ed941e8ee00c18538af8996971ee6d9036940cad
|
[] |
no_license
|
chloridrik/vuegen
|
6b06f1ac698bb6080bd047db7c2c392106627da8
|
f23a8bc32a921ecb4ca9eace16c17ba4983c4f55
|
refs/heads/master
| 2021-01-17T22:23:54.813226 | 2017-03-08T12:58:20 | 2017-03-08T12:58:20 | 84,196,815 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,865 |
java
|
package com.chloridrik;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.LangDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.psi.PsiDirectory;
import com.intellij.psi.PsiElement;
import com.intellij.util.IncorrectOperationException;
import com.intellij.ide.fileTemplates.FileTemplateManager;
import com.intellij.ide.fileTemplates.FileTemplate;
import com.intellij.ide.fileTemplates.FileTemplateUtil;
import org.jetbrains.annotations.NonNls;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;
/**
* Created by jsellam on 07/03/2017.
*/
public class VueGen extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
Project project = e.getProject();
final DataContext dataContext = e.getDataContext();
assert project != null;
PsiDirectory psiDirectory = null;
PsiElement psiElement = LangDataKeys.PSI_ELEMENT.getData(dataContext);
if(psiElement instanceof PsiDirectory) {
psiDirectory = (PsiDirectory)psiElement;
}
this.addFileTemplate("Vue view","vue");
this.addFileTemplate("Vue js","js");
this.addFileTemplate("Vue scss","scss");
this.makeFile(psiDirectory.getName(),psiDirectory,"Vue view");
this.makeFile(psiDirectory.getName(),psiDirectory,"Vue js");
this.makeFile(psiDirectory.getName(),psiDirectory,"Vue scss");
}
void makeFile(String fileName,PsiDirectory psiDirectory,String templatName)
{
Properties properties = new Properties(FileTemplateManager.getInstance().getDefaultProperties());
FileTemplateManager manager = FileTemplateManager.getInstance();
FileTemplate template = manager.getInternalTemplate(templatName);
try{
FileTemplateUtil.createFromTemplate(template, fileName, properties, psiDirectory);
}
catch (IncorrectOperationException error)
{
throw error;
}
catch (Exception error)
{
}
}
private void addFileTemplate(final @NonNls String name, @NonNls String ext) {
FileTemplate template = FileTemplateManager.getInstance().getTemplate(name);
if (template == null) {
try {
template =
FileTemplateManager.getInstance().addTemplate(name, ext);
template.setText(FileUtil.loadTextAndClose(
new InputStreamReader(this.getClass().getResourceAsStream("fileTemplates/"+ name + "." + ext + ".ft")))
);
} catch (IOException ex) {
}
}
}
}
|
[
"[email protected]"
] | |
45bfc01c84cbc5f4ad47263cdd8c041e21861955
|
b8eb9947c07db6d4165b61745185fc2aecc9885e
|
/chapt_4/3assignment/DistanceFile.java
|
14df96b4f4bd6232bfa53909bc69bda5d41f2433
|
[] |
no_license
|
leeb2828/java-homework
|
c1a85a5fd808822dacc2e9a29a1bd9521a3faecc
|
6375876a5ac65b90e81f9c6f1614bddf0857f3f5
|
refs/heads/master
| 2023-06-06T18:56:32.287216 | 2021-07-07T22:32:55 | 2021-07-07T22:32:55 | 383,935,825 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,925 |
java
|
/*
Modify the program you wrote for Programming Challenge 2 (Distance Traveled) so it
writes the report to a file instead of the screen. Open the file in Notepad or another text
editor to confirm the output.
CONCEPT: The Java API provides several classes that you can use for writing data to
a file and reading data from a file. To write data to a file, you can use the
PrintWriter class and, optionally, the FileWriter class. To read data
from a file, you can use the Scanner class and the File class.
*/
import java.util.Scanner;
import java.io.*;
public class DistanceFile {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Enter the name of the .txt file: "); // Data.txt
String filename = scan.nextLine();
/* Keep all of this code in the try and catch blocks. You have to tell
the compiler that there is a chance to throw a FileNotFoundException
if the file does not exist. PrintWriter class object requires it. */
try {
PrintWriter outputfile = new PrintWriter(filename);
int speed;
int hours;
System.out.print("Enter the speed of your vehicle (in miles-per-hour): "); // 40
speed = scan.nextInt();
System.out.print("Enter the number of hours traveled: "); // 3
hours = scan.nextInt();
outputfile.println("Hour\t\tDistanced Traveled");
outputfile.println("----------------------------------");
for (int i = 1; i <= hours; i++) {
outputfile.printf("%s \t\t %s \n", i, (speed * i));
}
scan.close();
outputfile.close();
System.out.println("Your " + filename + " should be created.");
} catch (FileNotFoundException ex) {
System.out.println("File Not Found!!!");
}
}
}
|
[
"[email protected]"
] | |
3106c8d27f9de3610abf818522011ff021e3c3f0
|
11c41356875917f93940c5726123dca80e219c33
|
/SEG3102Final/app/src/androidTest/java/com/TMS/uni/seg3102final/ApplicationTest.java
|
08598a7fffa2deb8e804f54aa6e7aef86d4ca3ea
|
[] |
no_license
|
MuraadHared/Android-Team-Management-System
|
9ff036bb9ac35e177057390b2b81020e587016a0
|
9ec3ba8a33d4e7156194a18ccc1568d527a5c4f1
|
refs/heads/master
| 2021-01-11T11:37:01.729501 | 2015-12-24T12:58:37 | 2015-12-24T12:58:37 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 355 |
java
|
package com.TMS.uni.seg3102final;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
[
"[email protected]"
] | |
c74c409d4342aa0090cc1d5ab78712d073dd6e93
|
64be5e71d335935fdc698c7019d1f6b1a9c1e10c
|
/src/main/java/xyz/nkomarn/LiquidFlux/container/FluxChargerContainer.java
|
4101a28ece2610f688909266522507a0d30e38e6
|
[
"MIT"
] |
permissive
|
nkomarn/LiquidFlux
|
a17651ee1e060a85b809fb42b413c98b540436ae
|
2a3f5d77762d219acb19901824d8639f66af62cd
|
refs/heads/master
| 2021-02-07T11:18:52.502903 | 2020-03-01T02:10:09 | 2020-03-01T02:10:09 | 244,019,067 | 0 | 0 |
MIT
| 2020-02-29T18:18:58 | 2020-02-29T18:18:50 | null |
UTF-8
|
Java
| false | false | 1,164 |
java
|
package xyz.nkomarn.LiquidFlux.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import xyz.nkomarn.LiquidFlux.tile.FluxChargerTile;
public class FluxChargerContainer extends Container {
private final IInventory playerInventory;
private final FluxChargerTile tile;
public FluxChargerContainer(IInventory playerInventory, FluxChargerTile thing) {
this.playerInventory = playerInventory;
this.tile = thing;
// Player Inventory, Slot 9-35, Slot IDs 9-35
for (int y = 0; y < 3; ++y) {
for (int x = 0; x < 9; ++x) {
this.addSlotToContainer(new Slot(playerInventory, x + y * 9 + 9, 8 + x * 18, 84 + y * 18));
}
}
// Player Inventory, Slot 0-8, Slot IDs 36-44
for (int x = 0; x < 9; ++x) {
this.addSlotToContainer(new Slot(playerInventory, x, 8 + x * 18, 142));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return true; // TODO check if usable by player
}
}
|
[
"[email protected]"
] | |
d2ef053a215e98b8e663f9a42312d715e777bc71
|
9913782fe054637a9702292869fe176972929ac6
|
/EXERCISE - SPRING DATA ADVANCED QUERING/advanced querying/src/main/java/course/springdata/intro/dao/AuthorRepository.java
|
815784cc640529758cca5c1c771295698c99516f
|
[] |
no_license
|
yavor300/SpringData
|
942b24362e80afd3eb7487c46e3e78ba6aada641
|
ee9c7a8cc3637bcd517b5b91cfda2adc33ad2341
|
refs/heads/main
| 2023-01-25T03:09:43.459124 | 2020-11-21T18:48:49 | 2020-11-21T18:48:49 | 306,287,724 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 345 |
java
|
package course.springdata.intro.dao;
import course.springdata.intro.entity.Author;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface AuthorRepository extends JpaRepository<Author, Long> {
Author getById(long id);
List<Author> getAllByFirstNameIsLike(String pattern);
}
|
[
"[email protected]"
] | |
9bf70a20418e27f57407fe60cf5e0b7ecfd24123
|
7d3ca7c8f39ae52f22ac8df207b27168e9215339
|
/oblik-modules/oblik-service-api/src/test/java/org/ua/oblik/service/beans/AccountCriteriaTest.java
|
d3da21cfdd75d109882c09994b611b3d2861fb07
|
[] |
no_license
|
antonbakalets/org-ua-oblik
|
c588dfa1d6b1b59ff5ca6c5b1ae63f809b00b62e
|
c153b8a58fd357608a140041de265eb2fcc2cf90
|
refs/heads/develop
| 2022-12-20T09:51:04.039822 | 2021-05-25T06:49:23 | 2021-05-25T06:49:23 | 10,977,326 | 2 | 1 | null | 2022-12-16T15:23:34 | 2013-06-26T19:47:12 |
Java
|
UTF-8
|
Java
| false | false | 1,005 |
java
|
package org.ua.oblik.service.beans;
import org.junit.Assert;
import org.junit.Test;
import org.ua.oblik.service.beans.AccountCriteria.Builder;
import static org.junit.Assert.*;
public class AccountCriteriaTest {
private static final int ID = 15;
@Test
public void testExcludeAccountId() throws Exception {
AccountCriteria criteria = new Builder().excludeAccountId(15).build();
assertEquals("Excluded account id must match.", Integer.valueOf(ID), criteria.getExcludeAccountId());
}
@Test
public void testCurrencyId() throws Exception {
AccountCriteria criteria = new Builder().setCurrencyId(15).build();
assertEquals("Currency id must match.", Integer.valueOf(ID), criteria.getCurrencyId());
}
@Test
public void testType() throws Exception {
AccountCriteria criteria = new Builder().setType(AccountVOType.EXPENSE).build();
assertEquals("Account type must match.", AccountVOType.EXPENSE, criteria.getType());
}
}
|
[
"[email protected]"
] | |
8b98aee18993c53a7251279356af1d679fcfcd75
|
1079252d9626952ac44d297952b0a7a13606abbe
|
/JavaLamdaExpressionBasic/src/com/java8/lamda/SolutionWithJava8.java
|
d5a220de09b12a51231583b79fafff46eb87213e
|
[] |
no_license
|
Skillnet-test/lamdaexpression
|
cd52d28e78daa1bda65d160656c8b0240c106cf3
|
b938723fb45783c914a2e73aa6d63b5283385b5d
|
refs/heads/master
| 2020-03-29T05:33:38.008756 | 2018-09-20T09:48:22 | 2018-09-20T09:48:22 | 149,587,565 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,713 |
java
|
package com.java8.lamda;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.function.Predicate;
public class SolutionWithJava8 {
public static void main(String[] args) {
// TODO Auto-generated method stub
List<Person> list=new ArrayList();
list.add(new Person("Charles","dickens",30));
list.add(new Person("Lewis","carroll",21));
list.add(new Person("Thomas","Carlyle",25));
list.add(new Person("Charlotte","Brante",26));
list.add(new Person("Mattern","Arnold",28));
// through java 8 with lamda expression
Collections.sort(list,(Person o1, Person o2)->o1.getSecondName().compareTo(o2.getSecondName()));
// step2: method to print all elements
System.out.println("printing all data");
printConditionally(list,(p)->true);
// step3: print all who have lastname starts with C
System.out.println("printing all objects which has second name starts with c");
// through java 8 with lamda expression
printConditionally(list,(Person p)->p.getSecondName().startsWith("C"));
System.out.println("printing all objects which has first name starts with c");
// through java 8 with lamda expression
printConditionally(list,(Person p)->p.getFirstName().startsWith("C"));
}
private static void printConditionally(List<Person> list, Predicate<Person> predicate) {
// TODO Auto-generated method stub
for(int i=0; i< list.size();i++){
Person p=(Person) list.get(i);
if(predicate.test(p)){
System.out.println(p.toString());
}
}
}
}
|
[
"[email protected]"
] | |
69c138097859e95eb635faa8d100962ef143eb88
|
5f274b6f35da87669e0ba211f4df3c05f2e27ff5
|
/src/main/java/com/nab/edcm/useraudit/persistence/model/User.java
|
339ebc21480e0e7a76816427064f730fe36e27f9
|
[] |
no_license
|
mapaclaon/useraudit
|
4f061ec22c672325fac33a7681824b8bbef188ce
|
914c6e0acebdbca0a99ddde81fb3d4256582c16c
|
refs/heads/master
| 2021-08-27T20:42:20.130282 | 2021-08-23T14:23:56 | 2021-08-23T14:23:56 | 174,342,454 | 0 | 0 | null | 2021-08-23T14:19:11 | 2019-03-07T12:45:17 |
Java
|
UTF-8
|
Java
| false | false | 389 |
java
|
package com.nab.edcm.useraudit.persistence.model;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Data
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
private String name;
private String email;
}
|
[
"[email protected]"
] | |
7bd9a8d95b41aa7bd6bb394f3dac8837d1f5b815
|
ccc3268554528f5ed5cc119bbd88cfc45b55691d
|
/java/l2p/gameserver/templates/item/support/EnchantItem.java
|
5a0dd7b302b906f5be549b25f6867df52c38b236
|
[] |
no_license
|
trickititit/java-source
|
447ea16c2892377a4625f742118ebfd4e3116848
|
724453441846ce44e65372100a70770f21572837
|
refs/heads/master
| 2021-01-18T09:38:01.836585 | 2016-09-17T17:43:34 | 2016-09-17T17:43:34 | 68,445,261 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,171 |
java
|
package l2p.gameserver.templates.item.support;
import java.util.Collections;
import java.util.Set;
import l2p.gameserver.templates.item.ItemTemplate;
import org.napile.primitive.Containers;
import org.napile.primitive.sets.IntSet;
import org.napile.primitive.sets.impl.HashIntSet;
public class EnchantItem {
private final int _itemId;
private final int _chance;
private final int _maxEnchant;
private IntSet _items = Containers.EMPTY_INT_SET;
private Set<ItemTemplate.Grade> _grades = Collections.emptySet();
public EnchantItem(int itemId, int chance, int maxEnchant) {
_itemId = itemId;
_chance = chance;
_maxEnchant = maxEnchant;
}
public void addItemId(int id) {
if (_items.isEmpty()) {
_items = new HashIntSet();
}
_items.add(id);
}
public int getItemId() {
return _itemId;
}
public int getChance() {
return _chance;
}
public int getMaxEnchant() {
return _maxEnchant;
}
public Set<ItemTemplate.Grade> getGrades() {
return _grades;
}
public IntSet getItems() {
return _items;
}
}
|
[
"[email protected]"
] | |
20359fe7487683eb3c48e71a8851db086d50bff3
|
b800f27c7adf004c2a4ade8031fab18af9204eb8
|
/src/test/java/com/czetsuyatech/HelloResourceTest.java
|
95c5f4c2f8de49ee35aef3608de6dfc875209b8d
|
[] |
no_license
|
odora/opencv-haar-java
|
d5090956a332a54d30fa70e0366f91731e58a47e
|
89f53c37b11357d2bf29833f305d76757ff494a2
|
refs/heads/master
| 2023-03-24T04:38:46.194404 | 2021-03-09T23:41:11 | 2021-03-09T23:41:11 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 439 |
java
|
package com.czetsuyatech;
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
@QuarkusTest
public class HelloResourceTest {
@Test
public void testHelloEndpoint() {
given()
.when().get("/hello")
.then()
.statusCode(200)
.body(is("Hello RESTEasy"));
}
}
|
[
"[email protected]"
] | |
a4ce1a48f5eadfc8235679cdb239925dc8f6eaa9
|
34235c1d1cf943bd7f478b121b72fe66b5a78320
|
/app/src/main/java/com/aspsine/multithreaddownload/demo/ui/adapter/RecyclerViewAdapter.java
|
45e1d2d13538c2f1c2752b4f70345faa9e03b15a
|
[
"Apache-2.0"
] |
permissive
|
huanting/MultiThreadDownload
|
36d34d2f6f429a81114c8b5c6039fc385b21b5ce
|
505afbfd97780bdec05be94a98d356e76b0d048d
|
refs/heads/master
| 2020-12-25T05:19:10.250092 | 2015-07-31T11:42:31 | 2015-07-31T11:42:31 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,779 |
java
|
package com.aspsine.multithreaddownload.demo.ui.adapter;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.aspsine.multithreaddownload.demo.R;
import com.aspsine.multithreaddownload.demo.entity.AppInfo;
import com.aspsine.multithreaddownload.demo.ui.activity.AppDetailActivity;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by Aspsine on 2015/7/8.
*/
public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private List<AppInfo> mAppInfos;
public RecyclerViewAdapter() {
this.mAppInfos = new ArrayList<>();
}
public void setData(List<AppInfo> appInfos) {
this.mAppInfos.clear();
this.mAppInfos.addAll(appInfos);
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_app, null);
final AppViewHolder holder = new AppViewHolder(itemView);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), AppDetailActivity.class);
intent.putExtra("EXTRA_APPINFO", mAppInfos.get(holder.getLayoutPosition()));
v.getContext().startActivity(intent);
}
});
return holder;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
bindData((AppViewHolder) holder, position);
}
@Override
public int getItemCount() {
return mAppInfos.size();
}
private void bindData(AppViewHolder holder, int position) {
AppInfo appInfo = mAppInfos.get(position);
holder.tvName.setText(appInfo.getName());
Picasso.with(holder.itemView.getContext()).load(appInfo.getImage()).into(holder.ivIcon);
holder.progressBar.setProgress(position * 5);
}
public static final class AppViewHolder extends RecyclerView.ViewHolder {
@Bind(R.id.ivIcon)
ImageView ivIcon;
@Bind(R.id.tvName)
TextView tvName;
@Bind(R.id.btnDownload)
Button btnDownload;
@Bind(R.id.progressBar)
ProgressBar progressBar;
public AppViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
}
|
[
"[email protected]"
] | |
f7d9cc8f879648559112d6690e9a83dcf87eb226
|
6d26e705330d9920fa224b2e8a8d18ceede0933c
|
/InstanceOf.java
|
c053098b57613187455be062cc0a963703eda5c3
|
[] |
no_license
|
zhaoga/JAVA-
|
f28f6eb867b91a477a34218a65406cdc6bd529b0
|
b68bda68d1c70cca3d478b677b404df8b3c3624f
|
refs/heads/main
| 2023-06-17T10:28:48.300028 | 2021-07-08T09:29:59 | 2021-07-08T09:29:59 | 384,065,561 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 597 |
java
|
package com.p5;
public class InstanceOf {
public static void main(String[] args) {
Object[] things = new Object[3];
things[0] = new Integer(4);
things[1] = new Double(3.14);
things[2] = new Double(2.09);
double s = 0;
for (int i = 0; i < things.length; i++){
if (things[i] instanceof Integer)
s += (((Integer) things[i]).intValue());
else if (things[i] instanceof Double)
s += ((Double)things[i]).doubleValue();
}
System.out.println("sum=" + s);
}
}
|
[
"[email protected]"
] | |
3035212cbe093e413bf2eeeb5f89adfb73068630
|
bc5bffcbadd509cdb28037b6038e055ddb68272a
|
/app/src/main/java/com/adolfo/timeclock/cam/FrontCameraRetriever.java
|
25b1485fcaed24ca22c9b1db453da59ff302ae54
|
[] |
no_license
|
softwarecomet/Tmeclocker
|
d1f09ec634ca33b57cafe2f24266c1ed50eb54ce
|
7c4317be39c33c5d59f763826aee02840ed64ce7
|
refs/heads/master
| 2021-01-03T14:26:33.470279 | 2020-02-13T03:46:39 | 2020-02-13T03:46:39 | 240,107,115 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,305 |
java
|
package com.adolfo.timeclock.cam;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
public class FrontCameraRetriever implements Application.ActivityLifecycleCallbacks, LoadFrontCameraAsyncTask.Listener {
private final Listener listener;
private FaceDetectionCamera camera;
public static void retrieveFor(Activity activity) {
if (!(activity instanceof Listener)) {
throw new IllegalStateException("Your activity needs to implement FrontCameraRetriever.Listener");
}
Listener listener = (Listener) activity;
retrieve(activity, listener);
}
private static void retrieve(Context context, Listener listener) {
Application application = (Application) context.getApplicationContext();
FrontCameraRetriever frontCameraRetriever = new FrontCameraRetriever(listener);
application.registerActivityLifecycleCallbacks(frontCameraRetriever);
}
FrontCameraRetriever(Listener listener) {
this.listener = listener;
}
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
// not used
}
@Override
public void onActivityStarted(Activity activity) {
// not used
}
@Override
public void onActivityResumed(Activity activity) {
new LoadFrontCameraAsyncTask(this).load();
}
@Override
public void onLoaded(FaceDetectionCamera camera) {
this.camera = camera;
listener.onLoaded(camera);
}
@Override
public void onFailedToLoadFaceDetectionCamera() {
listener.onFailedToLoadFaceDetectionCamera();
}
@Override
public void onActivityPaused(Activity activity) {
if (camera != null) {
camera.recycle();
}
}
@Override
public void onActivityStopped(Activity activity) {
// not used
}
@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
// not used
}
@Override
public void onActivityDestroyed(Activity activity) {
activity.getApplication().unregisterActivityLifecycleCallbacks(this);
}
public interface Listener extends LoadFrontCameraAsyncTask.Listener {
}
}
|
[
"[email protected]"
] | |
223628c364d46a5f37d0b00b0d6ca9822cca5d35
|
033a22be48fecfb67eba12f1a8feefc7c95c3dd3
|
/src/main/java/com/spring/brewery/web/model/v2/BeerDtoV2.java
|
9fca54328151aac4f4903fc08e1ff824a46a239d
|
[] |
no_license
|
shubhamgoel23/brewery
|
e5defd14fa4f91d730c7b35f618fba5a1b1442fd
|
20ba6bcb246b5d6087f729a8b74d6456901612e4
|
refs/heads/master
| 2020-12-09T15:44:04.585396 | 2020-01-12T16:40:10 | 2020-01-12T16:40:10 | 233,350,688 | 0 | 0 | null | 2020-01-12T16:40:11 | 2020-01-12T06:48:12 |
Java
|
UTF-8
|
Java
| false | false | 356 |
java
|
package com.spring.brewery.web.model.v2;
import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class BeerDtoV2 {
private UUID id;
private String beerName;
private BeerStyleEnum beerStyle;
private Long upc;
}
|
[
"[email protected]"
] | |
65a596bdd38641053ddd30acec68d6d2b95afd77
|
1ae52f2b0f0bc809f526fa44325ec1ec7e18a733
|
/zigbee_mweb/src/main/java/com/smartcold/zigbee/manage/dao/RdcExtMapper.java
|
05bab16dba72e353a299db248eb7da0b928d41fa
|
[] |
no_license
|
jiangkaiqiang/WLS
|
2c7248506532b45781de2a3c55eb956ceb4654e3
|
b9ad672966a12a7a9140d77c0f20a833f1f84c85
|
refs/heads/master
| 2021-01-17T17:48:48.532806 | 2017-07-14T08:19:43 | 2017-07-14T08:19:43 | 70,588,877 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 647 |
java
|
package com.smartcold.zigbee.manage.dao;
import com.smartcold.zigbee.manage.dto.RdcScoreDTO;
import com.smartcold.zigbee.manage.entity.RdcExtEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface RdcExtMapper {
List<RdcExtEntity> findRdcExtList();
List<RdcExtEntity> findRDCExtByRDCId(@Param("rdcID") int rdcID);
int insertRdcExt(RdcExtEntity rdcExt);
void updateRdcExt(RdcExtEntity rdcExtEntity);
void increasePageView(int rdcID);
List<RdcScoreDTO> findScoreRdcDTOList(@Param("npoint") int npoint);
List<RdcScoreDTO> findHotRdcDTOList(@Param("npoint") int npoint);
}
|
[
"[email protected]"
] | |
0d3daec749590ee3db519b247328219125452e15
|
e4c0b617bffef9354fe7e86d51033bab4096976f
|
/src/main/java/isel/mpd/weather/data/stringsuppliers/StringSupplier.java
|
dc53f4fb9427dd11a0484a02870bc8dd1ba0fe5d
|
[] |
no_license
|
carlosflorencio/LI41D-G12-MPD
|
ea0b413dcfed8d0d04105d566a90fd3e81dee511
|
a25099328402085dc4b454ccf24680d8d68c1c1d
|
refs/heads/master
| 2021-05-30T11:19:18.038891 | 2016-01-13T10:28:48 | 2016-01-13T10:28:48 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 255 |
java
|
package isel.mpd.weather.data.stringsuppliers;
import java.util.function.Supplier;
/**
* Base {@link Supplier} interface for supplying the strings corresponding to a full request
*/
public abstract class StringSupplier implements Supplier<String> {
}
|
[
"[email protected]"
] | |
8aa761c5b0e4300973ae9b3353688c0b0b3bf06d
|
831b274342b134f2c44088c8c3a124b8f55c814c
|
/BBDPDoctor/src/bbdp/push/fcm/PushTimerServlet.java
|
205c917a23d41358694caabbbd2f15f95ddc4307
|
[] |
no_license
|
padone/BBDP
|
dfbcd70dd240f95cbbc6d95c26275ec45392cdac
|
1cff182029e7ac923958acd74e244a11463853e0
|
refs/heads/master
| 2020-06-20T04:48:03.401723 | 2019-07-15T13:24:37 | 2019-07-15T13:24:37 | 196,999,353 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,811 |
java
|
package bbdp.push.fcm;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.tomcat.jdbc.pool.DataSource;
@WebServlet("/PushTimerServlet")
public class PushTimerServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String option = request.getParameter("option");
DataSource datasource = (DataSource) getServletContext().getAttribute("db");
if (option.equals("setPushTimer1")) { //設定推播計時器(type: 0-天, 1-週, 2-月, 3-秒*10(測試), 4-分(測試))(EX: 三(rate)天(type)一次,共三(times)次)
int type = Integer.parseInt(request.getParameter("type"));
int rate = Integer.parseInt(request.getParameter("rate"));
int times = Integer.parseInt(request.getParameter("times"));
String patientID = request.getParameter("patientID");
String title = request.getParameter("title");
String body = request.getParameter("body");
String hyperlink = request.getParameter("hyperlink");
String dbtableName = request.getParameter("dbtableName");
String dbIDName = request.getParameter("dbIDName");
String dbIDValue = request.getParameter("dbIDValue");
PushTimerServer.setPushTimer(datasource, type, rate, times, patientID, title, body, hyperlink, dbtableName, dbIDName, dbIDValue);
} else if (option.equals("setPushTimer2")) { //time格式: yyyy-mm-dd hh:mm:ss
String time = request.getParameter("time");
String patientID = request.getParameter("patientID");
String title = request.getParameter("title");
String body = request.getParameter("body");
String hyperlink = request.getParameter("hyperlink");
String dbtableName = request.getParameter("dbtableName");
String dbIDName = request.getParameter("dbIDName");
String dbIDValue = request.getParameter("dbIDValue");
PushTimerServer.setPushTimer(datasource, time, patientID, title, body, hyperlink, dbtableName, dbIDName, dbIDValue);
} else if(option.equals("deleteSpecificPushTimer")) { //刪除指定的timerTask
String patientID = request.getParameter("patientID");
String dbtableName = request.getParameter("dbtableName");
String dbIDName = request.getParameter("dbIDName");
String dbIDValue = request.getParameter("dbIDValue");
PushTimerServer.deleteSpecificPushTimer(datasource, patientID, dbtableName, dbIDName, dbIDValue);
} else if(option.equals("restartPushTimer")) { //重新啟動timer
PushTimerServer.restartPushTimer(datasource);
}
}
}
|
[
"[email protected]"
] | |
56833d484374e444d4beafe5339fb76ebfa074b6
|
ddc7f1f108db5709824ad228047c2288e3353708
|
/app/src/main/java/com/example/nice/everywhere/ui/main/activity/HomeRouteActivity.java
|
3859741735a008885609c2b2f2931eab0c6a8b05
|
[] |
no_license
|
SupanWang/everywhere
|
19fd9179e9481f4f960bf24045e6ee9c040e44e2
|
3ddc64479a0489957c4f74015b656f5ab123f89e
|
refs/heads/master
| 2020-05-19T16:20:13.042319 | 2019-05-16T02:18:56 | 2019-05-16T02:18:56 | 185,105,304 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 16,738 |
java
|
package com.example.nice.everywhere.ui.main.activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.example.nice.everywhere.R;
import com.example.nice.everywhere.bean.RouteCollectBean;
import com.example.nice.everywhere.bean.RouteDetalBean;
import com.example.nice.everywhere.model.RouteModelImpl;
import com.example.nice.everywhere.net.HomeService;
import com.example.nice.everywhere.presenter.RoutePresenter;
import com.example.nice.everywhere.presenter.RoutePresenterImpl;
import com.example.nice.everywhere.util.Logger;
import com.example.nice.everywhere.util.ToastUtil;
import com.example.nice.everywhere.view.main.RouteView;
import com.umeng.socialize.ShareAction;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.media.UMImage;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
public class HomeRouteActivity extends AppCompatActivity implements RouteView, View.OnClickListener {
private TextView txt_route_city;
private TextView txt_route_name;
private TextView txt_route_desc;
private ImageView img_big_home;
private ImageView img_banmi;
private TextView txt_banmi_name;
private TextView txt_banmi_work;
private TextView txt_banmi_city;
private TextView txt_banmi_desc;
private ImageView img_talk1;
private TextView txt_talk1_user;
private TextView txt_talk1_time;
private TextView txt_talk1_desc;
private ImageView img_talk2;
private TextView txt_talk2_user;
private TextView txt_talk2_time;
private TextView txt_talk2_biaoqing;
private ImageView img_talk3;
private TextView txt_talk3_user;
private TextView txt_talk3_time;
private TextView txt_talk3_desc;
private TextView txt_pingjia;
private Button mBtn_share;
private Button mBtn_collect;
private RelativeLayout rlv_gongneng;
private Button mBtn_route;
private Button mBtn_price;
private ScrollView scroll;
private ArrayList<RouteDetalBean.ResultBean.RouteBean> routeBeans;
private ArrayList<RouteDetalBean.ResultBean.BanmiBean> banmiBeans;
private ArrayList<RouteDetalBean.ResultBean.ReviewsBean> reviewsBeans;
private RouteDetalBean.ResultBean.RouteBean route;
private RouteDetalBean.ResultBean.BanmiBean banmi;
private List<RouteDetalBean.ResultBean.ReviewsBean> reviews;
private String id;
// private FloatingActionButton floatbutton;
private boolean isCollected;
private Button mBtn_Yicollect;
private String routeID;
private UMShareListener umShareListener = new UMShareListener() {
/**
* @descrption 分享开始的回调
* @param platform 平台类型
*/
@Override
public void onStart(SHARE_MEDIA platform) {
}
/**
* @descrption 分享成功的回调
* @param platform 平台类型
*/
@Override
public void onResult(SHARE_MEDIA platform) {
Toast.makeText(HomeRouteActivity.this, "成功了", Toast.LENGTH_LONG).show();
}
/**
* @descrption 分享失败的回调
* @param platform 平台类型
* @param t 错误原因
*/
@Override
public void onError(SHARE_MEDIA platform, Throwable t) {
Toast.makeText(HomeRouteActivity.this, "失败" + t.getMessage(), Toast.LENGTH_LONG).show();
}
/**
* @descrption 分享取消的回调
* @param platform 平台类型
*/
@Override
public void onCancel(SHARE_MEDIA platform) {
Toast.makeText(HomeRouteActivity.this, "取消了", Toast.LENGTH_LONG).show();
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_route);
Intent intent = getIntent();
id = intent.getStringExtra("id");
initView();
initData();
}
private void initData() {
RoutePresenter routePresenter = new RoutePresenterImpl(new RouteModelImpl(), this);
routePresenter.getRouteList(id);
}
private void initView() {
txt_route_city = (TextView) findViewById(R.id.txt_route_city);
txt_route_city.setOnClickListener(this);
txt_route_name = (TextView) findViewById(R.id.txt_route_name);
txt_route_name.setOnClickListener(this);
txt_route_desc = (TextView) findViewById(R.id.txt_route_desc);
txt_route_desc.setOnClickListener(this);
img_big_home = (ImageView) findViewById(R.id.img_big_home);
img_big_home.setOnClickListener(this);
img_banmi = (ImageView) findViewById(R.id.img_banmi);
img_banmi.setOnClickListener(this);
txt_banmi_name = (TextView) findViewById(R.id.txt_banmi_name);
txt_banmi_name.setOnClickListener(this);
txt_banmi_work = (TextView) findViewById(R.id.txt_banmi_work);
txt_banmi_work.setOnClickListener(this);
txt_banmi_city = (TextView) findViewById(R.id.txt_banmi_city);
txt_banmi_city.setOnClickListener(this);
txt_banmi_desc = (TextView) findViewById(R.id.txt_banmi_desc);
txt_banmi_desc.setOnClickListener(this);
img_talk1 = (ImageView) findViewById(R.id.img_talk1);
img_talk1.setOnClickListener(this);
txt_talk1_user = (TextView) findViewById(R.id.txt_talk1_user);
txt_talk1_user.setOnClickListener(this);
txt_talk1_time = (TextView) findViewById(R.id.txt_talk1_time);
txt_talk1_time.setOnClickListener(this);
txt_talk1_desc = (TextView) findViewById(R.id.txt_talk1_desc);
txt_talk1_desc.setOnClickListener(this);
img_talk2 = (ImageView) findViewById(R.id.img_talk2);
img_talk2.setOnClickListener(this);
txt_talk2_user = (TextView) findViewById(R.id.txt_talk2_user);
txt_talk2_user.setOnClickListener(this);
txt_talk2_time = (TextView) findViewById(R.id.txt_talk2_time);
txt_talk2_time.setOnClickListener(this);
txt_talk2_biaoqing = (TextView) findViewById(R.id.txt_talk2_biaoqing);
txt_talk2_biaoqing.setOnClickListener(this);
img_talk3 = (ImageView) findViewById(R.id.img_talk3);
img_talk3.setOnClickListener(this);
txt_talk3_user = (TextView) findViewById(R.id.txt_talk3_user);
txt_talk3_user.setOnClickListener(this);
txt_talk3_time = (TextView) findViewById(R.id.txt_talk3_time);
txt_talk3_time.setOnClickListener(this);
txt_talk3_desc = (TextView) findViewById(R.id.txt_talk3_desc);
txt_talk3_desc.setOnClickListener(this);
txt_pingjia = (TextView) findViewById(R.id.txt_pingjia);
txt_pingjia.setOnClickListener(this);
mBtn_share = (Button) findViewById(R.id.mBtn_share);
mBtn_share.setOnClickListener(this);
mBtn_collect = (Button) findViewById(R.id.mBtn_collect);
mBtn_collect.setOnClickListener(this);
rlv_gongneng = (RelativeLayout) findViewById(R.id.rlv_gongneng);
rlv_gongneng.setOnClickListener(this);
mBtn_route = (Button) findViewById(R.id.mBtn_route);
mBtn_route.setOnClickListener(this);
mBtn_price = (Button) findViewById(R.id.mBtn_price);
mBtn_price.setOnClickListener(this);
scroll = (ScrollView) findViewById(R.id.scroll);
scroll.setOnClickListener(this);
mBtn_Yicollect = (Button) findViewById(R.id.mBtn_Yicollect);
mBtn_Yicollect.setOnClickListener(this);
// floatbutton = (FloatingActionButton) findViewById(R.id.floatbutton);
/* floatbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});*/
list();
}
private void list() {
routeBeans = new ArrayList<>();
reviewsBeans = new ArrayList<>();
banmiBeans = new ArrayList<>();
}
@Override
public void onSuccess(RouteDetalBean routeDetalBean) {
route = routeDetalBean.getResult().getRoute();
banmi = routeDetalBean.getResult().getBanmi();
reviews = routeDetalBean.getResult().getReviews();
//路线
txt_route_city.setText(route.getCity());
txt_route_name.setText(route.getTitle());
txt_route_desc.setText(route.getIntro());
mBtn_price.setText("¥" + route.getPrice());
RoundedCorners roundedCorners = new RoundedCorners(15);//数字为圆角度数
RequestOptions coverRequestOptions = new RequestOptions()
.transforms(roundedCorners)
.placeholder(R.drawable.zhanweitu_home_kapian) //占位图
.diskCacheStrategy(DiskCacheStrategy.ALL)//不做磁盘缓存
.skipMemoryCache(true);//不做内存缓存
if (route.getCardURL()!=null) {
Glide.with(this).load(route.getCardURL()).apply(coverRequestOptions).into(img_big_home);
}
//伴米
RequestOptions options = RequestOptions.circleCropTransform();
Glide.with(this).load(banmi.getPhoto()).apply(options).into(img_banmi);
txt_banmi_name.setText(banmi.getName());
txt_banmi_work.setText(banmi.getOccupation());
txt_banmi_city.setText(banmi.getLocation());
txt_banmi_desc.setText(banmi.getIntroduction());
//用户评价
Glide.with(this).load(reviews.get(0).getUserPhoto()).apply(options).into(img_talk1);
txt_talk1_user.setText(reviews.get(0).getUserName());
txt_talk1_time.setText(reviews.get(0).getCreatedAt());
txt_talk1_desc.setText(reviews.get(0).getContent());
//用户评价2
Glide.with(this).load(reviews.get(1).getUserPhoto()).apply(options).into(img_talk2);
txt_talk2_user.setText(reviews.get(1).getUserName());
txt_talk2_time.setText(reviews.get(1).getCreatedAt());
txt_talk2_biaoqing.setText(reviews.get(1).getContent());
//用户评价3
Glide.with(this).load(reviews.get(2).getUserPhoto()).apply(options).into(img_talk3);
txt_talk3_user.setText(reviews.get(2).getUserName());
txt_talk3_time.setText(reviews.get(2).getCreatedAt());
txt_talk3_desc.setText(reviews.get(2).getContent());
isCollected = route.isIsCollected();
if (isCollected) {
mBtn_Yicollect.setVisibility(View.VISIBLE);
mBtn_collect.setVisibility(View.GONE);
} else {
mBtn_collect.setVisibility(View.VISIBLE);
mBtn_Yicollect.setVisibility(View.GONE);
}
}
@Override
public void onFalied(String str) {
Logger.println(str);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.mBtn_share:
shareBorad();//分享
break;
case R.id.mBtn_collect:
isCollected = route.isIsCollected();
if (isCollected) {
mBtn_Yicollect.setVisibility(View.VISIBLE);
mBtn_collect.setVisibility(View.GONE);
} else {
mBtn_collect.setVisibility(View.VISIBLE);
mBtn_Yicollect.setVisibility(View.GONE);
}
collectRoute();//收藏线路
break;
case R.id.mBtn_Yicollect:
if (isCollected) {
mBtn_collect.setVisibility(View.VISIBLE);
mBtn_Yicollect.setVisibility(View.GONE);
} else {
mBtn_Yicollect.setVisibility(View.VISIBLE);
mBtn_collect.setVisibility(View.GONE);
}
collectRoute();//收藏线路
break;
case R.id.mBtn_route:
break;
case R.id.mBtn_price:
break;
case R.id.txt_pingjia:
if (route!=null) {
Intent intent = new Intent(HomeRouteActivity.this, DiscussActivity.class);
intent.putExtra("routeId", route.getId() + "");
startActivity(intent);
}
break;
}
}
private void shareBorad() {
UMImage thumb = new UMImage(this, route.getShareImageWechat());
//
thumb.compressStyle = UMImage.CompressStyle.SCALE;//大小压缩,默认为大小压缩,
new ShareAction(HomeRouteActivity.this).withText(route.getShareContent())
.withMedia(thumb).
setDisplayList(SHARE_MEDIA.SINA, SHARE_MEDIA.QQ, SHARE_MEDIA.WEIXIN)
.setCallback(umShareListener).open();
}
private void collectRoute() {
if (isCollected) {
Retrofit build = new Retrofit.Builder()
.baseUrl(HomeService.HomeUrl)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.build();
HomeService homeService = build.create(HomeService.class);
Observable<RouteCollectBean> collectRoute = homeService.getCollectRouteDis(id);
collectRoute.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<RouteCollectBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(RouteCollectBean routeCollectBean) {
ToastUtil.showShort("取消收藏成功");
mBtn_collect.setVisibility(View.VISIBLE);
mBtn_Yicollect.setVisibility(View.GONE);
route.setIsCollected(false);
}
@Override
public void onError(Throwable e) {
ToastUtil.showShort("取消收藏失败:" + e.getMessage());
}
@Override
public void onComplete() {
}
});
} else {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(HomeService.HomeUrl)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
HomeService service = retrofit.create(HomeService.class);
Observable<RouteCollectBean> collectRouteDis = service.getCollectRoute(id);
collectRouteDis.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<RouteCollectBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(RouteCollectBean routeCollectBean) {
ToastUtil.showShort("收藏成功");
mBtn_Yicollect.setVisibility(View.VISIBLE);
mBtn_collect.setVisibility(View.GONE);
route.setIsCollected(true);
}
@Override
public void onError(Throwable e) {
ToastUtil.showShort("收藏失败:" + e.getMessage());
}
@Override
public void onComplete() {
}
});
}
}
}
|
[
"[email protected]"
] | |
d7d8236bbc68414d25aa549f4bba56aba6c2a559
|
c6f98315227699ca0294448f2b711bae82f9fde2
|
/app/src/main/java/com/example/hemant/bottom/HomeFragment.java
|
bce6ecb6bb9cf59affb34f74f0643dd758ac4daf
|
[] |
no_license
|
Hemant27031999/Bottom
|
9a284e56efac2623b0d65bea04766f97a2883b84
|
d9149551d7e9347b2df39116146ea456d4879058
|
refs/heads/master
| 2020-04-15T12:59:22.826537 | 2019-01-13T17:34:06 | 2019-01-13T17:34:06 | 164,697,033 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 9,799 |
java
|
package com.example.hemant.bottom;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.data.BarData;
import com.github.mikephil.charting.data.BarDataSet;
import com.github.mikephil.charting.data.BarEntry;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.interfaces.datasets.IBarDataSet;
import com.github.mikephil.charting.utils.ColorTemplate;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.UserProfileChangeRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* A simple {@link Fragment} subclass.
*/
public class HomeFragment extends Fragment {
private Statistics statistics1;
private Statistics statistics2;
private TextView subscribersPreviewPewdiepie;
private TextView subscribersPreviewtseries;
private TextView difference;
private LinearLayout youtubetseries;
private LinearLayout youtubepewdiepie;
private int s1, s2;
private String differ;
private BarChart barChart;
private Timer t;
String API_Key = "AIzaSyAyON6YdgkFrtNHrGGs3IFS4groadJhhts";
public HomeFragment() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@Override
public void
onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.homemenu, menu);
super.onCreateOptionsMenu(menu, inflater);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
FragmentManager manager = getFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
switch (item.getItemId()) {
case R.id.ocs:
OtherChannelFragment pf = new OtherChannelFragment();
transaction.replace(R.id.fragment_container, pf);
transaction.commit();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_home, null);
subscribersPreviewPewdiepie = (TextView) view.findViewById(R.id.pewdiepiesubscribers);
subscribersPreviewtseries = (TextView) view.findViewById(R.id.tseriessubscribers);
difference = (TextView) view.findViewById(R.id.Difference);
youtubetseries = (LinearLayout) view.findViewById(R.id.subscrbertseries);
s1 = 0;
s2 = 0;
barChart = (BarChart) view.findViewById(R.id.bargraph);
youtubetseries.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.youtube.com/user/tseries")));
}
});
youtubepewdiepie = (LinearLayout) view.findViewById(R.id.subscrberpewdiepie);
youtubepewdiepie.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.youtube.com/user/pewdiepie")));
}
});
t = new Timer();
//Set the schedule function and rate
t.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
//Called each time when 1000 milliseconds (1 second) (the period parameter)
ApiInterface service = ApiClient.getClient().create(ApiInterface.class);
Call<Mainjson> call = service.getMainJson("statistics", "pewdiepie", API_Key);
call.enqueue(new Callback<Mainjson>() {
@Override
public void onResponse(Call<Mainjson> call, Response<Mainjson> response) {
List<Items> items = response.body().getItems();
statistics1 = items.get(0).getStatistics();
String s = statistics1.getSubscriberCount();
s1 = Integer.parseInt(statistics1.getSubscriberCount());
subscribersPreviewPewdiepie.setText(statistics1.getSubscriberCount());
}
@Override
public void onFailure(Call<Mainjson> call, Throwable t) {
Toast.makeText(getContext(), "Failed to retrieve data", Toast.LENGTH_SHORT).show();
}
});
Call<Mainjson> call1 = service.getMainJson("statistics", "tseries", API_Key);
call1.enqueue(new Callback<Mainjson>() {
@Override
public void onResponse(Call<Mainjson> call, Response<Mainjson> response) {
List<Items> items = response.body().getItems();
statistics2 = items.get(0).getStatistics();
s2 = Integer.parseInt(statistics2.getSubscriberCount());
subscribersPreviewtseries.setText(statistics2.getSubscriberCount());
differ = Integer.toString((((s1 - s2) > 0) ? (s1 - s2) : (s2 - s1)));
difference.setText(differ);
graphset(s1, s2);
}
@Override
public void onFailure(Call<Mainjson> call, Throwable t) {
Toast.makeText(getContext(), "Failed to retrieve data", Toast.LENGTH_SHORT).show();
}
});
}
},
//Set how long before to start calling the TimerTask (in milliseconds)
0,
//Set the amount of time between each execution (in milliseconds)
100);
return view;
}
private void graphset(int i1, int i2) {
ArrayList<BarEntry> barEntries = new ArrayList<>();
barEntries.add(new BarEntry(1f, i1));
barEntries.add(new BarEntry(2f, i2));
BarDataSet barDataSet = new BarDataSet(barEntries, "Channels");
barDataSet.setColors(ColorTemplate.COLORFUL_COLORS);
BarData barData = new BarData(barDataSet);
barData.setBarWidth(0.7f);
barChart.setData(barData);
barChart.setTouchEnabled(true);
barChart.setDragEnabled(true);
barChart.setFitBars(true);
barChart.setScaleEnabled(true);
barChart.invalidate();
XAxis xAxis = barChart.getXAxis();
xAxis.setDrawAxisLine(true);
xAxis.setDrawGridLines(false);
// final ArrayList<String> xAxisLabel = new ArrayList<>();
// xAxisLabel.add("PewDiePie");
// xAxisLabel.add("T-series");
// String[] xAxisLabel=new String[]{"PewDiePie","T-series"};
//
// xAxis.setValueFormatter(new MyXAxisValueFormatter(xAxisLabel));
// public class MyXAxisValueFormatter implements IAxisValueFormatter {
//
// private String[] mValues;
//
// public MyXAxisValueFormatter(String[] values) {
// this.mValues = values;
// }
//
// @Override
// public String getFormattedValue(float value, AxisBase axis) {
// // "value" represents the position of the label on the axis (x or y)
// return mValues[(int) value];
// }
//
// @Override
// public int getDecimalDigits() {
// return 0;
// }
//
// }
}
}
|
[
"[email protected]"
] | |
cea74d366cf82e15e8b416196320dea16475a05a
|
bfb3a0bca3afdd0df6bd2fcb760ea7b7c98f89d4
|
/src/main/java/com/virtualspace/twodimcode/web/TwoDimCodeOutConfig.java
|
cacc34281ef332384b8341c597fcd0b36d456e21
|
[] |
no_license
|
h-virtualspace/web
|
436d64768c74a6760a069a8da4c5a3a80c2d8fb6
|
ec22e551315a6203f52e9953724e9467476d5514
|
refs/heads/master
| 2021-01-19T18:44:29.875238 | 2017-07-02T10:14:52 | 2017-07-02T10:14:52 | 101,160,796 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,125 |
java
|
package com.virtualspace.twodimcode.web;
import java.awt.Color;
import net.glxn.qrgen.image.ImageType;
public class TwoDimCodeOutConfig
{
private int imgSize = 120;
private int margin = 0;
private ImageType imageType = ImageType.PNG;
private Color backgroundColor = Color.WHITE;
private Color color = Color.BLACK;
public TwoDimCodeOutConfig(){};
public TwoDimCodeOutConfig(int size)
{
this.setImgSize(size);
}
public ImageType getImageType() {
return imageType;
}
public void setImageType(ImageType imageType) {
this.imageType = imageType;
}
public int getImgSize() {
return imgSize;
}
public void setImgSize(int imgSize) {
this.imgSize = imgSize;
}
public int getMargin() {
return margin;
}
public void setMargin(int margin) {
this.margin = margin;
}
public Color getBackgroundColor() {
return backgroundColor;
}
public void setBackgroundColor(Color backgroundColor) {
this.backgroundColor = backgroundColor;
}
public Color getColor() {
return color;
}
public void setColor(Color color) {
this.color = color;
}
}
|
[
"[email protected]"
] | |
dfec5b7bbfdee19081ea508ac4cfaac1f6c39f88
|
9ebc5abdbcefb3532742c644b71a053a41382fd0
|
/mmanager/src/main/java/cn/com/caogen/entity/UserRole.java
|
93011562f6b001fb61ca9fa0ab4589f3c4e4f56a
|
[] |
no_license
|
yanqingdocker/newproject
|
559ec483ef63611274cce920607b6494cfdc80cf
|
e0f753c49c24d4e191e3b8d713a3bff598867b56
|
refs/heads/master
| 2020-04-15T21:34:36.089484 | 2019-01-10T10:26:14 | 2019-01-10T10:26:14 | 165,038,009 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 248 |
java
|
package cn.com.caogen.entity;
import lombok.Getter;
import lombok.Setter;
/**
* author:huyanqing
* Date:2018/5/17
*/
@Setter
@Getter
public class UserRole {
private int id;
private int userid;
private int roleid;
}
|
[
"[email protected]"
] | |
110f7f467e745d7edc954cc1b6462f3860073754
|
4e01016ba2daadbdc43bba2d6b58d59ad941e7cb
|
/src/java/com/cqut/service/ProcessDescription/ProcessDescriptionService.java
|
7466bf2c3f179bb92b64a0887fb5d74919d58d8e
|
[] |
no_license
|
icebaerIT/HSServiceManageForSale
|
4f855312d4502f0b2310ec017ef7ef9ba8c96e5f
|
b07290de308e1d55e122a710815b809d7b6cf8e6
|
refs/heads/master
| 2021-01-12T10:54:39.397992 | 2016-11-03T14:13:27 | 2016-11-03T14:13:27 | 72,753,108 | 0 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,087 |
java
|
package com.cqut.service.ProcessDescription;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cqut.service.search.SearchService;
import com.cqut.tool.util.BeanUtil;
import com.cqut.tool.util.EntityIDFactory;
import com.cqut.dao.ProcessDescription.ProcessDescriptionDao;
import com.cqut.entity.CheckProcess.CheckProcess;
import com.cqut.entity.ProcessDescription.ProcessDescription;
@Service
public class ProcessDescriptionService extends SearchService implements IProcessDescriptionService{
@Resource(name="processDescriptionDao")
ProcessDescriptionDao dao ;
@Override
public String getBaseEntityName() {
return "processDescription";
}
@Override
public String getBasePrimaryKey() {
return "processDescription.ID";
}
/**
* 胡定鹏
* 保存流程描述信息
* @param processDescription
* @return
*/
//保存流程信息
@Override
public int saveProcessDescription(ProcessDescription processDescription){
return dao.save(processDescription);
}
/**
* 修改流程描述信息
*/
@Override
public int updateProcessDescription(ProcessDescription processDescription){
return dao.updateByID(processDescription, processDescription.getID());
}
/**
* 胡定鹏
* 传入条件,获取流程描述信息
*/
@Override
public List<ProcessDescription> getProcessDescriptionByCondition(String condition){
return dao.getByCondition(condition);
}
/**
* 胡定鹏
* 传入报销ID、排序方式,关联了员工表
*/
@Override
public List<Map<String,Object>> originalSearchForeign(String quotedPriceID,String sort){
String condition=" e.ID=pd.checkUserID AND pd.submitAccountID='"+quotedPriceID+"' order by pd.orderNumber "+sort+" ";
return this.originalSearchForeign(new String[]{"pd.*","e.employeeName"}, "processdescription AS pd,", "employee AS e", null, condition , false);
}
public int savaProcessDescription(ProcessDescription data) {
String ID=BeanUtil.createId();
data.setID(ID);
return dao.save(data);
}
}
|
[
"[email protected]"
] | |
8ef17d26869c012db6df2b5bc5401072c4859ff6
|
ef0e2ba1f5afeff2753ed1528d85929b6ec969fe
|
/src/com/kylenanakdewa/simplewebhooks/WebhooksCommands.java
|
c2dbd41368a8153e47004b3cffbf7bc3b7395192
|
[
"MIT"
] |
permissive
|
mcrelieve/SimpleWebhooks
|
1f5af0a00e7110fa2576768e73e5bbdc2034c10d
|
a75ebfa4493f0558e658c9042f352e156f0fe53f
|
refs/heads/main
| 2023-03-16T01:44:42.538368 | 2021-01-13T05:40:55 | 2021-01-13T05:40:55 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,522 |
java
|
package com.kylenanakdewa.simplewebhooks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
/**
* Commands for the SimpleWebhooks plugin.
*/
public class WebhooksCommands implements TabExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
// Version command
if(args.length==0 || args[0].equalsIgnoreCase("version")){
sender.sendMessage("SimpleWebhooks "+WebhooksPlugin.plugin.getDescription().getVersion()+" by Kyle Nanakdewa");
sender.sendMessage("- A simple plugin for sending data to webhooks.");
sender.sendMessage("- Website: http://Akenland.com/plugins");
return true;
}
// List command
if(args.length==1 && args[0].equalsIgnoreCase("list")){
sender.sendMessage("--- Join Webhooks ---");
for(Map.Entry<String,Webhook> entry : WebhooksPlugin.joinWebhooks.entrySet()){
sender.sendMessage("- "+entry.getKey()+" - "+entry.getValue().getURL());
}
sender.sendMessage("--- Quit Webhooks ---");
for(Map.Entry<String,Webhook> entry : WebhooksPlugin.quitWebhooks.entrySet()){
sender.sendMessage("- "+entry.getKey()+" - "+entry.getValue().getURL());
}
sender.sendMessage("--- Chat Webhooks ---");
for(Map.Entry<String,Webhook> entry : WebhooksPlugin.chatWebhooks.entrySet()){
sender.sendMessage("- "+entry.getKey()+" - "+entry.getValue().getURL());
}
sender.sendMessage("--- Other Webhooks ---");
for(Map.Entry<String,Webhook> entry : WebhooksPlugin.otherWebhooks.entrySet()){
sender.sendMessage("- "+entry.getKey()+" - "+entry.getValue().getURL());
}
return true;
}
// Reload command
if(args.length==1 && args[0].equalsIgnoreCase("reload")){
WebhooksPlugin.plugin.loadConfig();
sender.sendMessage("Webhooks reloaded.");
return true;
}
// Execute command
if(args.length>=2 && args[0].equalsIgnoreCase("execute")){
// Find the webhook
String name = args[1].toLowerCase();
Webhook webhook;
webhook = WebhooksPlugin.otherWebhooks.get(name);
// Check the other types, if not found
if(webhook==null) webhook = WebhooksPlugin.joinWebhooks.get(name);
if(webhook==null) webhook = WebhooksPlugin.quitWebhooks.get(name);
if(webhook==null) webhook = WebhooksPlugin.chatWebhooks.get(name);
// If still not found, return error
if(webhook==null){
sender.sendMessage("Webhook "+name+" was not found.");
return false;
}
// Replace params
if(args.length>2){
List<String> paramArgs = new ArrayList<String>(Arrays.asList(args));
paramArgs.remove(0); paramArgs.remove(0);
for(String arg : paramArgs){
webhook.replaceParamVar("{COMMAND_PARAM_"+(paramArgs.indexOf(arg)+1)+"}", arg);
}
webhook.replaceParamVar("{COMMAND_PARAM_ALL}", String.join(" ", paramArgs));
}
// Execute the webhook
webhook.execute();
sender.sendMessage("Webhook "+name+" executed.");
return true;
}
// Custom webhook execution - TO BE DISABLED
/*if(args.length>=2 && args[0].equalsIgnoreCase("executecustom")){
try{
URL url = new URL(args[1]);
URLConnection connection = url.openConnection();
connection.setRequestProperty("Accept-Charset", java.nio.charset.StandardCharsets.UTF_8.name());
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11");
if(args.length==3){
connection.setDoOutput(true);
String output = args[2];
connection.getOutputStream().write(output.getBytes(java.nio.charset.StandardCharsets.UTF_8.name()));
}
connection.connect();
sender.sendMessage(("Webhook executed. "+((HttpURLConnection)connection).getResponseCode()+": "+((HttpURLConnection)connection).getResponseMessage()));
return true;
} catch(IOException e){
sender.sendMessage("Invalid webhook.");
return false;
}
}*/
// Invalid command
sender.sendMessage("Invalid arguments.");
return false;
}
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
// Main command - return each sub-command
if(args.length<=1) return Arrays.asList("version", "list", "reload", "execute");
// Execute command - return list of webhooks
if(args.length>=1 && args[0].equalsIgnoreCase("execute") && args.length<=2) return new ArrayList<String>(WebhooksPlugin.otherWebhooks.keySet());
// Otherwise return nothing
return Arrays.asList("");
}
}
|
[
"[email protected]"
] | |
9406692612df8cd5768667301cd3c395112dbbef
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/newEvaluatedBugs/Jsoup_43_buggy/mutated/2750/HtmlTreeBuilderState.java
|
9e47c9777643aa9a8642b5690e0eb7a16c8a9dca
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 68,255 |
java
|
package org.jsoup.parser;
import org.jsoup.helper.DescendableLinkedList;
import org.jsoup.helper.StringUtil;
import org.jsoup.nodes.*;
import java.util.Iterator;
import java.util.LinkedList;
/**
* The Tree Builder's current state. Each state embodies the processing for the state, and transitions to other states.
*/
enum HtmlTreeBuilderState {
Initial {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return true; // ignore whitespace
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
// todo: parse error check on expected doctypes
// todo: quirk state check on doctype ids
Token.Doctype d = t.asDoctype();
DocumentType doctype = new DocumentType(d.getName(), d.getPublicIdentifier(), d.getSystemIdentifier(), tb.getBaseUri());
tb.getDocument().appendChild(doctype);
if (d.isForceQuirks())
tb.getDocument().quirksMode(Document.QuirksMode.quirks);
tb.transition(BeforeHtml);
} else {
// todo: check not iframe srcdoc
tb.transition(BeforeHtml);
return tb.process(t); // re-process token
}
return true;
}
},
BeforeHtml {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (isWhitespace(t)) {
return true; // ignore whitespace
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
tb.insert(t.asStartTag());
tb.transition(BeforeHead);
} else if (t.isEndTag() && (StringUtil.in(t.asEndTag().name(), "head", "body", "html", "br"))) {
return anythingElse(t, tb);
} else if (t.isEndTag()) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.insert("html");
tb.transition(BeforeHead);
return tb.process(t);
}
},
BeforeHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return true;
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return InBody.process(t, tb); // does not transition
} else if (t.isStartTag() && t.asStartTag().name().equals("head")) {
Element head = tb.insert(t.asStartTag());
tb.setHeadElement(head);
tb.transition(InHead);
} else if (t.isEndTag() && (StringUtil.in(t.asEndTag().name(), "head", "body", "html", "br"))) {
tb.process(new Token.StartTag("head"));
return tb.process(t);
} else if (t.isEndTag()) {
tb.error(this);
return false;
} else {
tb.process(new Token.StartTag("head"));
return tb.process(t);
}
return true;
}
},
InHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
return true;
}
switch (t.type) {
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
return false;
case StartTag:
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html")) {
return InBody.process(t, tb);
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link")) {
Element el = tb.insertEmpty(start);
// jsoup special: update base the frist time it is seen
if (name.equals("base") && el.hasAttr("href"))
tb.maybeSetBaseUri(el);
} else if (name.equals("meta")) {
Element meta = tb.insertEmpty(start);
// todo: charset switches
} else if (name.equals("title")) {
handleRcData(start, tb);
} else if (StringUtil.in(name, "noframes", "style")) {
handleRawtext(start, tb);
} else if (name.equals("noscript")) {
// else if noscript && scripting flag = true: rawtext (jsoup doesn't run script, to handle as noscript)
tb.insert(start);
tb.transition(InHeadNoscript);
} else if (name.equals("script")) {
// skips some script rules as won't execute them
tb.insert(start);
tb.tokeniser.transition(TokeniserState.ScriptData);
tb.markInsertionMode();
tb.transition(Text);
} else if (name.equals("head")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
break;
case EndTag:
Token.EndTag end = t.asEndTag();
name = end.name();
if (name.equals("head")) {
tb.pop();
tb.transition(AfterHead);
} else if (StringUtil.in(name, "body", "html", "br")) {
return anythingElse(t, tb);
} else {
tb.error(this);
return false;
}
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, TreeBuilder tb) {
tb.process(new Token.EndTag("head"));
return tb.process(t);
}
},
InHeadNoscript {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isDoctype()) {
tb.error(this);
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("noscript")) {
tb.pop();
tb.transition(InHead);
} else if (isWhitespace(t) || t.isComment() || (t.isStartTag() && StringUtil.in(t.asStartTag().name(),
"basefont", "bgsound", "link", "meta", "noframes", "style"))) {
return tb.process(t, InHead);
} else if (t.isEndTag() && t.asEndTag().name().equals("br")) {
return anythingElse(t, tb);
} else if ((t.isStartTag() && StringUtil.in(t.asStartTag().name(), "head", "noscript")) || t.isEndTag()) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
tb.process(new Token.EndTag("noscript"));
return tb.process(t);
}
},
AfterHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
} else if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html")) {
return tb.process(t, InBody);
} else if (name.equals("body")) {
tb.insert(startTag);
tb.framesetOk(false);
tb.transition(InBody);
} else if (name.equals("frameset")) {
tb.insert(startTag);
tb.transition(InFrameset);
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "title")) {
tb.error(this);
Element head = tb.getHeadElement();
tb.push(head);
tb.process(t, InHead);
tb.removeFromStack(head);
} else if (name.equals("head")) {
tb.error(this);
return false;
} else {
anythingElse(t, tb);
}
} else if (t.isEndTag()) {
if (StringUtil.in(t.asEndTag().name(), "body", "html")) {
anythingElse(t, tb);
} else {
tb.error(this);
return false;
}
} else {
anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.process(new Token.StartTag("body"));
tb.framesetOk(true);
return tb.process(t);
}
},
InBody {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character: {
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
// todo confirm that check
tb.error(this);
return false;
} else if (isWhitespace(c)) {
tb.reconstructFormattingElements();
tb.insert(c);
} else {
tb.reconstructFormattingElements();
tb.insert(c);
tb.framesetOk(false);
}
break;
}
case Comment: {
tb.insert(t.asComment());
break;
}
case Doctype: {
tb.error(this);
return false;
}
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html")) {
tb.error(this);
// merge attributes onto real html
Element html = tb.getStack().getFirst();
for (Attribute attribute : startTag.getAttributes()) {
if (!html.hasAttr(attribute.getKey()))
html.attributes().put(attribute);
}
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link", "meta", "noframes", "script", "style", "title")) {
return tb.process(t, InHead);
} else if (name.equals("body")) {
tb.error(this);
LinkedList<Element> stack = tb.getStack();
if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
// only in fragment case
return false; // ignore
} else {
tb.framesetOk(false);
Element body = stack.get(1);
for (Attribute attribute : startTag.getAttributes()) {
if (!body.hasAttr(attribute.getKey()))
body.attributes().put(attribute);
}
}
} else if (name.equals("frameset")) {
tb.error(this);
LinkedList<Element> stack = tb.getStack();
if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
// only in fragment case
return false; // ignore
} else if (!tb.framesetOk()) {
return false; // ignore frameset
} else {
Element second = stack.get(1);
if (second.parent() != null)
second.remove();
// pop up to html element
while (stack.size() > 1)
stack.removeLast();
tb.insert(startTag);
tb.transition(InFrameset);
}
} else if (StringUtil.in(name,
"address", "article", "aside", "blockquote", "center", "details", "dir", "div", "dl",
"fieldset", "figcaption", "figure", "footer", "header", "hgroup", "menu", "nav", "ol",
"p", "section", "summary", "ul")) {
if (tb.process(new org.jsoup.parser.Token.EndTag("td"));
tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (StringUtil.in(name, "h1", "h2", "h3", "h4", "h5", "h6")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
if (StringUtil.in(tb.currentElement().nodeName(), "h1", "h2", "h3", "h4", "h5", "h6")) {
tb.error(this);
tb.pop();
}
tb.insert(startTag);
} else if (StringUtil.in(name, "pre", "listing")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
// todo: ignore LF if next token
tb.framesetOk(false);
} else if (name.equals("form")) {
if (tb.getFormElement() != null) {
tb.error(this);
return false;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
Element form = tb.insert(startTag);
tb.setFormElement(form);
} else if (name.equals("li")) {
tb.framesetOk(false);
LinkedList<Element> stack = tb.getStack();
for (int i = stack.size() - 1; i > 0; i--) {
Element el = stack.get(i);
if (el.nodeName().equals("li")) {
tb.process(new Token.EndTag("li"));
break;
}
if (tb.isSpecial(el) && !StringUtil.in(el.nodeName(), "address", "div", "p"))
break;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (StringUtil.in(name, "dd", "dt")) {
tb.framesetOk(false);
LinkedList<Element> stack = tb.getStack();
for (int i = stack.size() - 1; i > 0; i--) {
Element el = stack.get(i);
if (StringUtil.in(el.nodeName(), "dd", "dt")) {
tb.process(new Token.EndTag(el.nodeName()));
break;
}
if (tb.isSpecial(el) && !StringUtil.in(el.nodeName(), "address", "div", "p"))
break;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (name.equals("plaintext")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.PLAINTEXT); // once in, never gets out
} else if (name.equals("button")) {
if (tb.inButtonScope("button")) {
// close and reprocess
tb.error(this);
tb.process(new Token.EndTag("button"));
tb.process(startTag);
} else {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.framesetOk(false);
}
} else if (name.equals("a")) {
if (tb.getActiveFormattingElement("a") != null) {
tb.error(this);
tb.process(new Token.EndTag("a"));
// still on stack?
Element remainingA = tb.getFromStack("a");
if (remainingA != null) {
tb.removeFromActiveFormattingElements(remainingA);
tb.removeFromStack(remainingA);
}
}
tb.reconstructFormattingElements();
Element a = tb.insert(startTag);
tb.pushActiveFormattingElements(a);
} else if (StringUtil.in(name,
"b", "big", "code", "em", "font", "i", "s", "small", "strike", "strong", "tt", "u")) {
tb.reconstructFormattingElements();
Element el = tb.insert(startTag);
tb.pushActiveFormattingElements(el);
} else if (name.equals("nobr")) {
tb.reconstructFormattingElements();
if (tb.inScope("nobr")) {
tb.error(this);
tb.process(new Token.EndTag("nobr"));
tb.reconstructFormattingElements();
}
Element el = tb.insert(startTag);
tb.pushActiveFormattingElements(el);
} else if (StringUtil.in(name, "applet", "marquee", "object")) {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.insertMarkerToFormattingElements();
tb.framesetOk(false);
} else if (name.equals("table")) {
if (tb.getDocument().quirksMode() != Document.QuirksMode.quirks && tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
tb.framesetOk(false);
tb.transition(InTable);
} else if (StringUtil.in(name, "area", "br", "embed", "img", "keygen", "wbr")) {
tb.reconstructFormattingElements();
tb.insertEmpty(startTag);
tb.framesetOk(false);
} else if (name.equals("input")) {
tb.reconstructFormattingElements();
Element el = tb.insertEmpty(startTag);
if (!el.attr("type").equalsIgnoreCase("hidden"))
tb.framesetOk(false);
} else if (StringUtil.in(name, "param", "source", "track")) {
tb.insertEmpty(startTag);
} else if (name.equals("hr")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insertEmpty(startTag);
tb.framesetOk(false);
} else if (name.equals("image")) {
// we're not supposed to ask.
startTag.name("img");
return tb.process(startTag);
} else if (name.equals("isindex")) {
// how much do we care about the early 90s?
tb.error(this);
if (tb.getFormElement() != null)
return false;
tb.tokeniser.acknowledgeSelfClosingFlag();
tb.process(new Token.StartTag("form"));
if (startTag.attributes.hasKey("action")) {
Element form = tb.getFormElement();
form.attr("action", startTag.attributes.get("action"));
}
tb.process(new Token.StartTag("hr"));
tb.process(new Token.StartTag("label"));
// hope you like english.
String prompt = startTag.attributes.hasKey("prompt") ?
startTag.attributes.get("prompt") :
"This is a searchable index. Enter search keywords: ";
tb.process(new Token.Character(prompt));
// input
Attributes inputAttribs = new Attributes();
for (Attribute attr : startTag.attributes) {
if (!StringUtil.in(attr.getKey(), "name", "action", "prompt"))
inputAttribs.put(attr);
}
inputAttribs.put("name", "isindex");
tb.process(new Token.StartTag("input", inputAttribs));
tb.process(new Token.EndTag("label"));
tb.process(new Token.StartTag("hr"));
tb.process(new Token.EndTag("form"));
} else if (name.equals("textarea")) {
tb.insert(startTag);
// todo: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)
tb.tokeniser.transition(TokeniserState.Rcdata);
tb.markInsertionMode();
tb.framesetOk(false);
tb.transition(Text);
} else if (name.equals("xmp")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.reconstructFormattingElements();
tb.framesetOk(false);
handleRawtext(startTag, tb);
} else if (name.equals("iframe")) {
tb.framesetOk(false);
handleRawtext(startTag, tb);
} else if (name.equals("noembed")) {
// also handle noscript if script enabled
handleRawtext(startTag, tb);
} else if (name.equals("select")) {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.framesetOk(false);
HtmlTreeBuilderState state = tb.state();
if (state.equals(InTable) || state.equals(InCaption) || state.equals(InTableBody) || state.equals(InRow) || state.equals(InCell))
tb.transition(InSelectInTable);
else
tb.transition(InSelect);
} else if (StringUtil.in("optgroup", "option")) {
if (tb.currentElement().nodeName().equals("option"))
tb.process(new Token.EndTag("option"));
tb.reconstructFormattingElements();
tb.insert(startTag);
} else if (StringUtil.in("rp", "rt")) {
if (tb.inScope("ruby")) {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals("ruby")) {
tb.error(this);
tb.popStackToBefore("ruby"); // i.e. close up to but not include name
}
tb.insert(startTag);
}
} else if (name.equals("math")) {
tb.reconstructFormattingElements();
// todo: handle A start tag whose tag name is "math" (i.e. foreign, mathml)
tb.insert(startTag);
tb.tokeniser.acknowledgeSelfClosingFlag();
} else if (name.equals("svg")) {
tb.reconstructFormattingElements();
// todo: handle A start tag whose tag name is "svg" (xlink, svg)
tb.insert(startTag);
tb.tokeniser.acknowledgeSelfClosingFlag();
} else if (StringUtil.in(name,
"caption", "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
tb.reconstructFormattingElements();
tb.insert(startTag);
}
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (name.equals("body")) {
if (!tb.inScope("body")) {
tb.error(this);
return false;
} else {
// todo: error if stack contains something not dd, dt, li, optgroup, option, p, rp, rt, tbody, td, tfoot, th, thead, tr, body, html
tb.transition(AfterBody);
}
} else if (name.equals("html")) {
boolean notIgnored = tb.process(new Token.EndTag("body"));
if (notIgnored)
return tb.process(endTag);
} else if (StringUtil.in(name,
"address", "article", "aside", "blockquote", "button", "center", "details", "dir", "div",
"dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "menu",
"nav", "ol", "pre", "section", "summary", "ul")) {
// todo: refactor these lookups
if (!tb.inScope(name)) {
// nothing to close
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (name.equals("form")) {
Element currentForm = tb.getFormElement();
tb.setFormElement(null);
if (currentForm == null || !tb.inScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
// remove currentForm from stack. will shift anything under up.
tb.removeFromStack(currentForm);
}
} else if (name.equals("p")) {
if (!tb.inButtonScope(name)) {
tb.error(this);
tb.process(new Token.StartTag(name)); // if no p to close, creates an empty <p></p>
return tb.process(endTag);
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (name.equals("li")) {
if (!tb.inListItemScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (StringUtil.in(name, "dd", "dt")) {
if (!tb.inScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (StringUtil.in(name, "h1", "h2", "h3", "h4", "h5", "h6")) {
if (!tb.inScope(new String[]{"h1", "h2", "h3", "h4", "h5", "h6"})) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose("h1", "h2", "h3", "h4", "h5", "h6");
}
} else if (name.equals("sarcasm")) {
// *sigh*
return anyOtherEndTag(t, tb);
} else if (StringUtil.in(name,
"a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u")) {
// Adoption Agency Algorithm.
OUTER:
for (int i = 0; i < 8; i++) {
Element formatEl = tb.getActiveFormattingElement(name);
if (formatEl == null)
return anyOtherEndTag(t, tb);
else if (!tb.onStack(formatEl)) {
tb.error(this);
tb.removeFromActiveFormattingElements(formatEl);
return true;
} else if (!tb.inScope(formatEl.nodeName())) {
tb.error(this);
return false;
} else if (tb.currentElement() != formatEl)
tb.error(this);
Element furthestBlock = null;
Element commonAncestor = null;
boolean seenFormattingElement = false;
LinkedList<Element> stack = tb.getStack();
for (int si = 0; si < stack.size(); si++) {
Element el = stack.get(si);
if (el == formatEl) {
commonAncestor = stack.get(si - 1);
seenFormattingElement = true;
} else if (seenFormattingElement && tb.isSpecial(el)) {
furthestBlock = el;
break;
}
}
if (furthestBlock == null) {
tb.popStackToClose(formatEl.nodeName());
tb.removeFromActiveFormattingElements(formatEl);
return true;
}
// todo: Let a bookmark note the position of the formatting element in the list of active formatting elements relative to the elements on either side of it in the list.
// does that mean: int pos of format el in list?
Element node = furthestBlock;
Element lastNode = furthestBlock;
INNER:
for (int j = 0; j < 3; j++) {
if (tb.onStack(node))
node = tb.aboveOnStack(node);
if (!tb.isInActiveFormattingElements(node)) { // note no bookmark check
tb.removeFromStack(node);
continue INNER;
} else if (node == formatEl)
break INNER;
Element replacement = new Element(Tag.valueOf(node.nodeName()), tb.getBaseUri());
tb.replaceActiveFormattingElement(node, replacement);
tb.replaceOnStack(node, replacement);
node = replacement;
if (lastNode == furthestBlock) {
// todo: move the aforementioned bookmark to be immediately after the new node in the list of active formatting elements.
// not getting how this bookmark both straddles the element above, but is inbetween here...
}
if (lastNode.parent() != null)
lastNode.remove();
node.appendChild(lastNode);
lastNode = node;
}
if (StringUtil.in(commonAncestor.nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
if (lastNode.parent() != null)
lastNode.remove();
tb.insertInFosterParent(lastNode);
} else {
if (lastNode.parent() != null)
lastNode.remove();
commonAncestor.appendChild(lastNode);
}
Element adopter = new Element(Tag.valueOf(name), tb.getBaseUri());
Node[] childNodes = furthestBlock.childNodes().toArray(new Node[furthestBlock.childNodes().size()]);
for (Node childNode : childNodes) {
adopter.appendChild(childNode); // append will reparent. thus the clone to avvoid concurrent mod.
}
furthestBlock.appendChild(adopter);
tb.removeFromActiveFormattingElements(formatEl);
// todo: insert the new element into the list of active formatting elements at the position of the aforementioned bookmark.
tb.removeFromStack(formatEl);
tb.insertOnStackAfter(furthestBlock, adopter);
}
} else if (StringUtil.in(name, "applet", "marquee", "object")) {
if (!tb.inScope("name")) {
if (!tb.inScope(name)) {
tb.error(this);
return false;
}
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
tb.clearFormattingElementsToLastMarker();
}
} else if (name.equals("br")) {
tb.error(this);
tb.process(new Token.StartTag("br"));
return false;
} else {
return anyOtherEndTag(t, tb);
}
break;
case EOF:
// todo: error if stack contains something not dd, dt, li, p, tbody, td, tfoot, th, thead, tr, body, html
// stop parsing
break;
}
return true;
}
boolean anyOtherEndTag(Token t, HtmlTreeBuilder tb) {
String name = t.asEndTag().name();
DescendableLinkedList<Element> stack = tb.getStack();
Iterator<Element> it = stack.descendingIterator();
while (it.hasNext()) {
Element node = it.next();
if (node.nodeName().equals(name)) {
tb.generateImpliedEndTags(name);
if (!name.equals(tb.currentElement().nodeName()))
tb.error(this);
tb.popStackToClose(name);
break;
} else {
if (tb.isSpecial(node)) {
tb.error(this);
return false;
}
}
}
return true;
}
},
Text {
// in script, style etc. normally treated as data tags
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isCharacter()) {
tb.insert(t.asCharacter());
} else if (t.isEOF()) {
tb.error(this);
// if current node is script: already started
tb.pop();
tb.transition(tb.originalState());
return tb.process(t);
} else if (t.isEndTag()) {
// if: An end tag whose tag name is "script" -- scripting nesting level, if evaluating scripts
tb.pop();
tb.transition(tb.originalState());
}
return true;
}
},
InTable {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isCharacter()) {
tb.newPendingTableCharacters();
tb.markInsertionMode();
tb.transition(InTableText);
return tb.process(t);
} else if (t.isComment()) {
tb.insert(t.asComment());
return true;
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("caption")) {
tb.clearStackToTableContext();
tb.insertMarkerToFormattingElements();
tb.insert(startTag);
tb.transition(InCaption);
} else if (name.equals("colgroup")) {
tb.clearStackToTableContext();
tb.insert(startTag);
tb.transition(InColumnGroup);
} else if (name.equals("col")) {
tb.process(new Token.StartTag("colgroup"));
return tb.process(t);
} else if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
tb.clearStackToTableContext();
tb.insert(startTag);
tb.transition(InTableBody);
} else if (StringUtil.in(name, "td", "th", "tr")) {
tb.process(new Token.StartTag("tbody"));
return tb.process(t);
} else if (name.equals("table")) {
tb.error(this);
boolean processed = tb.process(new Token.EndTag("table"));
if (processed) // only ignored if in fragment
return tb.process(t);
} else if (StringUtil.in(name, "style", "script")) {
return tb.process(t, InHead);
} else if (name.equals("input")) {
if (!startTag.attributes.get("type").equalsIgnoreCase("hidden")) {
return anythingElse(t, tb);
} else {
tb.insertEmpty(startTag);
}
} else if (name.equals("form")) {
tb.error(this);
if (tb.getFormElement() != null)
return false;
else {
Element form = tb.insertEmpty(startTag);
tb.setFormElement(form);
}
} else {
return anythingElse(t, tb);
}
} else if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (name.equals("table")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.popStackToClose("table");
}
tb.resetInsertionMode();
} else if (StringUtil.in(name,
"body", "caption", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
} else if (t.isEOF()) {
if (tb.currentElement().nodeName().equals("html"))
tb.error(this);
return true; // stops parsing
}
return anythingElse(t, tb);
}
boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
boolean processed = true;
if (StringUtil.in(tb.currentElement().nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
tb.setFosterInserts(true);
processed = tb.process(t, InBody);
tb.setFosterInserts(false);
} else {
processed = tb.process(t, InBody);
}
return processed;
}
},
InTableText {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character:
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
tb.error(this);
return false;
} else {
tb.getPendingTableCharacters().add(c);
}
break;
default:
if (tb.getPendingTableCharacters().size() > 0) {
for (Token.Character character : tb.getPendingTableCharacters()) {
if (!isWhitespace(character)) {
// InTable anything else section:
tb.error(this);
if (StringUtil.in(tb.currentElement().nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
tb.setFosterInserts(true);
tb.process(character, InBody);
tb.setFosterInserts(false);
} else {
tb.process(character, InBody);
}
} else
tb.insert(character);
}
tb.newPendingTableCharacters();
}
tb.transition(tb.originalState());
return tb.process(t);
}
return true;
}
},
InCaption {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isEndTag() && t.asEndTag().name().equals("caption")) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals("caption"))
tb.error(this);
tb.popStackToClose("caption");
tb.clearFormattingElementsToLastMarker();
tb.transition(InTable);
}
} else if ((
t.isStartTag() && StringUtil.in(t.asStartTag().name(),
"caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr") ||
t.isEndTag() && t.asEndTag().name().equals("table"))
) {
tb.error(this);
boolean processed = tb.process(new Token.EndTag("caption"));
if (processed)
return tb.process(t);
} else if (t.isEndTag() && StringUtil.in(t.asEndTag().name(),
"body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
return tb.process(t, InBody);
}
return true;
}
},
InColumnGroup {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
return true;
}
switch (t.type) {
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
break;
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html"))
return tb.process(t, InBody);
else if (name.equals("col"))
tb.insertEmpty(startTag);
else
return anythingElse(t, tb);
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (name.equals("colgroup")) {
if (tb.currentElement().nodeName().equals("html")) { // frag case
tb.error(this);
return false;
} else {
tb.pop();
tb.transition(InTable);
}
} else
return anythingElse(t, tb);
break;
case EOF:
if (tb.currentElement().nodeName().equals("html"))
return true; // stop parsing; frag case
else
return anythingElse(t, tb);
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, TreeBuilder tb) {
boolean processed = tb.process(new Token.EndTag("colgroup"));
if (processed) // only ignored in frag case
return tb.process(t);
return true;
}
},
InTableBody {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("tr")) {
tb.clearStackToTableBodyContext();
tb.insert(startTag);
tb.transition(InRow);
} else if (StringUtil.in(name, "th", "td")) {
tb.error(this);
tb.process(new Token.StartTag("tr"));
return tb.process(startTag);
} else if (StringUtil.in(name, "caption", "col", "colgroup", "tbody", "tfoot", "thead")) {
return exitTableBody(t, tb);
} else
return anythingElse(t, tb);
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.clearStackToTableBodyContext();
tb.pop();
tb.transition(InTable);
}
} else if (name.equals("table")) {
return exitTableBody(t, tb);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html", "td", "th", "tr")) {
tb.error(this);
return false;
} else
return anythingElse(t, tb);
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean exitTableBody(Token t, HtmlTreeBuilder tb) {
if (!(tb.inTableScope("tbody") || tb.inTableScope("thead") || tb.inScope("tfoot"))) {
// frag case
tb.error(this);
return false;
}
tb.clearStackToTableBodyContext();
tb.process(new Token.EndTag(tb.currentElement().nodeName())); // tbody, tfoot, thead
return tb.process(t);
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InTable);
}
},
InRow {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (StringUtil.in(name, "th", "td")) {
tb.clearStackToTableRowContext();
tb.insert(startTag);
tb.transition(InCell);
tb.insertMarkerToFormattingElements();
} else if (StringUtil.in(name, "caption", "col", "colgroup", "tbody", "tfoot", "thead", "tr")) {
return handleMissingTr(t, tb);
} else {
return anythingElse(t, tb);
}
} else if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (name.equals("tr")) {
if (!tb.inTableScope(name)) {
tb.error(this); // frag
return false;
}
tb.clearStackToTableRowContext();
tb.pop(); // tr
tb.transition(InTableBody);
} else if (name.equals("table")) {
return handleMissingTr(t, tb);
} else if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
}
tb.process(new Token.EndTag("tr"));
return tb.process(t);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html", "td", "th")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InTable);
}
private boolean handleMissingTr(Token t, TreeBuilder tb) {
boolean processed = tb.process(new Token.EndTag("tr"));
if (processed)
return tb.process(t);
else
return false;
}
},
InCell {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (StringUtil.in(name, "td", "th")) {
if (!tb.inTableScope(name)) {
tb.error(this);
tb.transition(InRow); // might not be in scope if empty: <td /> and processing fake end tag
return false;
}
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
tb.clearFormattingElementsToLastMarker();
tb.transition(InRow);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html")) {
tb.error(this);
return false;
} else if (StringUtil.in(name, "table", "tbody", "tfoot", "thead", "tr")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
}
closeCell(tb);
return tb.process(t);
} else {
return anythingElse(t, tb);
}
} else if (t.isStartTag() &&
StringUtil.in(t.asStartTag().name(),
"caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr")) {
if (!(tb.inTableScope("td") || tb.inTableScope("th"))) {
tb.error(this);
return false;
}
closeCell(tb);
return tb.process(t);
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InBody);
}
private void closeCell(HtmlTreeBuilder tb) {
if (tb.inTableScope("td"))
tb.process(new Token.EndTag("td"));
else
tb.process(new Token.EndTag("th")); // only here if th or td in scope
}
},
InSelect {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character:
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
tb.error(this);
return false;
} else {
tb.insert(c);
}
break;
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
return false;
case StartTag:
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html"))
return tb.process(start, InBody);
else if (name.equals("option")) {
tb.process(new Token.EndTag("option"));
tb.insert(start);
} else if (name.equals("optgroup")) {
if (tb.currentElement().nodeName().equals("option"))
tb.process(new Token.EndTag("option"));
else if (tb.currentElement().nodeName().equals("optgroup"))
tb.process(new Token.EndTag("optgroup"));
tb.insert(start);
} else if (name.equals("select")) {
tb.error(this);
return tb.process(new Token.EndTag("select"));
} else if (StringUtil.in(name, "input", "keygen", "textarea")) {
tb.error(this);
if (!tb.inSelectScope("select"))
return false; // frag
tb.process(new Token.EndTag("select"));
return tb.process(start);
} else if (name.equals("script")) {
return tb.process(t, InHead);
} else {
return anythingElse(t, tb);
}
break;
case EndTag:
Token.EndTag end = t.asEndTag();
name = end.name();
if (name.equals("optgroup")) {
if (tb.currentElement().nodeName().equals("option") && tb.aboveOnStack(tb.currentElement()) != null && tb.aboveOnStack(tb.currentElement()).nodeName().equals("optgroup"))
tb.process(new Token.EndTag("option"));
if (tb.currentElement().nodeName().equals("optgroup"))
tb.pop();
else
tb.error(this);
} else if (name.equals("option")) {
if (tb.currentElement().nodeName().equals("option"))
tb.pop();
else
tb.error(this);
} else if (name.equals("select")) {
if (!tb.inSelectScope(name)) {
tb.error(this);
return false;
} else {
tb.popStackToClose(name);
tb.resetInsertionMode();
}
} else
return anythingElse(t, tb);
break;
case EOF:
if (!tb.currentElement().nodeName().equals("html"))
tb.error(this);
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
return false;
}
},
InSelectInTable {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isStartTag() && StringUtil.in(t.asStartTag().name(), "caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th")) {
tb.error(this);
tb.process(new Token.EndTag("select"));
return tb.process(t);
} else if (t.isEndTag() && StringUtil.in(t.asEndTag().name(), "caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th")) {
tb.error(this);
if (tb.inTableScope(t.asEndTag().name())) {
tb.process(new Token.EndTag("select"));
return (tb.process(t));
} else
return false;
} else {
return tb.process(t, InSelect);
}
}
},
AfterBody {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return tb.process(t, InBody);
} else if (t.isComment()) {
tb.insert(t.asComment()); // into html node
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("html")) {
if (tb.isFragmentParsing()) {
tb.error(this);
return false;
} else {
tb.transition(AfterAfterBody);
}
} else if (t.isEOF()) {
// chillax! we're done
} else {
tb.error(this);
tb.transition(InBody);
return tb.process(t);
}
return true;
}
},
InFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag()) {
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html")) {
return tb.process(start, InBody);
} else if (name.equals("frameset")) {
tb.insert(start);
} else if (name.equals("frame")) {
tb.insertEmpty(start);
} else if (name.equals("noframes")) {
return tb.process(start, InHead);
} else {
tb.error(this);
return false;
}
} else if (t.isEndTag() && t.asEndTag().name().equals("frameset")) {
if (tb.currentElement().nodeName().equals("html")) { // frag
tb.error(this);
return false;
} else {
tb.pop();
if (!tb.isFragmentParsing() && !tb.currentElement().nodeName().equals("frameset")) {
tb.transition(AfterFrameset);
}
}
} else if (t.isEOF()) {
if (!tb.currentElement().nodeName().equals("html")) {
tb.error(this);
return true;
}
} else {
tb.error(this);
return false;
}
return true;
}
},
AfterFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("html")) {
tb.transition(AfterAfterFrameset);
} else if (t.isStartTag() && t.asStartTag().name().equals("noframes")) {
return tb.process(t, InHead);
} else if (t.isEOF()) {
// cool your heels, we're complete
} else {
tb.error(this);
return false;
}
return true;
}
},
AfterAfterBody {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype() || isWhitespace(t) || (t.isStartTag() && t.asStartTag().name().equals("html"))) {
return tb.process(t, InBody);
} else if (t.isEOF()) {
// nice work chuck
} else {
tb.error(this);
tb.transition(InBody);
return tb.process(t);
}
return true;
}
},
AfterAfterFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype() || isWhitespace(t) || (t.isStartTag() && t.asStartTag().name().equals("html"))) {
return tb.process(t, InBody);
} else if (t.isEOF()) {
// nice work chuck
} else if (t.isStartTag() && t.asStartTag().name().equals("noframes")) {
return tb.process(t, InHead);
} else {
tb.error(this);
return false;
}
return true;
}
},
ForeignContent {
boolean process(Token t, HtmlTreeBuilder tb) {
return true;
// todo: implement. Also; how do we get here?
}
};
private static String nullString = String.valueOf('\u0000');
abstract boolean process(Token t, HtmlTreeBuilder tb);
private static boolean isWhitespace(Token t) {
if (t.isCharacter()) {
String data = t.asCharacter().getData();
// todo: this checks more than spec - "\t", "\n", "\f", "\r", " "
for (int i = 0; i < data.length(); i++) {
char c = data.charAt(i);
if (!StringUtil.isWhitespace(c))
return false;
}
return true;
}
return false;
}
private static void handleRcData(Token.StartTag startTag, HtmlTreeBuilder tb) {
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.Rcdata);
tb.markInsertionMode();
tb.transition(Text);
}
private static void handleRawtext(Token.StartTag startTag, HtmlTreeBuilder tb) {
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.Rawtext);
tb.markInsertionMode();
tb.transition(Text);
}
}
|
[
"[email protected]"
] | |
2883674b5a1887adc51622ec77c01ff344838b57
|
3daacd1986107527bb974385160c8ba7232dde11
|
/schloemmer_quarkus__jwt/quarkus-presentation/src/main/java/at/htl/control/PasswordSecurityUtils.java
|
3c20324851b74333bc3db7c28c02a895dbd070c3
|
[] |
no_license
|
1920-5bhif-nvs/referate-nvs-5bhif
|
8f4cd33730a66d87cd2d349f2ae2626e96913541
|
e7888093b7236d45f2e15d627d4500f2c405a7d8
|
refs/heads/master
| 2020-08-24T08:14:06.325922 | 2020-04-23T09:31:05 | 2020-04-23T09:31:05 | 216,790,729 | 0 | 4 | null | 2020-03-26T09:12:03 | 2019-10-22T10:52:19 |
HTML
|
UTF-8
|
Java
| false | false | 1,777 |
java
|
package at.htl.control;
import at.htl.entity.HashedPassword;
import org.apache.shiro.crypto.RandomNumberGenerator;
import org.apache.shiro.crypto.SecureRandomNumberGenerator;
import org.apache.shiro.crypto.hash.Sha512Hash;
import org.apache.shiro.util.ByteSource;
import org.apache.shiro.util.SimpleByteSource;
public class PasswordSecurityUtils {
private PasswordSecurityUtils() {}
public static HashedPassword hashPassword(String password) {
RandomNumberGenerator rng = new SecureRandomNumberGenerator();
ByteSource salt = rng.nextBytes();
String hashedPassword = new Sha512Hash(password, salt, 1024).toHex();
return new HashedPassword(salt.toHex(), hashedPassword);
}
public static boolean validatePassword(String submittedPassword, HashedPassword storedPassword) {
ByteSource salt = new SimpleByteSource(fromHex(storedPassword.getSaltHex()));
String hashToTestString = new Sha512Hash(submittedPassword, salt, 1024).toHex();
byte[] storedHash = fromHex(storedPassword.getHexPassword());
byte[] hashToTest = fromHex(hashToTestString);
return testIfBytesEqual(storedHash, hashToTest);
}
private static boolean testIfBytesEqual(byte[] storedHash, byte[] hashToTest) {
int diff = storedHash.length ^ hashToTest.length;
for (int i = 0; i < storedHash.length && i < hashToTest.length; i++) {
diff |= storedHash[i] ^ hashToTest[i];
}
return diff == 0;
}
private static byte[] fromHex(String hex) {
byte[] bytes = new byte[hex.length() / 2];
for (int i = 0; i < bytes.length; i++) {
bytes[i] = (byte)Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);
}
return bytes;
}
}
|
[
"[email protected]"
] | |
22fb244e161e9470ab41743ba0cab6811b76633f
|
0b268218f004877109acab22f9e86a9d06b02084
|
/RoboManager/src/SoftwareKaempfer.java
|
0bbca89e15c2863429eb618d2d7c71f47ce574dc
|
[] |
no_license
|
xa17d/team151
|
7842eabc3ed987094d0d2fd33f2d30c3e962cef2
|
1ff53d930b222b9a6023d41f771110a917e190ca
|
refs/heads/master
| 2020-04-05T23:40:36.718456 | 2012-12-18T16:05:21 | 2012-12-18T16:05:21 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 376 |
java
|
/**
* Software fuer einen Kaempfer
* @author Daniel
*
*/
public class SoftwareKaempfer extends Software {
public SoftwareKaempfer(SoftwareStufe stufe) {
super(stufe);
}
@Override
public String vonKaempferVerwendet(Kaempfer kaempfer) {
return null;
}
@Override
public String toString() {
return "Kaempfer Software ("+getStufe()+")";
}
}
|
[
"[email protected]"
] | |
5abde579d5af63944fdcf287e6d12d708b1238f7
|
bd10552c2ea720c6f091ba17ab8615a6a1e2da52
|
/qtyd-funds-provider/src/main/java/com/qtyd/controller/funds/FundsController.java
|
ac4f285dccd698b47e17b8ee79ddebe55fb1efa0
|
[] |
no_license
|
huc003/qtydv4
|
e9f17bcd7a803dc174e395f36b37d032325f56bc
|
c3c0e5591bb3ec53569e1d370f3522f51e0e0200
|
refs/heads/master
| 2021-01-24T17:17:25.810097 | 2018-03-29T00:58:36 | 2018-03-29T00:58:36 | 123,229,117 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,060 |
java
|
package com.qtyd.controller.funds;
import com.qtyd.model.User;
import com.qtyd.service.FundsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import java.util.UUID;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by huc on 2017/12/20.
*/
@RestController
@RequestMapping("/funds")
@Api(value="onlinestore", description="资金操作类")
public class FundsController {
private Logger logger = LoggerFactory.getLogger(FundsController.class);
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private FundsService fundsService;
@RequestMapping(value = "/funds_user",method = RequestMethod.POST)
@ApiOperation(value = "用户资金信息",notes = "")
@ApiImplicitParam(name = "userId",value = "用户ID",required = true,dataType = "Long",paramType = "query")
@Cacheable(value="user-key")
public User fundsUserByUserId(@RequestParam("userId") Long userId,HttpSession session){
User userFunds = fundsService.userFundsByUserId(userId);
// redisTemplate.opsForValue().set(userFunds.getUsername(), userFunds);
UUID uuid = (UUID)session.getAttribute("uid");
if(uuid==null){
uuid = UUID.randomUUID();
}
session.setAttribute("uid", uuid);
logger.info("session"+session.getAttribute("uid"));
// redisTemplate.
return userFunds;
}
}
|
[
"[email protected]"
] | |
900048b135828f8e446a0be8d3105e9d235cb201
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project62/src/test/java/org/gradle/test/performance/largejavamultiproject/project62/p312/Test6245.java
|
e3b1aa26a681a3fa51183deceecf90c5a248b7d7
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,108 |
java
|
package org.gradle.test.performance.largejavamultiproject.project62.p312;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test6245 {
Production6245 objectUnderTest = new Production6245();
@Test
public void testProperty0() {
String value = "value";
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
String value = "value";
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
String value = "value";
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"[email protected]"
] | |
5ca1283cc882b4deb1a971e92cdb55917b40e903
|
c2160e17a2d06190a771c77818a3bdbfde0d2ec3
|
/app/src/main/java/com/example/simpletodo/EditItemActivity.java
|
d3531138370204a505f31fc644c40b3cd90cb47a
|
[
"Apache-2.0"
] |
permissive
|
Rafoto/SimpleToDo
|
933d2516b3ada8611d62b8dea81b9671917b79ce
|
c28ca59343be23481fc047adfa87eafd701f4d57
|
refs/heads/master
| 2020-06-11T00:12:09.689882 | 2019-06-26T00:56:37 | 2019-06-26T00:56:37 | 193,800,754 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,098 |
java
|
package com.example.simpletodo;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;
import static com.example.simpletodo.MainActivity.ITEM_POSITION;
import static com.example.simpletodo.MainActivity.ITEM_TEXT;
public class EditItemActivity extends AppCompatActivity {
EditText etItemText;
int position;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_edit_item);
etItemText = (EditText) findViewById(R.id.etItemText);
etItemText.setText(getIntent().getStringExtra(ITEM_TEXT));
position = getIntent().getIntExtra(ITEM_POSITION, 0);
getSupportActionBar().setTitle("Edit Item");
}
public void onSaveItem(View v) {
Intent data = new Intent();
data.putExtra(ITEM_TEXT, etItemText.getText().toString());
data.putExtra(ITEM_POSITION, position);
setResult(RESULT_OK, data);
finish();
}
}
|
[
"[email protected]"
] | |
cd4feba08c20098d4f4d6a6d50984b37029b7993
|
87b86d8107feef59a6a02ca5e79b05e7d72ebe02
|
/jmeter/src/test/a.java
|
140f484fef1e8dff3a66afe74935b52e6e71dc51
|
[] |
no_license
|
siyecao11/lianxi
|
998a6d6707cb6b8825b583e8880f055f92c20aad
|
56293aab3a51f68ba0f782420d0a49251e74e3cd
|
refs/heads/master
| 2020-03-09T23:03:52.515328 | 2018-04-11T07:11:11 | 2018-04-11T07:11:11 | 129,049,808 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 95 |
java
|
package test;
public class a {
public int b(){
int a=1;
return a;
}
}
|
[
"[email protected]"
] | |
3add9fcbca23fdd30c6e2847894c99c27d7f2538
|
cc91997c2250241d942eab16149c7922f5a4f975
|
/src/main/java/ru/itis/afarvazov/repositories/CartsRepository.java
|
d09d6fd987f7d6ab85953e421dc9dabf9dda7f55
|
[] |
no_license
|
AlmazFarvazov/shop
|
916fbb7f90a4a8663912186d436364568ce6a051
|
0eb6dd5b13bec25a2090e5d2572b4980e166eece
|
refs/heads/main
| 2023-07-31T22:23:03.886003 | 2021-09-10T17:16:09 | 2021-09-10T17:16:09 | 403,229,274 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 265 |
java
|
package ru.itis.afarvazov.repositories;
import ru.itis.afarvazov.models.Cart;
import java.util.List;
import java.util.Optional;
public interface CartsRepository extends CrudRepository<Cart, Long> {
List<Cart> findByOwnerId(long ownerId, boolean active);
}
|
[
"[email protected]"
] | |
a218cd94108fee3b5405773bb6e9f3d1c0b66e1b
|
7e9a6bfcfd616dd26690cfdd1b8ce8ee0969f60d
|
/cadastro/src/main/java/com/deveficiente/casadocodigo/fechacompra/NovoPedidoRequest.java
|
8840c19a78ba67e9f6b53729bd9f76952b4987dd
|
[] |
no_license
|
edirlucasi7/seed-desafio-cdc
|
fbd6d9b1d9c8de13c37f3bf045e265b29a558a18
|
a180dc6448752f71b79fea0482106f340bcd87b7
|
refs/heads/master
| 2023-09-05T11:46:55.270501 | 2021-11-13T18:05:47 | 2021-11-13T18:05:47 | 399,096,266 | 0 | 0 | null | 2021-08-23T12:31:01 | 2021-08-23T12:31:00 | null |
UTF-8
|
Java
| false | false | 1,472 |
java
|
package com.deveficiente.casadocodigo.fechacompra;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.persistence.EntityManager;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import org.springframework.util.Assert;
import com.deveficiente.casadocodigo.compartilhado.Generated;
public class NovoPedidoRequest {
@NotNull
@Positive
@Min(1)
private BigDecimal total;
@Size(min = 1)
private List<NovoPedidoItemRequest> itens;
public NovoPedidoRequest(@NotNull @Positive @Min(1) BigDecimal total,
@Size(min = 1) List<NovoPedidoItemRequest> itens) {
super();
this.total = total;
this.itens = itens;
}
@Override
@Generated(Generated.ECLIPSE)
public String toString() {
return "NovoCompraRequest [total=" + total + ", itens=" + itens + "]";
}
public Function<Compra,Pedido> toModel(EntityManager manager) {
Set<ItemPedido> itensCalculados = itens.stream().map(item -> item.toModel(manager)).collect(Collectors.toSet());
return (compra) -> {
Pedido pedido = new Pedido(compra, itensCalculados);
Assert.isTrue(pedido.totalIgual(total), "o total enviado não corresponde ao total real");
return pedido;
};
}
public @Positive @NotNull BigDecimal getTotal() {
return this.total;
}
}
|
[
"[email protected]"
] | |
301b7aaae8a686f5e5d654d4a255ffaf140768d0
|
fd62074b0e4f1da931403c1bfd49aa36af205b3d
|
/src/main/java/com/example/service/SpringDataUserDetailsService.java
|
5dcf4e403a0b77c8b556605e182805a4e2cb4151
|
[] |
no_license
|
JohnJairo1024/hotel
|
2593f0bbc4c127584341b167907731a08aee87c5
|
08f7a6effa4edd8fb81342ee51e483720eaab57d
|
refs/heads/master
| 2020-04-16T05:50:38.716456 | 2019-01-12T00:02:40 | 2019-01-12T00:02:40 | 165,323,817 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,358 |
java
|
package com.example.service;
import com.example.entity.Role;
import com.example.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import java.util.HashSet;
import java.util.Set;
public class SpringDataUserDetailsService implements UserDetailsService {
private UserService userService;
@Autowired
public void setUserService(UserService userService) {
this.userService = userService;
}
@Override
public UserDetails loadUserByUsername(String username) {
User user = userService.findByUserName(username);
if (user == null) {
throw new UsernameNotFoundException(username);
}
Role role = user.getRole();
Set<GrantedAuthority> grantedAuthorities = new HashSet<>();
grantedAuthorities.add(new SimpleGrantedAuthority(role.getName()));
return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(),
grantedAuthorities);
}
}
|
[
"[email protected]"
] | |
627ab2a148056e4793721a0fb5ab9eb6dae32f23
|
08c17ec05b4ed865c2b9be53f19617be7562375d
|
/aws-java-sdk-sesv2/src/main/java/com/amazonaws/services/simpleemailv2/model/transform/PutConfigurationSetDeliveryOptionsRequestProtocolMarshaller.java
|
ca8fedf0785f7a34319a7c0e5848076f23335384
|
[
"Apache-2.0"
] |
permissive
|
shishir2510GitHub1/aws-sdk-java
|
c43161ac279af9d159edfe96dadb006ff74eefff
|
9b656cfd626a6a2bfa5c7662f2c8ff85b7637f60
|
refs/heads/master
| 2020-11-26T18:13:34.317060 | 2019-12-19T22:41:44 | 2019-12-19T22:41:44 | 229,156,587 | 0 | 1 |
Apache-2.0
| 2020-02-12T01:52:47 | 2019-12-19T23:45:32 | null |
UTF-8
|
Java
| false | false | 2,988 |
java
|
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.simpleemailv2.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.simpleemailv2.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.protocol.*;
import com.amazonaws.protocol.Protocol;
import com.amazonaws.annotation.SdkInternalApi;
/**
* PutConfigurationSetDeliveryOptionsRequest Marshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class PutConfigurationSetDeliveryOptionsRequestProtocolMarshaller implements
Marshaller<Request<PutConfigurationSetDeliveryOptionsRequest>, PutConfigurationSetDeliveryOptionsRequest> {
private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.REST_JSON)
.requestUri("/v2/email/configuration-sets/{ConfigurationSetName}/delivery-options").httpMethodName(HttpMethodName.PUT)
.hasExplicitPayloadMember(false).hasPayloadMembers(true).serviceName("AmazonSimpleEmailServiceV2").build();
private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory;
public PutConfigurationSetDeliveryOptionsRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) {
this.protocolFactory = protocolFactory;
}
public Request<PutConfigurationSetDeliveryOptionsRequest> marshall(PutConfigurationSetDeliveryOptionsRequest putConfigurationSetDeliveryOptionsRequest) {
if (putConfigurationSetDeliveryOptionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
final ProtocolRequestMarshaller<PutConfigurationSetDeliveryOptionsRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(
SDK_OPERATION_BINDING, putConfigurationSetDeliveryOptionsRequest);
protocolMarshaller.startMarshalling();
PutConfigurationSetDeliveryOptionsRequestMarshaller.getInstance().marshall(putConfigurationSetDeliveryOptionsRequest, protocolMarshaller);
return protocolMarshaller.finishMarshalling();
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
|
[
""
] | |
f73664840d3f6c278d79e7169d810507358252f2
|
4f025c8999c1336b9b52d801aadee649f6fc553f
|
/app/src/main/java/android/gov/nist/javax/sip/header/ProxyAuthenticate.java
|
4b0a78fef62398ba0ecbc0cab2a2011be4fd4433
|
[] |
no_license
|
nzery/easysip
|
b9b63afd5dfad640e7ef8a3d3633ba9fa0ec9467
|
779846f47fa785f962567e4aaa5019d1d9132a44
|
refs/heads/master
| 2020-03-22T23:03:08.596868 | 2018-07-31T05:59:24 | 2018-07-31T05:59:24 | 140,787,067 | 10 | 6 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,194 |
java
|
/*
* Conditions Of Use
*
* This software was developed by employees of the National Institute of
* Standards and Technology (NIST), an agency of the Federal Government.
* Pursuant to title 15 Untied States Code Section 105, works of NIST
* employees are not subject to copyright protection in the United States
* and are considered to be in the public domain. As a result, a formal
* license is not needed to use the software.
*
* This software is provided by NIST as a service and is expressly
* provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY. NIST does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement
*
* .
*
*/
/*******************************************************************************
* Product of NIST/ITL Advanced Networking Technologies Division (ANTD). *
*******************************************************************************/
package android.gov.nist.javax.sip.header;
import android.javax.sip.address.URI;
import android.javax.sip.header.*;
/**
* Proxy Authenticate SIP (HTTP ) header.
*
* @version 1.2 $Revision: 1.5 $ $Date: 2009-07-17 18:57:33 $
*
* @author M. Ranganathan <br/>
* @author Olivier Deruelle <br/>
*
*
*
*/
public class ProxyAuthenticate
extends AuthenticationHeader
implements ProxyAuthenticateHeader {
/**
* Comment for <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 3826145955463251116L;
/**
* Default Constructor
*/
public ProxyAuthenticate() {
super(NAME);
}
/* (non-Javadoc)
* @see android.gov.nist.javax.sip.header.AuthenticationHeader#getURI()
*
* @since 1.2 this method is deprecated, uri is not a valid paramter for this header
* Fail silently for backwards compatibility
*/
public URI getURI() {
return null;
}
/* (non-Javadoc)
* @see android.gov.nist.javax.sip.header.AuthenticationHeader#setURI(android.javax.sip.address.URI)
*
* @since 1.2 this method is deprecated, uri is not a valid paramter for this header
* Fail silently for backwards compatibility
*/
public void setURI(URI uri) {
// empty, fail silently
}
}
/*
* $Log: not supported by cvs2svn $
* Revision 1.4 2006/07/13 09:01:19 mranga
* Issue number:
* Obtained from:
* Submitted by: jeroen van bemmel
* Reviewed by: mranga
* Moved some changes from jain-sip-1.2 to java.net
*
* CVS: ----------------------------------------------------------------------
* CVS: Issue number:
* CVS: If this change addresses one or more issues,
* CVS: then enter the issue number(s) here.
* CVS: Obtained from:
* CVS: If this change has been taken from another system,
* CVS: then name the system in this line, otherwise delete it.
* CVS: Submitted by:
* CVS: If this code has been contributed to the project by someone else; i.e.,
* CVS: they sent us a patch or a set of diffs, then include their name/email
* CVS: address here. If this is your work then delete this line.
* CVS: Reviewed by:
* CVS: If we are doing pre-commit code reviews and someone else has
* CVS: reviewed your changes, include their name(s) here.
* CVS: If you have not had it reviewed then delete this line.
*
* Revision 1.4 2006/06/19 06:47:26 mranga
* javadoc fixups
*
* Revision 1.3 2006/06/16 15:26:28 mranga
* Added NIST disclaimer to all public domain files. Clean up some javadoc. Fixed a leak
*
* Revision 1.2 2005/10/09 10:50:06 jeroen
* get/setURI is deprecated for WWW-Authenticate and Proxy-Authenticate,
* but not for other AAA related headers
*
* Revision 1.1.1.1 2005/10/04 17:12:35 mranga
*
* Import
*
*
* Revision 1.2 2004/01/22 13:26:29 sverker
* Issue number:
* Obtained from:
* Submitted by: sverker
* Reviewed by: mranga
*
* Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags.
*
* CVS: ----------------------------------------------------------------------
* CVS: Issue number:
* CVS: If this change addresses one or more issues,
* CVS: then enter the issue number(s) here.
* CVS: Obtained from:
* CVS: If this change has been taken from another system,
* CVS: then name the system in this line, otherwise delete it.
* CVS: Submitted by:
* CVS: If this code has been contributed to the project by someone else; i.e.,
* CVS: they sent us a patch or a set of diffs, then include their name/email
* CVS: address here. If this is your work then delete this line.
* CVS: Reviewed by:
* CVS: If we are doing pre-commit code reviews and someone else has
* CVS: reviewed your changes, include their name(s) here.
* CVS: If you have not had it reviewed then delete this line.
*
*/
|
[
"[email protected]"
] | |
563abcf5981aa2ab0d4ea5c2276974b0405a4710
|
84f511c0235b4e7194e1c4968fb47fa211155b3a
|
/TicTacToe/src/GameLoop.java
|
3690d55d65a0a99979ad435b1e17ce64544e649c
|
[] |
no_license
|
Dmitriy1337/Anti-Tic-Tac-Toe
|
f002aec434fa89ec770dfd2b6876ead6ec36487e
|
38286358af8aae179f5bf0f37094fe57f0e191fe
|
refs/heads/master
| 2021-01-20T05:13:14.510834 | 2017-08-25T18:14:01 | 2017-08-25T18:14:01 | 101,419,750 | 0 | 0 | null | null | null | null |
WINDOWS-1251
|
Java
| false | false | 5,316 |
java
|
public class GameLoop {
Constants c = new Constants();
SystemLog sLog = new SystemLog();
public Cell[][] gameField = new Cell[c.DIMENSION_MASS][c.DIMENSION_MASS];
int nearMass[];
public void createField(){//создает массив обьектов клеток
nearMass = new int[8];
for(int i = 7;i>=0;i--){
nearMass[i]=0;
}
for(int i=0;i<c.DIMENSION_MASS;i++){
for(int j=0;j<c.DIMENSION_MASS;j++){
gameField[i][j] = new Cell(i,j,nearMass,0);
}
}
sLog.logCellDMass("cellMassive",gameField);
}
public void changeState(){
for(int i = 0;i<c.DIMENSION_MASS;i++){
for(int j = 0;j<c.DIMENSION_MASS;j++){
if(((i-1)>=0&&(i-1)<=4)&&((j-1)>=0&&(j-1)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i-1][j-1].getState()==1&&((i-2)>=0&&(i-2)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i-2][j-2].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i)>=0&&(i)<=4)&&((j-1)>=0&&(j-1)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i][j-1].getState()==1&&((i)>=0&&(i)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i][j-2].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i+1)>=0&&(i+1)<=4)&&((j-1)>=0&&(j-1)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i+1][j-1].getState()==1&&((i+2)>=0&&(i+2)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i+2][j-2].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i-1)>=0&&(i-1)<=4)&&((j)>=0&&(j)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i-1][j].getState()==1&&((i-2)>=0&&(i-2)<=4)&&((j)>=0&&(j)<=4)){
if(gameField[i-2][j].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i+1)>=0&&(i+1)<=4)&&((j)>=0&&(j)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i+1][j].getState()==1&&((i-2)>=0&&(i-2)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i+2][j].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i-1)>=0&&(i-1)<=4)&&((j+1)>=0&&(j+1)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i-1][j+1].getState()==1&&((i-2)>=0&&(i-2)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i-2][j+2].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i)>=0&&(i)<=4)&&((j+1)>=0&&(j+1)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i][j+1].getState()==1&&((i-2)>=0&&(i-2)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i][j+2].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
if(((i+1)>=0&&(i+1)<=4)&&((j+1)>=0&&(j+1)<=4)){
if(gameField[i][j].getState()==1){
if(gameField[i+1][j+1].getState()==1&&((i-2)>=0&&(i-2)<=4)&&((j-2)>=0&&(j-2)<=4)){
if(gameField[i+2][j+2].getState()==1){
sLog.logn("ffffffffffffffffffffffffffffffffffffffffffffffffff");
}
}
}
}//
}
}
}
public void changeNearMass(){
for(int i = 0;i<c.DIMENSION_MASS;i++){
for(int j = 0;j<c.DIMENSION_MASS;j++){
if(((i-1)>=0&&(i-1)<=4)&&((j-1)>=0&&(j-1)<=4)){
gameField[i][j].getNearMass()[0]=gameField[i-1][j-1].getState();
sLog.logn("check");
}
if(((i)>=0&&(i)<=4)&&((j-1)>=0&&(j-1)<=4)){
gameField[i][j].getNearMass()[1]=gameField[i][j-1].getState();
sLog.logn("check");
}
if(((i+1)>=0&&(i+1)<=4)&&((j-1)>=0&&(j-1)<=4)){
gameField[i][j].getNearMass()[2]=gameField[i+1][j-1].getState();
sLog.logn("check");
}
if(((i-1)>=0&&(i-1)<=4)&&((j)>=0&&(j)<=4)){
gameField[i][j].getNearMass()[3]=gameField[i-1][j].getState();
sLog.logn("check");
}
if(((i+1)>=0&&(i+1)<=4)&&((j-1)>=0&&(j-1)<=4)){
gameField[i][j].getNearMass()[4]=gameField[i+1][j].getState();
sLog.logn("check");
}
if(((i-1)>=0&&(i-1)<=4)&&((j+1)>=0&&(j+1)<=4)){
gameField[i][j].getNearMass()[5]=gameField[i-1][j+1].getState();
sLog.logn("check");
}
if(((i)>=0&&(i)<=4)&&((j+1)>=0&&(j+1)<=4)){
gameField[i][j].getNearMass()[6]=gameField[i][j+1].getState();
sLog.logn("check");
}
if(((i+1)>=0&&(i+1)<=4)&&((j+1)>=0&&(j+1)<=4)){
gameField[i][j].getNearMass()[7]=gameField[i+1][j+1].getState();
sLog.logn("check");
}
}
}
}
}
|
[
"Дмитрий@Dmitriy"
] |
Дмитрий@Dmitriy
|
461aead0dcf57b28357b6dfd8f38b29022762358
|
74b47b895b2f739612371f871c7f940502e7165b
|
/aws-java-sdk-athena/src/main/java/com/amazonaws/services/athena/model/transform/UpdateWorkGroupRequestMarshaller.java
|
3e55b75ba73fce70ee49778b004c788a01a2aca9
|
[
"Apache-2.0"
] |
permissive
|
baganda07/aws-sdk-java
|
fe1958ed679cd95b4c48f971393bf03eb5512799
|
f19bdb30177106b5d6394223a40a382b87adf742
|
refs/heads/master
| 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 |
Apache-2.0
| 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null |
UTF-8
|
Java
| false | false | 3,010 |
java
|
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.athena.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.athena.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* UpdateWorkGroupRequestMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class UpdateWorkGroupRequestMarshaller {
private static final MarshallingInfo<String> WORKGROUP_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("WorkGroup").build();
private static final MarshallingInfo<String> DESCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Description").build();
private static final MarshallingInfo<StructuredPojo> CONFIGURATIONUPDATES_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ConfigurationUpdates").build();
private static final MarshallingInfo<String> STATE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("State").build();
private static final UpdateWorkGroupRequestMarshaller instance = new UpdateWorkGroupRequestMarshaller();
public static UpdateWorkGroupRequestMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(UpdateWorkGroupRequest updateWorkGroupRequest, ProtocolMarshaller protocolMarshaller) {
if (updateWorkGroupRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(updateWorkGroupRequest.getWorkGroup(), WORKGROUP_BINDING);
protocolMarshaller.marshall(updateWorkGroupRequest.getDescription(), DESCRIPTION_BINDING);
protocolMarshaller.marshall(updateWorkGroupRequest.getConfigurationUpdates(), CONFIGURATIONUPDATES_BINDING);
protocolMarshaller.marshall(updateWorkGroupRequest.getState(), STATE_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
|
[
""
] | |
750d0930683af6e3de01ac3640f5159bb910e317
|
eaa33ccda8543c128f0856223bbd4e7034085c60
|
/kafka-rest/src/main/java/io/confluent/kafkarest/controllers/BrokerManager.java
|
fd983be8b96f7c2a3af53315dfc12ccda4ad1c27
|
[
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
intvprep/kafka-rest
|
703ac50b077f2eded7544b54920f8f94e5a75932
|
caee26c30a41d193ee3ab8b15d13ff4b45e38fc3
|
refs/heads/master
| 2021-06-27T17:40:41.392498 | 2020-08-24T23:21:30 | 2020-08-24T23:21:30 | 90,500,614 | 0 | 0 |
Apache-2.0
| 2020-08-24T23:21:32 | 2017-05-07T01:09:53 |
Java
|
UTF-8
|
Java
| false | false | 1,506 |
java
|
/*
* Copyright 2020 Confluent Inc.
*
* Licensed under the Confluent Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.confluent.io/confluent-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.confluent.kafkarest.controllers;
import io.confluent.kafkarest.entities.Broker;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
/**
* A service to manage Kafka {@link Broker Brokers}.
*/
public interface BrokerManager {
/**
* Returns the list of Kafka {@link Broker Brokers} belonging to the {@link
* io.confluent.kafkarest.entities.Cluster} with the given {@code clusterId}.
*/
CompletableFuture<List<Broker>> listBrokers(String clusterId);
/**
* Returns the Kafka {@link Broker} with the given {@code brokerId}.
*/
CompletableFuture<Optional<Broker>> getBroker(String clusterId, int brokerId);
/**
* Returns the list of Kafka {@link Broker Brokers} belonging to the {@link
* io.confluent.kafkarest.entities.Cluster} that this application is connected to.
*/
CompletableFuture<List<Broker>> listLocalBrokers();
}
|
[
"[email protected]"
] | |
cdf1fc298f6e22f21ecde2d1d8b1a51b0d3833f7
|
1361211d45a33de9c9905c6cbf50fd4262ef7378
|
/liquibase-2.0/src/test/java/ru/kirkazan/esadykov/investigation/liquibase20/SampleCustomChange.java
|
4f889623a4848e4d88ec58e8110d6b9e01cf6d27
|
[
"Apache-2.0"
] |
permissive
|
esadykov/investigation
|
9a5b21caa105afcd2d78dbcd6b8376c0af730231
|
03bc321713e875a28dbb2288563a5ead4f85d552
|
refs/heads/master
| 2021-01-15T18:08:42.277174 | 2017-10-06T11:31:28 | 2017-10-06T11:31:28 | 16,993,181 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,783 |
java
|
package ru.kirkazan.esadykov.investigation.liquibase20;
import liquibase.change.custom.CustomSqlChange;
import liquibase.change.custom.CustomTaskChange;
import liquibase.database.Database;
import liquibase.database.jvm.JdbcConnection;
import liquibase.exception.CustomChangeException;
import liquibase.exception.SetupException;
import liquibase.exception.ValidationErrors;
import liquibase.resource.ResourceAccessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.ResultSet;
/**
* @author esadykov
* @since 27.03.14 20:29
*/
public class SampleCustomChange implements CustomTaskChange
{
private String param;
private String param2;
private String param3;
private String param4;
private String param5;
public void setParam(String param)
{
this.param = param;
}
public void setParam2(String param2)
{
this.param2 = param2;
}
public void setParam3(String param3)
{
this.param3 = param3;
}
public void setParam4(String param4)
{
this.param4 = param4;
}
public void setParam5(String param5)
{
this.param5 = param5;
}
Logger logger = LoggerFactory.getLogger("liquibase");
@Override
public void execute(Database database) throws CustomChangeException
{
logger.info("execute with param2 {}", param2);
ResultSet resultSet;
}
@Override
public String getConfirmationMessage()
{
return "All Clear";
}
@Override
public void setUp() throws SetupException
{
}
@Override
public void setFileOpener(ResourceAccessor resourceAccessor)
{
}
@Override
public ValidationErrors validate(Database database)
{
return null;
}
}
|
[
"[email protected]"
] | |
f02482a28bc14d747171ca876cd6ff6c240b7379
|
38ec83878edbc8aa7f512ebac8788662dc58b617
|
/myapp/work/org/apache/jsp/ch05/includeTag4_jsp.java
|
84a1f5f18a2ea687ba4d4293f87e4f2a0247a367
|
[] |
no_license
|
mc921006/jsp
|
df6bbe0de9e97703184bcb45fe3040f7ddf5d47b
|
7bc02cd8c8b798bc15d2cd50f3bd6e691ce432c5
|
refs/heads/master
| 2020-05-04T20:27:21.601924 | 2019-05-16T07:36:17 | 2019-05-16T07:36:17 | 179,438,624 | 0 | 0 | null | 2019-04-19T05:27:23 | 2019-04-04T06:49:49 |
Java
|
UTF-8
|
Java
| false | false | 5,215 |
java
|
/*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/9.0.8
* Generated at: 2019-04-02 01:48:14 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp.ch05;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class includeTag4_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent,
org.apache.jasper.runtime.JspSourceImports {
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
static {
_jspx_imports_packages = new java.util.HashSet<>();
_jspx_imports_packages.add("javax.servlet");
_jspx_imports_packages.add("javax.servlet.http");
_jspx_imports_packages.add("javax.servlet.jsp");
_jspx_imports_classes = null;
}
private volatile javax.el.ExpressionFactory _el_expressionfactory;
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public java.util.Set<java.lang.String> getPackageImports() {
return _jspx_imports_packages;
}
public java.util.Set<java.lang.String> getClassImports() {
return _jspx_imports_classes;
}
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
if (_el_expressionfactory == null) {
synchronized (this) {
if (_el_expressionfactory == null) {
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
}
}
}
return _el_expressionfactory;
}
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
if (_jsp_instancemanager == null) {
synchronized (this) {
if (_jsp_instancemanager == null) {
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
}
}
return _jsp_instancemanager;
}
public void _jspInit() {
}
public void _jspDestroy() {
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
final java.lang.String _jspx_method = request.getMethod();
if ("OPTIONS".equals(_jspx_method)) {
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
return;
}
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
return;
}
}
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=EUC-KR");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<!-- includeTag4.jsp -->\r\n");
out.write("\r\n");
request.setCharacterEncoding("EUC-KR");
String name = request.getParameter("name");
String siteName = request.getParameter("siteName");
out.write("\r\n");
out.write("name : ");
out.print(name );
out.write("<br>\r\n");
out.write("siteName : ");
out.print(siteName );
out.write("<br>\r\n");
out.write("<hr color= \"black\">\r\n");
} catch (java.lang.Throwable t) {
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
try {
if (response.isCommitted()) {
out.flush();
} else {
out.clearBuffer();
}
} catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
|
[
"[email protected]"
] | |
651179e398d8eb5bb28aa61881c3b66321f768a0
|
5f182f2b27a44b610fb950d32438c719857b987a
|
/src/main/java/com/baidu/cms/common/beanvalidator/BeanValidators.java
|
e6d31ca31cbe9b371c71073c87929ed97d56ad16
|
[] |
no_license
|
xuebusi/my-jeesite
|
c69fb11cb59c39cd52ce713f78dbfe4bd6c75faa
|
092f618dafb710b7bdcbc1dcb8ef6354d2f6bb3f
|
refs/heads/master
| 2021-09-24T17:35:05.178584 | 2018-10-12T05:24:11 | 2018-10-12T05:24:11 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 4,214 |
java
|
/**
* Copyright (c) 2005-2012 springside.org.cn
*/
package com.baidu.cms.common.beanvalidator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Validator;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
/**
* JSR303 Validator(Hibernate Validator)工具类.
*
* ConstraintViolation中包含propertyPath, message 和invalidValue等信息.
* 提供了各种convert方法,适合不同的i18n需求:
* 1. List<String>, String内容为message
* 2. List<String>, String内容为propertyPath + separator + message
* 3. Map<propertyPath, message>
*
* 详情见wiki: https://github.com/springside/springside4/wiki/HibernateValidator
* @author calvin
* @version 2013-01-15
*/
public class BeanValidators {
/**
* 调用JSR303的validate方法, 验证失败时抛出ConstraintViolationException.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public static void validateWithException(Validator validator, Object object, Class<?>... groups)
throws ConstraintViolationException {
Set constraintViolations = validator.validate(object, groups);
if (!constraintViolations.isEmpty()) {
throw new ConstraintViolationException(constraintViolations);
}
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>中为List<message>.
*/
public static List<String> extractMessage(ConstraintViolationException e) {
return extractMessage(e.getConstraintViolations());
}
/**
* 辅助方法, 转换Set<ConstraintViolation>为List<message>
*/
@SuppressWarnings("rawtypes")
public static List<String> extractMessage(Set<? extends ConstraintViolation> constraintViolations) {
List<String> errorMessages = Lists.newArrayList();
for (ConstraintViolation violation : constraintViolations) {
errorMessages.add(violation.getMessage());
}
return errorMessages;
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为Map<property, message>.
*/
public static Map<String, String> extractPropertyAndMessage(ConstraintViolationException e) {
return extractPropertyAndMessage(e.getConstraintViolations());
}
/**
* 辅助方法, 转换Set<ConstraintViolation>为Map<property, message>.
*/
@SuppressWarnings("rawtypes")
public static Map<String, String> extractPropertyAndMessage(Set<? extends ConstraintViolation> constraintViolations) {
Map<String, String> errorMessages = Maps.newHashMap();
for (ConstraintViolation violation : constraintViolations) {
errorMessages.put(violation.getPropertyPath().toString(), violation.getMessage());
}
return errorMessages;
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为List<propertyPath message>.
*/
public static List<String> extractPropertyAndMessageAsList(ConstraintViolationException e) {
return extractPropertyAndMessageAsList(e.getConstraintViolations(), " ");
}
/**
* 辅助方法, 转换Set<ConstraintViolations>为List<propertyPath message>.
*/
@SuppressWarnings("rawtypes")
public static List<String> extractPropertyAndMessageAsList(Set<? extends ConstraintViolation> constraintViolations) {
return extractPropertyAndMessageAsList(constraintViolations, " ");
}
/**
* 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为List<propertyPath +separator+ message>.
*/
public static List<String> extractPropertyAndMessageAsList(ConstraintViolationException e, String separator) {
return extractPropertyAndMessageAsList(e.getConstraintViolations(), separator);
}
/**
* 辅助方法, 转换Set<ConstraintViolation>为List<propertyPath +separator+ message>.
*/
@SuppressWarnings("rawtypes")
public static List<String> extractPropertyAndMessageAsList(Set<? extends ConstraintViolation> constraintViolations,
String separator) {
List<String> errorMessages = Lists.newArrayList();
for (ConstraintViolation violation : constraintViolations) {
errorMessages.add(violation.getPropertyPath() + separator + violation.getMessage());
}
return errorMessages;
}
}
|
[
"[email protected]"
] | |
88d3ec3f5c236456cb599cfbcc25819a99025a1f
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/45/org/apache/commons/math/linear/SingularValueDecomposition_solve_695.java
|
f4d0149a22c2b5e39e285b525b95460a4c943261
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null |
UTF-8
|
Java
| false | false | 1,872 |
java
|
org apach common math linear
calcul compact singular decomposit matrix
singular decomposit matrix set matric
sigma time sigma time
time matrix time orthogon matrix sigma
time diagon matrix posit element time
orthogon matrix orthogon
min
similar similar
href http math nist gov javanumer jama jama librari
code norm2 method renam link norm getnorm
norm getnorm
code cond method renam link
condit number getconditionnumb condit number getconditionnumb
code rank method renam link rank getrank
rank getrank
link getut getut method ad
link getvt getvt method ad
link solver getsolv solver getsolv method ad
link covari getcovari covari getcovari method ad
href http mathworld wolfram singular decomposit singularvaluedecomposit html math world mathworld
href http wikipedia org wiki singular decomposit wikipedia
version
chang concret
singular decomposit singularvaluedecomposit
solv linear equat time squar sens
time matrix squar solut
time minim
param hand side equat time
vector minim norm time
org apach common math except dimens mismatch except dimensionmismatchexcept
matric dimens match
real vector realvector solv real vector realvector
pseudo invers pseudoinvers oper
|
[
"[email protected]"
] | |
de3759c1bd1c95bfc2fb2dfc4afd4ece265220e2
|
45391cab87ccdd399353a4b1cd895603be44530f
|
/src/main/java/com/wojbk/miaosha/entity/MiaoshaGoods.java
|
2425bb14b797249ef2be2c8febb0a7830b57d6e8
|
[] |
no_license
|
yhao1107/miaosha_qyh
|
9c2a76868cd8cf60a7ca7782a924c803e2dbefe8
|
365a83567d4f4666b5048ea66fa071a08db4aecd
|
refs/heads/master
| 2022-06-25T16:02:31.870100 | 2022-06-16T13:53:00 | 2022-06-16T13:53:00 | 203,933,998 | 3 | 1 | null | 2022-06-17T02:24:05 | 2019-08-23T06:02:28 |
Java
|
UTF-8
|
Java
| false | false | 1,159 |
java
|
package com.wojbk.miaosha.entity;
import java.util.Date;
public class MiaoshaGoods {
private Long id;
private Long goodsId;
private Double miaoshaPrice;
private Integer stockCount;
private Date startDate;
private Date endDate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public Double getMiaoshaPrice() {
return miaoshaPrice;
}
public void setMiaoshaPrice(Double miaoshaPrice) {
this.miaoshaPrice = miaoshaPrice;
}
public Integer getStockCount() {
return stockCount;
}
public void setStockCount(Integer stockCount) {
this.stockCount = stockCount;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
}
|
[
"[email protected]"
] | |
a956c9540ef748f6f191e0128eca2f461265bf62
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/textstatus/a/k.java
|
b32e30291d42d1119898fad6563a2ec161a68b2f
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 |
Java
|
UTF-8
|
Java
| false | false | 1,702 |
java
|
package com.tencent.mm.plugin.textstatus.a;
import android.content.Context;
import android.os.Bundle;
import android.widget.FrameLayout;
import com.tencent.mm.plugin.textstatus.proto.TextStatusJumpInfo;
import com.tencent.mm.plugin.textstatus.proto.m;
import java.util.List;
public abstract class k
{
protected String jumpType;
public k(String paramString)
{
this.jumpType = paramString;
}
public void a(m paramm) {}
public boolean d(FrameLayout paramFrameLayout)
{
return false;
}
public boolean e(FrameLayout paramFrameLayout)
{
return false;
}
public boolean eKU()
{
return true;
}
public boolean eKV()
{
return true;
}
public w eKW()
{
return null;
}
public String etP()
{
return "";
}
public abstract boolean etQ();
public CharSequence etS()
{
return "";
}
public CharSequence etT()
{
return "";
}
public boolean f(FrameLayout paramFrameLayout)
{
return false;
}
public abstract boolean g(Context paramContext, Bundle paramBundle);
public boolean gz(Context paramContext)
{
return false;
}
public String hFu()
{
return this.jumpType;
}
public boolean km(Context paramContext)
{
return g(paramContext, null);
}
public abstract void onDetach();
public abstract void y(String paramString, List<TextStatusJumpInfo> paramList);
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes8.jar
* Qualified Name: com.tencent.mm.plugin.textstatus.a.k
* JD-Core Version: 0.7.0.1
*/
|
[
"[email protected]"
] | |
c19a30183fdae9c7fae9589cac76b33459fdd890
|
31e16717f082a37e66ad3771760f4280bfc31b89
|
/InterfaceProcessamentoContratos/src/services/PaypalService.java
|
707f07c8f764d44b193ea7914f229a0f164eb85f
|
[] |
no_license
|
abelrufino/eclipse-workspace
|
84c0456908108e974f3080cb244e6fc1130bff48
|
ced3a922b48debbb9194e0eb037c9c6780de74b4
|
refs/heads/master
| 2022-12-01T04:17:03.157869 | 2020-08-21T13:15:26 | 2020-08-21T13:15:26 | 265,421,367 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 469 |
java
|
package services;
public class PaypalService implements OnlinePaymentService {
private static final double FEE_PERCENTAGE = 0.02;
private static final double MONTHLY_INTEREST = 0.01;
@Override
public double paymentFee(double amount) {
// TODO Auto-generated method stub
return amount * FEE_PERCENTAGE;
}
@Override
public double interest(double amount, int months) {
// TODO Auto-generated method stub
return amount * MONTHLY_INTEREST * months;
}
}
|
[
"[email protected]"
] | |
15fd492c1f5b577e47d2ffd4edbbf66ee5f0cc68
|
2272b13a353e02ea47b89106e2975052ec63c9ab
|
/src/main/java/janv/small/app/quizvragen2/Quizvragen.java
|
6f779be317a7ba919e5d2ec06ef6dee1031d55b7
|
[] |
no_license
|
janvenstermans/quizvragen
|
acd2d4b0291667c1162ad1eacd86c942f94c8f81
|
8fdf29607be72e83ac2fc54e224f7490f1c624dd
|
refs/heads/master
| 2021-01-10T18:30:25.395493 | 2015-04-12T21:50:49 | 2015-04-12T21:50:49 | 30,510,942 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,246 |
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package janv.small.app.quizvragen2;
/**
*
* @author janv
*/
public class Quizvragen {
private String fileName;
private QuizvragenApplicationController quizvragenApplicationController;
private QuizvragenProperties quizvragenProperties
= new QuizvragenPropertiesImpl();
private static Quizvragen application = new Quizvragen();
private Quizvragen() {
}
public static Quizvragen getInstance() {
return application;
}
public QuizvragenApplicationController getQuizvragenApplicationController() {
if (quizvragenApplicationController == null) {
quizvragenApplicationController = new QuizvragenApplicationControllerImpl();
}
return quizvragenApplicationController;
}
public QuizvragenProperties getQuizvragenProperties() {
return quizvragenProperties;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
}
|
[
"[email protected]"
] | |
7d0b13faf98bebb1970e9be1aacc78fca12f5623
|
19a701de0951592c8a97b8d5ecf2c0bbc1084f5b
|
/src/test/java/tk/codecube/test/web/main/DynamicForwardController.java
|
c0a18832a2fb071debb974f27ec1c92403849da8
|
[] |
no_license
|
yoboygo/baseSpring4
|
281966628bda76f914f7a64ddd7779816b3c9235
|
397e196b95c66788d61a9f2a8c42884e9ed5523c
|
refs/heads/master
| 2020-04-13T22:11:55.230541 | 2018-05-01T23:24:20 | 2018-05-01T23:24:20 | 24,257,116 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 803 |
java
|
/**
* DynamicForwardController.java
*
* Aimy
* 下午1:11:15
*/
package tk.codecube.test.web.main;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/** 动态跳转
* @author Aimy
* 2014年12月2日 下午1:11:15
*/
@Controller
@RequestMapping("/forward")
public class DynamicForwardController {
/**
* 动态跳转方法
* @auther Aimy
* @param request
* @return
* 2014年12月2日 下午1:12:19
*/
@RequestMapping("/**")
public String dynamicForward(HttpServletRequest request)
{
String ctx = request.getContextPath();
String urlTmp = request.getRequestURI();
return urlTmp.replace(ctx, "").replace("forward", "");
}
}
|
[
"[email protected]"
] | |
24913efc0ba17d343c5e2ae8aada0e10f3d26515
|
f64010f3ce092dc5779d394a30b560d665c296c6
|
/src/com/example/holamundo/MainActivity.java
|
5defc106cc4c002acc2697281c93e8aa9c3419b6
|
[] |
no_license
|
tutor-pg/app-pg
|
c60f96ad5e45155c0e5ae8cc265828f58462a697
|
f5ddda8115f92358995370b5a5b6dad489c25c57
|
refs/heads/master
| 2020-05-19T11:40:38.261823 | 2013-01-10T14:57:29 | 2013-01-10T14:57:29 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 548 |
java
|
package com.example.holamundo;
import android.os.Bundle;
import android.view.Menu;
import org.apache.cordova.*;
public class MainActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
super.loadUrl("file:///android_asset/www/index.html");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
|
[
"usuario@servidor"
] |
usuario@servidor
|
54bf9c9f803e5ace837a126244975ebccb9845e5
|
fe31bf09395612e89286c4b2fafb996f4ac8b44b
|
/src/main/java/com/rmty/framework/HelperLoader.java
|
ae72dd80604956c2eadfd11f31927c0846113ab9
|
[] |
no_license
|
Pawn-rmty/smallweb
|
789714402fae1daf945f8809f946b511bf5fc4af
|
ab6c86a6d6f44466803da08bda4fcc58a772b1b3
|
refs/heads/master
| 2022-07-15T03:17:12.678637 | 2019-09-11T04:16:54 | 2019-09-11T04:16:54 | 207,721,436 | 0 | 0 | null | 2022-06-21T01:51:07 | 2019-09-11T04:14:47 |
Java
|
UTF-8
|
Java
| false | false | 541 |
java
|
package com.rmty.framework;
import com.rmty.framework.helper.*;
import com.rmty.framework.util.ClassUtil;
public final class HelperLoader {
public static void init() {
Class<?>[] classList = {
//加载顺序注意
ClassHelper.class,
BeanHelper.class,
AopHelper.class,
IocHelper.class,
ControllerHelper.class
};
for (Class<?> cls : classList) {
ClassUtil.loadClass(cls.getName());
}
}
}
|
[
"[email protected]"
] | |
69db3303b72c80c7840163207f093d518f81857d
|
88544dcb884397f08e7cc8d44099abeba16980d1
|
/mvp/src/main/java/myfirst/mvp/model/MyModel.java
|
3fd844f16c889d21c6673e525485e0771995ff10
|
[] |
no_license
|
Barexn/MyApplication8
|
dc4b5942fb11b8e9afe77e54c336190565e11790
|
0247e044e96237fb6228b17f6cbb2862c7746e91
|
refs/heads/master
| 2021-07-21T13:58:11.689610 | 2017-10-26T04:26:51 | 2017-10-26T04:26:51 | 108,361,468 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 838 |
java
|
package myfirst.mvp.model;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
/**
* Created by Bare on 2017/10/26.
*/
public class MyModel {
public void getData(String path, final Fragment1ModelListener listener){
OkHttpClient client=new OkHttpClient();
final Request request=new Request.Builder()
.url(path)
.build();
client.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
}
@Override
public void onResponse(Call call, Response response) throws IOException {
listener.success(response.body().string());
}
});
}
}
|
[
"[email protected]"
] | |
c529c2c477987d3e7173c60dc66fdcba4e337ece
|
d71285da46204be3ff7561f0507aa113bd7fae99
|
/2020/Day4_PasssportProcessing.java
|
844d18a0cdf5f4298f58e4cdb54f46fa10971c7c
|
[] |
no_license
|
Nicht-menschlich/adventOfCode
|
5a9e5335197182434ad111c5c674521f704bb0c0
|
1e2c1e776f8607aeba89418174a1498316e55932
|
refs/heads/main
| 2023-02-23T05:50:04.783413 | 2021-01-25T17:00:56 | 2021-01-25T17:00:56 | 328,394,354 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,892 |
java
|
package advent_of_code;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Day4_PasssportProcessing {
public static String BirthYear = "byr";
public static String IssueYear = "iyr";
public static String ExpirationYear = "eyr";
public static String Height = "hgt";
public static String HairColor = "hcl";
public static String EyeColor = "ecl";
public static String PassportID = "pid";
public static String CountryID = "cid";
public static boolean CountryIDActiv = false;
public static void main(String[] args) throws IOException {
List<String> StringList = new ArrayList<String>();
List<String> StringList2 = new ArrayList<String>();
FileReader fr = new FileReader("C:/Users/Sascha-Zimmer/Desktop/test.txt");
BufferedReader br = new BufferedReader(fr);
String zeile = "";
while ((zeile = br.readLine()) != null) {
StringList2.add(zeile);
}
StringList2.add("");
String Passport = "";
for (String string : StringList2) {
if (string.isEmpty()) {
Passport = Passport + " " + string;
StringList.add(Passport);
Passport = "";
} else {
Passport = Passport + " " + string;
}
}
int counter = 0;
for (String string : StringList) {
if (string.contains(BirthYear) && string.contains(IssueYear) && string.contains(ExpirationYear)
&& string.contains(Height) && string.contains(HairColor) && string.contains(EyeColor)
&& string.contains(PassportID)) {
if (checkData(string)) {
if (CountryIDActiv) {
if (string.contains(CountryID)) {
counter++;
}
} else {
//System.out.println(string);
counter = counter + 1;
}
}
}
}
System.out.println(counter);
br.close();
}
public static boolean checkData(String Passport) {
List<String> DataSplit = new ArrayList<String>();
String Split = "";
for (int i = 0; i < Passport.length(); i++) {
if (String.valueOf(Passport.charAt(i)).equals(" ")) {
DataSplit.add(Split);
Split = "";
} else {
Split = Split + String.valueOf(Passport.charAt(i));
}
}
for (String string : DataSplit) {
if (string.contains(BirthYear)) {
if (!checkYear(BirthYear, string, 1920, 2002))
return false;
}
if (string.contains(IssueYear)) {
if (!checkYear(IssueYear, string, 2010, 2020))
return false;
}
if (string.contains(ExpirationYear)) {
if (!checkYear(ExpirationYear, string, 2020, 2030))
return false;
}
if (string.contains(Height)) {
if (!checkGage(Height, string, 150, 193, 59, 76))
return false;
}
if (string.contains(EyeColor)) {
if (!checkEyeColor(Height, string))
return false;
}
if (string.contains(HairColor)) {
if (!checkHairColor(HairColor, string))
return false;
}
if (string.contains(PassportID)) {
if (!checkPassportNumber(PassportID, string))
return false;
}
}
return true;
}
public static boolean checkYear(String SearchData, String string, int minYear, int maxYear) {
String YearString = "";
for (int i = (SearchData.length() + 1); i < string.length(); i++) {
YearString = YearString + String.valueOf(string.charAt(i));
}
int Year = Integer.parseInt(YearString);
if (!(Year >= minYear) || !(Year <= maxYear)) {
return false;
}
return true;
}
public static boolean checkEyeColor(String SearchData, String string) {
String EyeColorString = "";
for (int i = (SearchData.length() + 1); i < string.length(); i++) {
EyeColorString = EyeColorString + String.valueOf(string.charAt(i));
}
List<String> color = new ArrayList<String>();
color.add("amb");
color.add("blu");
color.add("brn");
color.add("gry");
color.add("grn");
color.add("hzl");
color.add("oth");
for (String string2 : color) {
if (EyeColorString.equals(string2)) {
return true;
}
}
return false;
}
public static boolean checkPassportNumber(String SearchData, String string) {
String NumberString = "";
for (int i = (SearchData.length() + 1); i < string.length(); i++) {
NumberString = NumberString + String.valueOf(string.charAt(i));
}
if(NumberString.length() != 9) return false;
try {
int Number = Integer.parseInt(NumberString);
} catch (NumberFormatException e) {
return false;
}
return true;
}
public static boolean checkHairColor(String SearchData, String string) {
String HairColorString = "";
for (int i = (SearchData.length() + 1); i < string.length(); i++) {
HairColorString = HairColorString + String.valueOf(string.charAt(i));
}
if (HairColorString.length() != 7) return false;
if (!HairColorString.startsWith("#")) return false;
HairColorString = HairColorString.toLowerCase();
for (Character c : HairColorString.toCharArray()) {
try {
int Number = Integer.parseInt(String.valueOf(c));
} catch (Exception e) {
if (c != 'a' && c != 'b' && c != 'c'&& c != 'd' && c != 'e' && c != 'f') {
if(!String.valueOf(c).equals("#")) {
return false;
}
}
}
}
return true;
}
public static Boolean checkGage(String SearchData, String string, int minCM, int maxCM, int minIN, int maxIN) {
String Gage = "";
String NumberString = "";
for (int i = (string.length() - 2); i < string.length(); i++) {
Gage = Gage + String.valueOf(string.charAt(i));
}
if(!Gage.contains("cm") && !Gage.contains("in")) return false;
for (int i = (SearchData.length() + 1); i < (string.length() - 2); i++) {
NumberString = NumberString + String.valueOf(string.charAt(i));
}
int Number = Integer.parseInt(NumberString);
if (Gage.equals("cm")) {
if (!(Number >= minCM) || !(Number <= maxCM)) {
return false;
}
} else if (Gage.equals("in")) {
if (!(Number >= minIN) || !(Number <= maxIN)) {
return false;
}
}
return true;
}
}
|
[
"[email protected]"
] | |
01685aa40037ae68a87ae8667b86bde25ba34d1c
|
d9d4aa4636e75b1214b87a657522086072890fa3
|
/src/main/java/com/example/servletjspdemo/web/Form.java
|
019b70cee26f1cba49d45129ae5ccf12ca386e30
|
[] |
no_license
|
MDhouse/JAZZad1
|
44af655c7f06235798d2ca028d6beb8647db6bbb
|
299f2e5864c8b64a68ffbe7c1d38ce909dd6099e
|
HEAD
| 2016-09-05T12:55:45.348778 | 2015-03-09T21:17:25 | 2015-03-09T21:17:25 | 31,923,114 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,780 |
java
|
package com.example.servletjspdemo.web;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.example.servletjspdemo.domain.Participant;
@WebServlet("/Form")
public class Form extends HttpServlet
{
private static final long serialVersionUID = 1L;
public Form()
{
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String firstName = request.getParameter("firstName");
String lastName = request.getParameter("lastName");
String email = request.getParameter("email");
String emailAuthenticate = request.getParameter("emailAuthenticate");
String superior = request.getParameter("superior");
String info = request.getParameter("info");
String text = request.getParameter("text");
int limit = 5;
HttpSession session = request.getSession();
if(email!=null && emailAuthenticate!=null && email.equals(emailAuthenticate))
{
if(session.getAttribute("lastName") != null && session.getAttribute("lastName").equals(lastName) && session.getAttribute("email") != null && session.getAttribute("email").equals(email))
{
response.sendRedirect("DoubleRegistered.jsp");
}
else if(firstName!=null && !firstName.equals("") && lastName!=null && !lastName.equals(""))
{
session.setAttribute("firstName", firstName);
session.setAttribute("lastName", lastName);
session.setAttribute("email", email);
if(Participant.participant < limit)
{
Participant p = new Participant();
p.setFirstName(firstName);
p.setLastName(lastName);
p.setEmail(email);
p.setEmail1(emailAuthenticate);
p.setSuperior(superior);
p.setInfo(info);
p.setText(text);
response.sendRedirect("Registered.jsp");
}
else
{
response.sendRedirect("NoRegistered.jsp");
}
}
else
{
response.sendRedirect("NoData.jsp");
}
}
else
{
response.sendRedirect("Mistake.jsp");
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
}
}
|
[
"MY@MY-Komputer"
] |
MY@MY-Komputer
|
3160d3dcf6c3c3939dd21fde8cbf3aacb690cbbd
|
15d6c947a0ad88c7be7435652db50860bba94a40
|
/src/boletin2/pkg8/Boletin28.java
|
6ecd2ef142dbd0cb79f926f71ba8d76c32ea38fe
|
[] |
no_license
|
SergioLago1/Boletin2.8-Prog
|
14cf12bb52ffa00e2274339f60d2e0a40de900e2
|
7043a425d2feb727a31c136106134c0d370b7e9b
|
refs/heads/master
| 2016-08-12T12:57:30.290342 | 2015-10-15T07:30:44 | 2015-10-15T07:30:44 | 44,301,023 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 779 |
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package boletin2.pkg8;
import java.util.Scanner;
/**
*
* @author slagogonzalez
*/
public class Boletin28 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
float grados;
float kelvin;
float farenheint;
Scanner obx=new Scanner(System.in);
System.out.print("Introducir grados :");
grados=obx.nextFloat();
kelvin = grados + 273;
farenheint = 32+1.8f*grados;
System.out.print("Grados kelvin = "+kelvin);
System.out.print("Grados Farenheint = "+farenheint);
}
}
|
[
"[email protected]"
] | |
609af13a1530d46d4bd00301084270eaceabb354
|
0fcb788d660ca2882e53259d477cd6f07cca1e27
|
/Eshop/src/cn/zph/eshop/user/service/impl/UserServiceImpl.java
|
b5163b9747fca46fe4191e0bdc8d051fc3226663
|
[] |
no_license
|
zhangpenghui1997/Java_Repository
|
9c7f57eb6cad60dfc38b942ff3ffc3d87a85e2ec
|
a0f58461e9d4816cfcfc1d8be768470512e36823
|
refs/heads/master
| 2023-02-25T21:22:55.523478 | 2021-01-24T04:18:05 | 2021-01-24T04:18:05 | 332,359,038 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 797 |
java
|
package cn.zph.eshop.user.service.impl;
import cn.zph.eshop.user.dao.UserDAO;
import cn.zph.eshop.user.dao.impl.UserDAOImpl;
import cn.zph.eshop.user.entity.User;
import cn.zph.eshop.user.service.UserService;
import java.util.List;
public class UserServiceImpl implements UserService {
@Override
public User login(User user) throws Exception {
UserDAO dao = new UserDAOImpl();
List<User> userList = dao.getEntityList();
if (userList != null) {
for (User user1 : userList) {
if (user1.getUsername().equals(user.getUsername()) && user1.getPassword().equals(user.getPassword())) {
return user1;//匹配成功返回用户对象
}
}
}
return null;//失败返回null
}
}
|
[
"[email protected]"
] | |
28c7de4248f6b83edfb4069802e834e17bb29b0f
|
0c9887a058c708667d432d530f7022d89880c838
|
/Exercise Files/Ch02/02_10/Enums/src/com/example/java/Main.java
|
467a23ae11a31d6e25aede509ff8fc33eca8c4f9
|
[] |
no_license
|
omairk82/LIL_Java_Essential_Training
|
ce989ec2a33576c8df6e0d9531a090de70c01770
|
934a8c62e352149933b16f7a83ea24065e91182a
|
refs/heads/main
| 2023-01-21T22:39:39.061611 | 2020-11-23T00:15:49 | 2020-11-23T00:15:49 | 315,158,685 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 688 |
java
|
package com.example.java;
import com.example.java.utilities.MathHelper;
public class Main {
public static void main(String[] args) {
MathHelper helper = new MathHelper(100);
try {
while (true) {
int input = helper.doMath("Enter a number: ", MathHelper.SUBTRACT);
int total = helper.getTotal();
String message = String.format(
"Entered: %d, total = %d", input, total
);
System.out.println(message);
}
} catch (NumberFormatException e) {
System.out.println("All done!");
}
}
}
|
[
"[email protected]"
] | |
74876d3bb8f2c24c9d937d5f61325a1826bc4885
|
14ada9056ba8fd2d5e49c232f19d962fc18a9a03
|
/Homework4/DequeStack.java
|
eab7a2a21fbcbb2294c7c3402bfe954924742bb1
|
[] |
no_license
|
prabhatbhootra/CPSC215
|
05859a6302653d86018e179c2ff1a0080081c11a
|
e0af5f0bd2faba7e9c240bf355b0c29f5278651a
|
refs/heads/master
| 2022-04-23T10:54:39.761153 | 2020-02-08T00:50:45 | 2020-02-08T00:50:45 | 239,047,877 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,163 |
java
|
/**
* A program to create a DequeStack.
* @author Prabhat Bhootra
* @version 1.0, 3/3/18
*/
public class DequeStack<E> implements Stack<E>{
Deque<E> deque = new ArrayDeque<E>();
/*
* returns the size of the DequeStack
* @return deque.size() the size of the DequeStack
*/
public int size(){
return deque.size();
}
/*
* returns whether or not the DequeStack is empty
* @return true if the DequeStack is empty, false otherwise
*/
public boolean isEmpty(){
return deque.isEmpty();
}
/*
* pushes an element to the DequeStack
* @param e the element of generic type to be pushed to the DequeStack
*/
public void push(E e){
deque.addLast(e);
}
/*
* returns last element of the DequeStack
* @return deque.last() the last element of the DequeStack of generic type
*/
public E top(){
return deque.last();
}
/*
* pops last element of the DequeStack
* @return deque.removeLast() the popped element of the DequeStack of generic type
*/
public E pop(){
return deque.removeLast();
}
}
|
[
"[email protected]"
] | |
397e29856ce938411cb33d8e28f03712d91f03cc
|
d79a26cc63352b33856133da17b6324bd56a37ea
|
/src/infinispan/sharpup/src/main/java/se/thematrix/dao/Dao.java
|
e91428671c822c282c86fb2b14ffd00d1796827e
|
[] |
no_license
|
liquid667/liquid-examples
|
63eb3f9c03e4760fb4c529b8bb330be420f18977
|
71a29a5d66fb5f384d5d01ceaef9e551494699ef
|
refs/heads/master
| 2021-01-10T00:53:46.450516 | 2011-06-20T05:48:46 | 2011-06-20T05:48:46 | 32,139,372 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 133 |
java
|
package se.thematrix.dao;
public interface Dao<K, E> {
void persist(E entity);
void remove(E entity);
E findById(K id);
}
|
[
"[email protected]@8ddf09ff-f88d-5742-63e9-b74fe226304b"
] |
[email protected]@8ddf09ff-f88d-5742-63e9-b74fe226304b
|
034fb702eefbca67d1ec564baafd4cdd99b23bd1
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/MarketBackend/src/com/newco/marketplace/business/businessImpl/buyerOutBoundNotification/BuyerOutBoundNotificationJMSServiceImpl.java
|
2907b246d73d1f33fe22dc7793b364e9fe0366b5
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256 | 2020-11-05T12:23:26 | 2020-11-05T12:23:26 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,878 |
java
|
package com.newco.marketplace.business.businessImpl.buyerOutBoundNotification;
import javax.jms.JMSException;
import javax.naming.NamingException;
import org.apache.log4j.Logger;
import com.newco.marketplace.business.businessImpl.buyerOutBoundNotification.mdb.BuyerJMSInvoker;
import com.newco.marketplace.buyeroutboundnotification.constatns.BuyerOutBoundConstants;
import com.newco.marketplace.buyeroutboundnotification.service.IBuyerOutBoundNotificationJMSService;
import com.newco.marketplace.buyeroutboundnotification.vo.BuyerOutboundFailOverVO;
import com.newco.marketplace.exception.core.BusinessServiceException;
//import EDU.oswego.cs.dl.util.concurrent.CountDown;
public class BuyerOutBoundNotificationJMSServiceImpl implements
IBuyerOutBoundNotificationJMSService {
// Create the logger
private static final Logger LOGGER = Logger
.getLogger(BuyerOutBoundNotificationJMSServiceImpl.class.getName());
private BuyerJMSInvoker invokeJMS;
//static CountDown done = new CountDown(1);
public BuyerJMSInvoker getInvokeJMS() {
return invokeJMS;
}
public void setInvokeJMS(BuyerJMSInvoker invokeJMS) {
this.invokeJMS = invokeJMS;
}
public void callJMSService(BuyerOutboundFailOverVO failoverVO) throws BusinessServiceException{
LOGGER.info("Calling the JMS webservice:: Adding ::");
// 5.call api -set a boolean true or false based on api response
// TODO : TO call the API - Put the message in the queue.
// Move the response processing part to the asynchronous process
// (queue).
try {
if(null!=failoverVO && null!=failoverVO.getXml() && null!=failoverVO.getSeqNO()){
invokeJMS.sendRecvAsync(failoverVO.getXml()+BuyerOutBoundConstants.SEPERATOR+failoverVO.getSoId());
//done.acquire();
//invokeJMS.stop();
}
}catch (Exception e ){
LOGGER.error("EXception ::"+e);
e.printStackTrace();
}
}
}
|
[
"[email protected]"
] | |
219d11d220080401c4a11cb7e38640801ca9eaf3
|
f9eb8ca84809f4d7636ec58c746a1f1b9108f0ca
|
/2.2.1. spring_hibernate/src/main/java/hiber/config/AppConfig.java
|
c9595434c1f1e6b18f2edff9d4d4f7e69ffb25d7
|
[] |
no_license
|
MichailMastanov/2.2.1
|
3d867ad2bfdeb09724240a32e65f74e3428473b7
|
536f6330c7af0b11ba8f53ce17dbd02b2c5647fc
|
refs/heads/main
| 2022-12-24T12:00:28.673218 | 2020-10-11T20:52:07 | 2020-10-11T20:52:07 | 303,210,306 | 1 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 2,235 |
java
|
package hiber.config;
import hiber.model.Car;
import hiber.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.hibernate5.HibernateTransactionManager;
import org.springframework.orm.hibernate5.LocalSessionFactoryBean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.sql.DataSource;
import java.util.Properties;
@Configuration
@PropertySource("classpath:db.properties")
@EnableTransactionManagement
@ComponentScan(value = "hiber")
public class AppConfig {
@Autowired
private Environment env;
@Bean
public DataSource getDataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(env.getProperty("db.driver"));
dataSource.setUrl(env.getProperty("db.url"));
dataSource.setUsername(env.getProperty("db.username"));
dataSource.setPassword(env.getProperty("db.password"));
return dataSource;
}
@Bean
public LocalSessionFactoryBean getSessionFactory() {
LocalSessionFactoryBean factoryBean = new LocalSessionFactoryBean();
factoryBean.setDataSource(getDataSource());
Properties props=new Properties();
props.put("hibernate.show_sql", env.getProperty("hibernate.show_sql"));
props.put("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
factoryBean.setHibernateProperties(props);
factoryBean.setAnnotatedClasses(User.class, Car.class);
return factoryBean;
}
@Bean
public HibernateTransactionManager getTransactionManager() {
HibernateTransactionManager transactionManager = new HibernateTransactionManager();
transactionManager.setSessionFactory(getSessionFactory().getObject());
return transactionManager;
}
}
|
[
"[email protected]"
] | |
d64e870a2eb3b0c39cec8adf5ada7cc018556821
|
3dd09f0f0100895e95b7b7e8b6ef006d751bd6fc
|
/super-devops-iam/super-devops-iam-security/src/main/java/com/wl4g/devops/iam/config/DefaultViewAutoConfiguration.java
|
3ade49276aa4a4f408499a7c910bdd9775308973
|
[
"Apache-2.0"
] |
permissive
|
yangxing19930210/super-devops
|
b6c72386abc4dfe8bc5a0f89c083d4588e98e790
|
647619fe94a3423cb6c503d39d25b851a39a5038
|
refs/heads/master
| 2020-09-05T14:46:41.853720 | 2019-11-02T11:07:40 | 2019-11-02T11:07:40 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,850 |
java
|
/*
* Copyright 2017 ~ 2025 the original author or authors. <[email protected], [email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.wl4g.devops.iam.config;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import java.lang.annotation.Annotation;
import static com.wl4g.devops.iam.common.config.AbstractIamProperties.*;
import com.wl4g.devops.common.config.AbstractOptionalControllerAutoConfiguration;
import com.wl4g.devops.iam.web.DefaultViewController;
/**
* Default view configuration
*
* @author Wangl.sir <[email protected]>
* @version v1.0 2019年1月8日
* @since
*/
@AutoConfigureAfter({ IamAutoConfiguration.class })
public class DefaultViewAutoConfiguration extends AbstractOptionalControllerAutoConfiguration {
@Bean
public DefaultViewController defaultViewController() {
return new DefaultViewController();
}
@Override
protected String getMappingPrefix() {
return DEFAULT_VIEW_BASE_URI;
}
@Bean
public PrefixHandlerMapping defaultViewControllerPrefixHandlerMapping() {
return super.createPrefixHandlerMapping();
}
@Override
protected Class<? extends Annotation> annotationClass() {
return com.wl4g.devops.iam.annotation.DefaultViewController.class;
}
}
|
[
"[email protected]"
] | |
e321f4bbd2637493a937e149d23e343b5daff8bd
|
9ebf08c0b6b12bf4d89149a3dccb25cf2ec78c9e
|
/SuChecker/app/src/test/java/fr/inria/rsommerard/suchecker/ExampleUnitTest.java
|
5775070ad1280506b42bf13b247aae3a0b3664f7
|
[] |
no_license
|
rsommerard/su-checker
|
a48e20303f751c81eed7e68949f3644f8888295e
|
8169a853f981bafc9edfd99c940e8339104aca99
|
refs/heads/master
| 2020-12-24T21:01:33.387630 | 2016-04-13T15:39:28 | 2016-04-13T15:39:28 | 56,163,949 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 322 |
java
|
package fr.inria.rsommerard.suchecker;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"[email protected]"
] | |
8d2b2fcef31749bd8b720c0bdd2a586a205d37e7
|
1c46542a8c8a6690788f052aa4c4d6c1d25a21d9
|
/src/main/java/com/eldorado/doctor/project/service/ScheduleService.java
|
a8ce626e0fa28015c0898c13a5e0ae3ade3d4e0b
|
[] |
no_license
|
raidymachadohub/core-medical-appointment
|
51b89e62c0cdce785fbb7523aeb8be879d11c714
|
896dc5085ced3592ea73d965e1e3fc2d15c2e990
|
refs/heads/master
| 2022-04-27T06:43:10.366837 | 2020-04-23T02:06:14 | 2020-04-23T02:06:14 | 257,718,685 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,422 |
java
|
package com.eldorado.doctor.project.service;
import com.eldorado.doctor.project.builder.ScheduleBuilder;
import com.eldorado.doctor.project.dto.ScheduleDto;
import com.eldorado.doctor.project.model.Schedule;
import com.eldorado.doctor.project.repository.ScheduleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class ScheduleService {
@Autowired
private ScheduleRepository scheduleRepository;
public List<ScheduleDto> findAll() {
return ScheduleBuilder.convert(this.scheduleRepository.findAll());
}
public ScheduleDto findById(Long id) {
return new ScheduleDto(this.scheduleRepository.findById(id).get());
}
public ScheduleDto save(ScheduleDto scheduleDto) {
Schedule schedule = ScheduleBuilder.convert(scheduleDto);
return new ScheduleDto(this.scheduleRepository.save((schedule)));
}
public ScheduleDto update(ScheduleDto scheduleDto, Long id) {
Schedule scheduleBase = this.scheduleRepository.getOne(id);
Schedule schedule = ScheduleBuilder.merge(scheduleBase, scheduleDto);
schedule.setDt_update(new Date());
return new ScheduleDto(this.scheduleRepository.save((schedule)));
}
public void delete(Long id) {
this.scheduleRepository.deleteById(id);
}
}
|
[
"[email protected]"
] | |
98f64f2138052d9c36b3c9df9b51fe5314b92345
|
e50930e7d1f02b7face5829750633364e34d9c25
|
/cloudalibaba-provider-payment2/src/main/java/ac/cn/saya/payment/provider/controller/PaymentController.java
|
ea0feb735df9d8474b31a5a17fe9cde2330b00e7
|
[
"Apache-2.0"
] |
permissive
|
saya-ac-cn/spring-cloud-alibaba-study
|
34da6a4fd041472cbe8ba057f638ea7a151c7fbb
|
1a1276d9a0f9faa809318c70586fc81683615e84
|
refs/heads/master
| 2021-07-12T14:22:37.550991 | 2021-05-08T13:24:05 | 2021-05-08T13:24:05 | 245,814,516 | 0 | 0 |
Apache-2.0
| 2020-03-08T12:58:15 | 2020-03-08T12:57:06 |
Java
|
UTF-8
|
Java
| false | false | 760 |
java
|
package ac.cn.saya.payment.provider.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
/**
* @Title: PaymentController
* @ProjectName spring-cloud-alibaba-study
* @Description: TODO
* @Author liunengkai
* @Date: 4/29/21 23:35
* @Description:
*/
@RestController
public class PaymentController
{
@Value("${server.port}")
private String serverPort;
@GetMapping(value = "/payment/nacos/{id}")
public String getPayment(@PathVariable("id") Integer id)
{
return "nacos registry, serverPort: "+ serverPort+"\t id"+id;
}
}
|
[
"[email protected]"
] | |
84ec881de8761a4df9522583a5f96550661c9751
|
c9c208ae3cd89ca3c3143f468da40a206f883c4a
|
/ProjectSRC/BMW_2018KIS/src/service/HWKDeleteProAction.java
|
10e883215838771696636c08881f26e1be64abf3
|
[] |
no_license
|
jyjung621/BMW
|
595afb7ceae2da064dac9a16e337a1d06e2112ec
|
cc77fb9b84df81f0bc728a8a600bf1bcd88b92e3
|
refs/heads/master
| 2020-03-31T07:38:53.063242 | 2019-03-05T05:39:54 | 2019-03-05T05:39:54 | 152,029,301 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 934 |
java
|
package service;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import dao.HWKMemberDao;
public class HWKDeleteProAction implements CommandProcess {
public String requestPro(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
try {
String id = request.getParameter("memberid");
String passwd = request.getParameter("passwd");
HttpSession session = request.getSession();
int result = 0;
if(id.equals(session.getAttribute("sessionId")) || passwd.equals(session.getAttribute("sessionpwd"))) {
HWKMemberDao md = HWKMemberDao.getInstance();
result = md.delete(id);
}
request.setAttribute("result", result);
}catch(Exception e) {
System.out.println(e.getMessage());
}
return "deletePro.jsp";
}
}
|
[
"[email protected]"
] | |
370fe111d14f27c2e01f1a069324bc22b692ec13
|
87747e6c71981ef3f20f00fa4b223c7e6840298b
|
/JPA_PRACTICE/src/main/java/com/sankar/tech/entity/MyEntity1.java
|
8ab101f52a3b204b51efff9fd23b901baa969dc8
|
[] |
no_license
|
sankarsai8686/JPA_REPOSITORY_MYSQL
|
7b032f2ebdad9ea533602750e3d5ee2180dfec37
|
583867e085cdb2d455bce3789bb8e84a61491b5c
|
refs/heads/main
| 2023-02-08T09:19:09.328585 | 2020-12-28T13:47:26 | 2020-12-28T13:47:26 | 320,457,185 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,244 |
java
|
package com.sankar.tech.entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
@Entity
public class MyEntity1 {
@Id
//@GeneratedValue(strategy = GenerationType.SEQUENCE)
//@GeneratedValue(strategy = GenerationType.TABLE)
//@GeneratedValue(strategy = GenerationType.AUTO)
//@GeneratedValue(strategy = GenerationType.IDENTITY)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="PRIVATE_SEQ")
@SequenceGenerator(name="PRIVATE_SEQ", sequenceName="private_sequence")
private int id;
private String name;
private String password;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public MyEntity1() {
super();
// TODO Auto-generated constructor stub
}
public MyEntity1(int id, String name, String password) {
super();
this.id = id;
this.name = name;
this.password = password;
}
}
|
[
"[email protected]"
] | |
de724813a0f871a38bfb4bc5cd53371dd48cfd53
|
daa044c99e2b7f47e665846b030a13af15cef33c
|
/src/geek/topinterview/DijkstraShortestPath.java
|
d5293b3cb91ba3e1d505004cbbeda0a6d5d99243
|
[] |
no_license
|
oojhal/mashq
|
6565d7467f475e8fe54e897b6f43ae5834646e83
|
496cbc27ba1210f325fefc2ad52c9ac0a215f777
|
refs/heads/master
| 2021-04-28T16:25:18.375504 | 2018-06-21T15:41:32 | 2018-06-21T15:41:32 | 122,013,360 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,765 |
java
|
package geek.topinterview;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.IntStream;
/**
* Created by ssiddiqu on 3/18/18.
* A weighted directed graph is provided. The weight of a an edge represents distance. Need to find the shortest
* weighted distance from a given node to all the other nodes.
* Graph is represented as int[][]
* Noes are numbered
*/
public class DijkstraShortestPath {
/**
* Finds the shortest path from src to all the other nodes in the graph.
* The return array int[] represents the shortest distance of each node from source.
* int[i] shortest distance from src to node i
* @param graph
* @param src
* @return
*/
/**
* done -> List of nodes for which shortest distance has been found. Initial value empty
* dist[] -> current minimum distance of node i from source node
* start by putting the distance of the source node as 0 in dist[]. All other values in dist[]
* will be Integer.MAX
* Start by choosing the node Nmin with minimum distance in dist[] so it starts with source node.
* Nmin is reachable from the source and it is reachable at minimum distance
* Chosen node Nmin to list of done nodes. Minimum distance from source node has already
* been found for it
* Now find all the other nodes that are reachable. Update their distances if less than current distance.
* So at all points, dist[] keeps track of the current minimum distance of a node reachable from source.
* The node with minimum value is the next closes to the source node
* This node can not be reachable from source through another shorter path as the shorter path must go through another node in
* the dist[] list. All these nodes have higher value ilel are at a larger distance from source already.
*
* @param graph
* @param src
* @return
*/
public static int[] findShortestPaths(int[][] graph, int src) {
//keep a list of nodes for which shortest path has already been found
Set<Integer> done = new HashSet<>();
// keep list of shortest paths.
// paths[i] stores the shortest distance from src to node i
int[] mindists = new int[graph.length];
IntStream.range(0,mindists.length).forEach((idx)-> mindists[idx]=Integer.MAX_VALUE);
Arrays.fill(mindists, Integer.MAX_VALUE);
// path to the first node is 0
mindists[src] = 0;
// go through all the nodes in the graph
// graph[i][j] represents the distance between node i and j
// find all nodes that are shortest distance from current node
while(done.size()!=graph.length) {
int nextNode = findShortestDistNode(mindists, done);
if(nextNode <0) {
break;
}
// mark this node as done
done.add(nextNode);
// find the minimum edge of the next node
updateNeighbourDists(graph, nextNode, mindists,done);
}
return mindists;
}
/**
* Updates the current minimum distance of a node 'i' in mindists if
* its current minimum distance in mindists[i] is greater than the current
* minimum distance of currNode i.e. mindists[currNode] + distance between currNode
* and node 'i' i.e. graph[currNode][i] if currNode and node 'i' are connected.
* This indicates that the shortest path to node 'i' via currNode is shorter than the
* previously calculated shortest path to node 'i'
* @param graph
* @param currNode
* @param mindists
*/
private static void updateNeighbourDists(int[][] graph, int currNode, int[] mindists, Set<Integer> done) {
// row represents current node
// column value represents distance to the node at column index
for(int i=0; i< graph[currNode].length; i++) {
// distance between source and currNode is mindists[currNode]
// current distance between source and node i is mindists[i]
// distance between currNode and i is graph[currNode][i]
int distCurrAndT = graph[currNode][i];
if(!done.contains(i) && distCurrAndT!=0 &&(mindists[i]> mindists[currNode]+distCurrAndT)) {
// update the minimum distance from source to node i
mindists[i] =mindists[currNode]+distCurrAndT;
}
}
}
/**
* Finds the node with smallest value in minDists that is not there in done yet
* @param minDists
* @param done
* @return
*/
private static int findShortestDistNode(int[] minDists, Set<Integer> done) {
int currMin = Integer.MAX_VALUE;
int nodeIndx = -1;
for(int i=0; i< minDists.length;i++) {
// if node is not done its distance is less than current min
if((!done.contains(i))&&(minDists[i]<= currMin)) {
nodeIndx=i;
currMin = minDists[i];
}
}
return nodeIndx;
}
private static void testFindShortestPaths() {
/* Let us create the example graph discussed above */
int graph[][] = new int[][]{{0, 4, 0, 0, 0, 0, 0, 8, 0},
{4, 0, 8, 0, 0, 0, 0, 11, 0},
{0, 8, 0, 7, 0, 4, 0, 0, 2},
{0, 0, 7, 0, 9, 14, 0, 0, 0},
{0, 0, 0, 9, 0, 10, 0, 0, 0},
{0, 0, 4, 14, 10, 0, 2, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 1, 6},
{8, 11, 0, 0, 0, 0, 1, 0, 7},
{0, 0, 2, 0, 0, 0, 6, 7, 0}
};
System.out.println(Arrays.toString(findShortestPaths(graph, 0)));
}
public static void main(String[] args) {
testFindShortestPaths();
}
}
|
[
"[email protected]"
] | |
d49e48f23444fc4844a391de319842544d697c80
|
8971f8a7dc524093fb7faae1537a292700f06f26
|
/src/com/javalec/ex/book_command/BDeleteCommand_book.java
|
5c435d8d17fd683d1128bf4139a41f8138b4ed3b
|
[] |
no_license
|
Googleok/OBF.DEV-Jsp-Hompage-
|
34099898582b5543e158cec3efd7a54027e25927
|
26c1971ceee7c9238e04fc6ababc9b31a27940af
|
refs/heads/master
| 2020-04-05T04:58:39.904476 | 2018-11-07T16:26:58 | 2018-11-07T16:26:58 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 503 |
java
|
package com.javalec.ex.book_command;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.javalec.ex.dao.BDao;
import com.javalec.ex.dao.BDao_Book;
public class BDeleteCommand_book implements BCommand_book {
@Override
public void execute(HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
String bId = request.getParameter("bId");
BDao_Book dao = new BDao_Book();
dao.delete(bId);
}
}
|
[
"[email protected]"
] | |
1aacd352e86fff3842412b95ab960aeda70cae17
|
9f73e59004893a8013440ff01dd568e636a81af9
|
/DAT100/Undervisning/undervisning/U17Unntak/src/no/hvl/dat100/feileksempler/IterasjonWhile.java
|
910ec6bb5263faa799751ba1cce293847355a6bc
|
[] |
no_license
|
realbiker1/HVL
|
62e5fdae28d15cb13e0bf957df2191f82f17b829
|
6a322d45ed3992b9acde10083fd6725796c35296
|
refs/heads/main
| 2023-09-05T21:38:32.539929 | 2021-11-01T19:44:30 | 2021-11-01T19:44:30 | 423,588,373 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 310 |
java
|
package no.hvl.dat100.feileksempler;
public class IterasjonWhile {
static public void main (String[] args) {
char[] tab = { 'd','a','t','1','0','0'};
// skriv alle tegn i tabellen ut et på en linje hver
int i = 0;
while (i<tab.length) {
System.out.println(tab[i] + " ");
}
}
}
|
[
"[email protected]"
] | |
b1b019ed65686d1fbaa7ddd607729d8fc2fc3d2f
|
e5753c537e2eb81333b86d0810aae8aa52e25fdf
|
/app/src/main/java/com/example/carlosgerman/lavendimia/Views/Fragments/ClientesFragment.java
|
bf33bd06762c4c168f35dfdab52d177eeb579d6d
|
[
"MIT"
] |
permissive
|
CarlosGeovannyGermanMillan/Tarea
|
59212013842e94472e6d360844be532fc6a31e72
|
2b706bc07d1d96d9d511dd8fd5d4e545ac897d46
|
refs/heads/master
| 2020-03-29T11:11:15.545564 | 2018-09-24T05:32:04 | 2018-09-24T05:32:04 | 149,840,166 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 5,522 |
java
|
package com.example.carlosgerman.lavendimia.Views.Fragments;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.carlosgerman.lavendimia.Aplication.preferences;
import com.example.carlosgerman.lavendimia.DataBase.StoreDB;
import com.example.carlosgerman.lavendimia.Modelos.Cliente;
import com.example.carlosgerman.lavendimia.R;
import com.example.carlosgerman.lavendimia.Utilerias.ItemClickSupport;
import com.example.carlosgerman.lavendimia.Views.Activities.NuevoClienteActivity;
import com.example.carlosgerman.lavendimia.Views.Adapters.clienteAdapter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class ClientesFragment extends Fragment {
private OnFragmentInteractionListener mListener;
public List<Cliente> listClientes;
private RecyclerView.Adapter ClientAdapter;
public ProgressDialog mDialog;
private RecyclerView.Adapter MyAdapter;
StoreDB db;
//@BindView(R.id.)
public @BindView(R.id.swipeRefreshLayout_Clientes) SwipeRefreshLayout mSwipeRefreshLayout;
@BindView(R.id.Fragment_rcv_Clientes)
RecyclerView cli;
public ClientesFragment() {
// Required empty public constructor
}
// TODO: Rename and change types and number of parameters
public static ClientesFragment newInstance(String param1, String param2) {
ClientesFragment fragment = new ClientesFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@OnClick(R.id.fragmentClientes_img_nuevo)
void click_nuevo() {
Intent intent = new Intent(getActivity(), NuevoClienteActivity.class);
startActivity(intent);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_clientes, container, false);
ButterKnife.bind(this,view);
db = new StoreDB(getActivity());
preferences.getInstance().Initialize(getActivity());
this.listClientes = new ArrayList<>();
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
cli.setHasFixedSize(true);
cli.setLayoutManager(layoutManager);
cargarClientes();
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
cargarClientes();
}
});
return view;
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
public void mostrarCargando(String title, String message) {
if (mDialog != null && mDialog.isShowing())
mDialog.dismiss();
mDialog = new ProgressDialog(getActivity(), R.style.Theme_MyDialog);
mDialog.setTitle(title);
mDialog.setMessage(message);
mDialog.setCancelable(true);
mDialog.setCanceledOnTouchOutside(true);
mDialog.show();
}
public void cargarClientes(){
mSwipeRefreshLayout.setRefreshing(false);
listClientes = db.GetAllClients();
if(listClientes.isEmpty()){
mSwipeRefreshLayout.setVisibility(View.GONE);
}else {
mSwipeRefreshLayout.setVisibility(View.VISIBLE);
MyAdapter = new clienteAdapter(listClientes);
cli.setAdapter(MyAdapter);
ItemClickSupport.addTo(cli).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
@Override
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
Cliente clie = listClientes.get(position);
Intent intent = new Intent(getActivity(), ClientesFragment.class);
intent.putExtra("Clave",clie.getPrimary());
intent.putExtra("Nombre",clie.getNombre());
intent.putExtra("ApellidoPaterno",clie.getApellidoPaterno());
intent.putExtra("ApellidoMaterno",clie.getApellidoMaterno());
intent.putExtra("RFC",clie.getRFC());
startActivity(intent);
}
});
}
}
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
@Override
public void onResume() {
super.onResume();
cargarClientes();
}
}
|
[
"[email protected]"
] | |
c5b856876651c0243cd91301acb8807dd19d41f8
|
f6f1d52a0e7c997f20f059e1b54b23cfb6ac599b
|
/hw05/test/src/edu/umb/cs680/hw05/CartTest.java
|
8988c9f9862f506eaeb7ecc689064f6238dd0fe5
|
[] |
no_license
|
ShagunVarma08/CS680
|
1d82e27d5d0e274f33873bcd4d2b78c7ec16de0b
|
38f7202cf6d6392a8e67ba67493a81da0cf81826
|
refs/heads/master
| 2023-03-11T14:09:21.352848 | 2021-03-01T20:20:48 | 2021-03-01T20:20:48 | 261,206,566 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 697 |
java
|
package edu.umb.cs680.hw05;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class CartTest {
private String[] carToStringArray(Car car) {
String[] carSpecifications = {
car.getMake(),
car.getModel(),
String.valueOf(car.getYear())
};
return carSpecifications;
}
@Test
public void verifyCarEqualityWithMakeModelYear() {
Car car1 = new Car("Toyota", "RAV4", 80, 2018, 90000);
Car car2 = new Car("Toyota", "RAV4", 70, 2018, 100000);
String[] expected = { "Toyota", "RAV4", "2018" };
assertArrayEquals(expected, carToStringArray(car1));
assertArrayEquals(expected, carToStringArray(car2));
}
}
|
[
"shagu@Sylvester"
] |
shagu@Sylvester
|
7931cccc3e8d0594529cf9899545924f133fd32d
|
3738c81b71483f6b7a03a9b9b0fe193229f5f1e4
|
/seleniumpro/src/seleniumpro/cookies.java
|
02f5afa45e56d46eac7f0d505059b7b61093f6c9
|
[] |
no_license
|
srujana111/SeleniumPro
|
5a354796ac453b3f846af36e8fba400a1cb8a5dd
|
324e8f518e9e1ce8767cc06991c6faa23a1acd3e
|
refs/heads/master
| 2020-06-08T06:42:30.849850 | 2019-06-22T01:55:37 | 2019-06-22T01:55:37 | 193,179,496 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,275 |
java
|
package seleniumpro;
import java.util.Set;
import org.openqa.selenium.Cookie;
import org.openqa.selenium.WebDriver;
public class cookies {
public static void main(String[] args) {
// TODO Auto-generated method stub
IntializeWebDriver id= new IntializeWebDriver();
WebDriver driver=id.getdriver("Chrome");
driver.get("https://www.walmart.com/");
Set<Cookie>allcookies=driver.manage().getCookies();
System.out.println(allcookies);
System.out.println(allcookies.size());
for(Cookie eachcookie : allcookies) {
System.out.println(driver.manage().getCookieNamed(eachcookie.getName()));
System.out.println("cookie Name :"+eachcookie.getName());
System.out.println("cookie Domain :"+eachcookie.getDomain());
System.out.println("cookie path :"+eachcookie.getPath());
System.out.println("cookie value :"+eachcookie.getValue());
System.out.println("cookie expiry :"+eachcookie.getExpiry());
if(eachcookie.getName().equals("s_vi")) {
driver.manage().deleteCookie(eachcookie);
}
}
driver.manage().deleteCookieNamed("xpa");
driver.manage().deleteAllCookies();
Set<Cookie> allCookiesAfterDelete=driver.manage().getCookies();
System.out.println(allCookiesAfterDelete.size());
}
}
|
[
"[email protected]"
] | |
94cf405f3542eeaaef07a85583a79f30729ba8c0
|
c4c769f6563eb4084521e334d74b6ad52b39a831
|
/desktop/src/com/gdx/engine/desktop/DesktopLauncher.java
|
2ee63d6ad5852ad0ac946dc1e800e5668202fa1d
|
[
"Apache-2.0"
] |
permissive
|
John-Dag/Engine490
|
17c253aa49a0c5d57e09c5dc1f77131258c2f838
|
a9fc85cc5ce76758f5e5e03aa1168a8f53bbed60
|
refs/heads/master
| 2021-06-10T17:51:19.173120 | 2021-03-16T20:34:33 | 2021-03-16T20:34:33 | 141,619,176 | 8 | 1 | null | null | null | null |
UTF-8
|
Java
| false | false | 1,022 |
java
|
package com.gdx.engine.desktop;
import java.lang.Thread.UncaughtExceptionHandler;
import lightning3d.Engine.Engine;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
public class DesktopLauncher {
public static void main (String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = "Lightning3D Demo";
//config.width = 800;
//config.height = 600;
config.width = 960;
config.height = 540;
config.vSyncEnabled = true;
config.foregroundFPS = 0;
config.backgroundFPS = 0;
config.resizable = false;
config.fullscreen = false;
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, final Throwable ex) {
System.err.println("Kryonet: Exception has occurred. Shutting down.");
ex.printStackTrace();
System.exit(0);
}
});
new LwjglApplication(new Engine(), config);
}
}
|
[
"[email protected]"
] | |
55064c4b1c9202b3d35b131c75ebbcfdfd7bd0e8
|
c3caaafbc8dfda82dc41913b8ee54559f0a98ba0
|
/clients/google-api-services-apigateway/v1/1.31.0/com/google/api/services/apigateway/v1/Apigateway.java
|
af64282a31180400beed19885a6c8e357b3cd91d
|
[
"Apache-2.0"
] |
permissive
|
detector268/google-api-java-client-services
|
621632ef90c09ff3fc98e64b8c429e29a2fc82b5
|
03b0eb65bd3ddb1c9b138bdaf0c37a5db1f0402b
|
refs/heads/master
| 2023-05-31T01:32:27.187358 | 2021-07-01T11:30:24 | 2021-07-01T11:30:24 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 216,755 |
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.apigateway.v1;
/**
* Service definition for Apigateway (v1).
*
* <p>
*
* </p>
*
* <p>
* For more information about this service, see the
* <a href="https://cloud.google.com/api-gateway/docs" target="_blank">API Documentation</a>
* </p>
*
* <p>
* This service uses {@link ApigatewayRequestInitializer} to initialize global parameters via its
* {@link Builder}.
* </p>
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class Apigateway extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {
// Note: Leave this static initializer at the top of the file.
static {
com.google.api.client.util.Preconditions.checkState(
com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 ||
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 &&
com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)),
"You are currently running with version %s of google-api-client. " +
"You need at least version 1.31.1 of google-api-client to run version " +
"1.31.5 of the API Gateway API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
}
/**
* The default encoded root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_ROOT_URL = "https://apigateway.googleapis.com/";
/**
* The default encoded mTLS root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.31
*/
public static final String DEFAULT_MTLS_ROOT_URL = "https://apigateway.mtls.googleapis.com/";
/**
* The default encoded service path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_SERVICE_PATH = "";
/**
* The default encoded batch path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.23
*/
public static final String DEFAULT_BATCH_PATH = "batch";
/**
* The default encoded base URL of the service. This is determined when the library is generated
* and normally should not be changed.
*/
public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;
/**
* Constructor.
*
* <p>
* Use {@link Builder} if you need to specify any of the optional parameters.
* </p>
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public Apigateway(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
this(new Builder(transport, jsonFactory, httpRequestInitializer));
}
/**
* @param builder builder
*/
Apigateway(Builder builder) {
super(builder);
}
@Override
protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
super.initialize(httpClientRequest);
}
/**
* An accessor for creating requests from the Projects collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Apigateway apigateway = new Apigateway(...);}
* {@code Apigateway.Projects.List request = apigateway.projects().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Projects projects() {
return new Projects();
}
/**
* The "projects" collection of methods.
*/
public class Projects {
/**
* An accessor for creating requests from the Locations collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Apigateway apigateway = new Apigateway(...);}
* {@code Apigateway.Locations.List request = apigateway.locations().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Locations locations() {
return new Locations();
}
/**
* The "locations" collection of methods.
*/
public class Locations {
/**
* Gets information about a location.
*
* Create a request for the method "locations.get".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Resource name for the location.
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayLocation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Gets information about a location.
*
* Create a request for the method "locations.get".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Resource name for the location.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayLocation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** Resource name for the location. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Resource name for the location.
*/
public java.lang.String getName() {
return name;
}
/** Resource name for the location. */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists information about the supported locations for this service.
*
* Create a request for the method "locations.list".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param name The resource that owns the locations collection, if applicable.
* @return the request
*/
public List list(java.lang.String name) throws java.io.IOException {
List result = new List(name);
initialize(result);
return result;
}
public class List extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayListLocationsResponse> {
private static final String REST_PATH = "v1/{+name}/locations";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists information about the supported locations for this service.
*
* Create a request for the method "locations.list".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name The resource that owns the locations collection, if applicable.
* @since 1.13
*/
protected List(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayListLocationsResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The resource that owns the locations collection, if applicable. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The resource that owns the locations collection, if applicable.
*/
public java.lang.String getName() {
return name;
}
/** The resource that owns the locations collection, if applicable. */
public List setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+$");
}
this.name = name;
return this;
}
/**
* A filter to narrow down results to a preferred subset. The filtering language accepts
* strings like "displayName=tokyo", and is documented in more detail in
* [AIP-160](https://google.aip.dev/160).
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** A filter to narrow down results to a preferred subset. The filtering language accepts strings like
"displayName=tokyo", and is documented in more detail in [AIP-160](https://google.aip.dev/160).
*/
public java.lang.String getFilter() {
return filter;
}
/**
* A filter to narrow down results to a preferred subset. The filtering language accepts
* strings like "displayName=tokyo", and is documented in more detail in
* [AIP-160](https://google.aip.dev/160).
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** The maximum number of results to return. If not set, the service selects a default. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return. If not set, the service selects a default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** The maximum number of results to return. If not set, the service selects a default. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token received from the `next_page_token` field in the response. Send that page
* token to receive the subsequent page.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token received from the `next_page_token` field in the response. Send that page token to
receive the subsequent page.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token received from the `next_page_token` field in the response. Send that page
* token to receive the subsequent page.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Apis collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Apigateway apigateway = new Apigateway(...);}
* {@code Apigateway.Apis.List request = apigateway.apis().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Apis apis() {
return new Apis();
}
/**
* The "apis" collection of methods.
*/
public class Apis {
/**
* Creates a new Api in a given project and location.
*
* Create a request for the method "apis.create".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource of the API, of the form: `projects/locations/global`
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApi}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.apigateway.v1.model.ApigatewayApi content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+parent}/apis";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Creates a new Api in a given project and location.
*
* Create a request for the method "apis.create".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* <p> {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param parent Required. Parent resource of the API, of the form: `projects/locations/global`
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApi}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.apigateway.v1.model.ApigatewayApi content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/** Required. Parent resource of the API, of the form: `projects/locations/global` */
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource of the API, of the form: `projects/locations/global`
*/
public java.lang.String getParent() {
return parent;
}
/** Required. Parent resource of the API, of the form: `projects/locations/global` */
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Identifier to assign to the API. Must be unique within scope of the parent
* resource.
*/
@com.google.api.client.util.Key
private java.lang.String apiId;
/** Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
*/
public java.lang.String getApiId() {
return apiId;
}
/**
* Required. Identifier to assign to the API. Must be unique within scope of the parent
* resource.
*/
public Create setApiId(java.lang.String apiId) {
this.apiId = apiId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a single Api.
*
* Create a request for the method "apis.delete".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the form: `projects/locations/global/apis`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Deletes a single Api.
*
* Create a request for the method "apis.delete".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* <p> {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the form: `projects/locations/global/apis`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(Apigateway.this, "DELETE", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** Required. Resource name of the form: `projects/locations/global/apis` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Resource name of the form: `projects/locations/global/apis`
*/
public java.lang.String getName() {
return name;
}
/** Required. Resource name of the form: `projects/locations/global/apis` */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets details of a single Api.
*
* Create a request for the method "apis.get".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the form: `projects/locations/global/apis`
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayApi> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Gets details of a single Api.
*
* Create a request for the method "apis.get".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the form: `projects/locations/global/apis`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayApi.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** Required. Resource name of the form: `projects/locations/global/apis` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Resource name of the form: `projects/locations/global/apis`
*/
public java.lang.String getName() {
return name;
}
/** Required. Resource name of the form: `projects/locations/global/apis` */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists and
* does not have a policy set.
*
* Create a request for the method "apis.getIamPolicy".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the operation documentation for
* the appropriate value for this field.
* @return the request
*/
public GetIamPolicy getIamPolicy(java.lang.String resource) throws java.io.IOException {
GetIamPolicy result = new GetIamPolicy(resource);
initialize(result);
return result;
}
public class GetIamPolicy extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayPolicy> {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* and does not have a policy set.
*
* Create a request for the method "apis.getIamPolicy".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation. <p> {@link
* GetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the operation documentation for
* the appropriate value for this field.
* @since 1.13
*/
protected GetIamPolicy(java.lang.String resource) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayPolicy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public GetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (GetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public GetIamPolicy setAccessToken(java.lang.String accessToken) {
return (GetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public GetIamPolicy setAlt(java.lang.String alt) {
return (GetIamPolicy) super.setAlt(alt);
}
@Override
public GetIamPolicy setCallback(java.lang.String callback) {
return (GetIamPolicy) super.setCallback(callback);
}
@Override
public GetIamPolicy setFields(java.lang.String fields) {
return (GetIamPolicy) super.setFields(fields);
}
@Override
public GetIamPolicy setKey(java.lang.String key) {
return (GetIamPolicy) super.setKey(key);
}
@Override
public GetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (GetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public GetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (GetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public GetIamPolicy setUploadType(java.lang.String uploadType) {
return (GetIamPolicy) super.setUploadType(uploadType);
}
@Override
public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (GetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being requested. See the operation
* documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being requested. See the operation documentation for
the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being requested. See the operation
* documentation for the appropriate value for this field.
*/
public GetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.resource = resource;
return this;
}
/**
* Optional. The policy format version to be returned. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies with any
* conditional bindings must specify version 3. Policies without any conditional bindings
* may specify any valid value or leave the field unset. To learn which resources support
* conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
@com.google.api.client.util.Key("options.requestedPolicyVersion")
private java.lang.Integer optionsRequestedPolicyVersion;
/** Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests
specifying an invalid value will be rejected. Requests for policies with any conditional bindings
must specify version 3. Policies without any conditional bindings may specify any valid value or
leave the field unset. To learn which resources support conditions in their IAM policies, see the
[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
public java.lang.Integer getOptionsRequestedPolicyVersion() {
return optionsRequestedPolicyVersion;
}
/**
* Optional. The policy format version to be returned. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies with any
* conditional bindings must specify version 3. Policies without any conditional bindings
* may specify any valid value or leave the field unset. To learn which resources support
* conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) {
this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion;
return this;
}
@Override
public GetIamPolicy set(String parameterName, Object value) {
return (GetIamPolicy) super.set(parameterName, value);
}
}
/**
* Lists Apis in a given project and location.
*
* Create a request for the method "apis.list".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource of the API, of the form: `projects/locations/global`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayListApisResponse> {
private static final String REST_PATH = "v1/{+parent}/apis";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Lists Apis in a given project and location.
*
* Create a request for the method "apis.list".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param parent Required. Parent resource of the API, of the form: `projects/locations/global`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayListApisResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** Required. Parent resource of the API, of the form: `projects/locations/global` */
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource of the API, of the form: `projects/locations/global`
*/
public java.lang.String getParent() {
return parent;
}
/** Required. Parent resource of the API, of the form: `projects/locations/global` */
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.parent = parent;
return this;
}
/** Filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** Filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Order by parameters. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Order by parameters.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Order by parameters. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/** Page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** Page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** Page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** Page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates the parameters of a single Api.
*
* Create a request for the method "apis.patch".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApi}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayApi content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Updates the parameters of a single Api.
*
* Create a request for the method "apis.patch".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* <p> {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApi}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayApi content) {
super(Apigateway.this, "PATCH", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. Resource name of the API. Format:
* projects/{project}/locations/global/apis/{api}
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. Resource name of the API. Format:
* projects/{project}/locations/global/apis/{api}
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.name = name;
return this;
}
/**
* Field mask is used to specify the fields to be overwritten in the Api resource by the
* update. The fields specified in the update_mask are relative to the resource, not the
* full request. A field will be overwritten if it is in the mask. If the user does not
* provide a mask then all fields will be overwritten.
*/
@com.google.api.client.util.Key
private String updateMask;
/** Field mask is used to specify the fields to be overwritten in the Api resource by the update. The
fields specified in the update_mask are relative to the resource, not the full request. A field
will be overwritten if it is in the mask. If the user does not provide a mask then all fields will
be overwritten.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* Field mask is used to specify the fields to be overwritten in the Api resource by the
* update. The fields specified in the update_mask are relative to the resource, not the
* full request. A field will be overwritten if it is in the mask. If the user does not
* provide a mask then all fields will be overwritten.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "apis.setIamPolicy".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the operation documentation for
* the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayPolicy> {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "apis.setIamPolicy".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation. <p> {@link
* SetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the operation documentation for
* the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayPolicy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (SetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public SetIamPolicy setAccessToken(java.lang.String accessToken) {
return (SetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public SetIamPolicy setAlt(java.lang.String alt) {
return (SetIamPolicy) super.setAlt(alt);
}
@Override
public SetIamPolicy setCallback(java.lang.String callback) {
return (SetIamPolicy) super.setCallback(callback);
}
@Override
public SetIamPolicy setFields(java.lang.String fields) {
return (SetIamPolicy) super.setFields(fields);
}
@Override
public SetIamPolicy setKey(java.lang.String key) {
return (SetIamPolicy) super.setKey(key);
}
@Override
public SetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (SetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public SetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (SetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public SetIamPolicy setUploadType(java.lang.String uploadType) {
return (SetIamPolicy) super.setUploadType(uploadType);
}
@Override
public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (SetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being specified. See the operation
* documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being specified. See the operation documentation for
the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being specified. See the operation
* documentation for the appropriate value for this field.
*/
public SetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public SetIamPolicy set(String parameterName, Object value) {
return (SetIamPolicy) super.set(parameterName, value);
}
}
/**
* Returns permissions that a caller has on the specified resource. If the resource does not exist,
* this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is
* designed to be used for building permission-aware UIs and command-line tools, not for
* authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "apis.testIamPermissions".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the operation
* documentation for the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsResponse> {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
* operation is designed to be used for building permission-aware UIs and command-line tools, not
* for authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "apis.testIamPermissions".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote
* operation. <p> {@link TestIamPermissions#initialize(com.google.api.client.googleapis.services.A
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the operation
* documentation for the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsResponse.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) {
return (TestIamPermissions) super.set$Xgafv($Xgafv);
}
@Override
public TestIamPermissions setAccessToken(java.lang.String accessToken) {
return (TestIamPermissions) super.setAccessToken(accessToken);
}
@Override
public TestIamPermissions setAlt(java.lang.String alt) {
return (TestIamPermissions) super.setAlt(alt);
}
@Override
public TestIamPermissions setCallback(java.lang.String callback) {
return (TestIamPermissions) super.setCallback(callback);
}
@Override
public TestIamPermissions setFields(java.lang.String fields) {
return (TestIamPermissions) super.setFields(fields);
}
@Override
public TestIamPermissions setKey(java.lang.String key) {
return (TestIamPermissions) super.setKey(key);
}
@Override
public TestIamPermissions setOauthToken(java.lang.String oauthToken) {
return (TestIamPermissions) super.setOauthToken(oauthToken);
}
@Override
public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (TestIamPermissions) super.setPrettyPrint(prettyPrint);
}
@Override
public TestIamPermissions setQuotaUser(java.lang.String quotaUser) {
return (TestIamPermissions) super.setQuotaUser(quotaUser);
}
@Override
public TestIamPermissions setUploadType(java.lang.String uploadType) {
return (TestIamPermissions) super.setUploadType(uploadType);
}
@Override
public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) {
return (TestIamPermissions) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy detail is being requested. See the operation
documentation for the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
*/
public TestIamPermissions setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public TestIamPermissions set(String parameterName, Object value) {
return (TestIamPermissions) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Configs collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Apigateway apigateway = new Apigateway(...);}
* {@code Apigateway.Configs.List request = apigateway.configs().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Configs configs() {
return new Configs();
}
/**
* The "configs" collection of methods.
*/
public class Configs {
/**
* Creates a new ApiConfig in a given project and location.
*
* Create a request for the method "configs.create".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource of the API Config, of the form: `projects/locations/global/apis`
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApiConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.apigateway.v1.model.ApigatewayApiConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+parent}/configs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Creates a new ApiConfig in a given project and location.
*
* Create a request for the method "configs.create".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* <p> {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param parent Required. Parent resource of the API Config, of the form: `projects/locations/global/apis`
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApiConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.apigateway.v1.model.ApigatewayApiConfig content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Parent resource of the API Config, of the form:
* `projects/locations/global/apis`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource of the API Config, of the form: `projects/locations/global/apis`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Parent resource of the API Config, of the form:
* `projects/locations/global/apis`
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Identifier to assign to the API Config. Must be unique within scope of the
* parent resource.
*/
@com.google.api.client.util.Key
private java.lang.String apiConfigId;
/** Required. Identifier to assign to the API Config. Must be unique within scope of the parent
resource.
*/
public java.lang.String getApiConfigId() {
return apiConfigId;
}
/**
* Required. Identifier to assign to the API Config. Must be unique within scope of the
* parent resource.
*/
public Create setApiConfigId(java.lang.String apiConfigId) {
this.apiConfigId = apiConfigId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a single ApiConfig.
*
* Create a request for the method "configs.delete".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the form: `projects/locations/global/apis/configs`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
/**
* Deletes a single ApiConfig.
*
* Create a request for the method "configs.delete".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* <p> {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the form: `projects/locations/global/apis/configs`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(Apigateway.this, "DELETE", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** Required. Resource name of the form: `projects/locations/global/apis/configs` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Resource name of the form: `projects/locations/global/apis/configs`
*/
public java.lang.String getName() {
return name;
}
/** Required. Resource name of the form: `projects/locations/global/apis/configs` */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets details of a single ApiConfig.
*
* Create a request for the method "configs.get".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the form: `projects/locations/global/apis/configs`
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayApiConfig> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
/**
* Gets details of a single ApiConfig.
*
* Create a request for the method "configs.get".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the form: `projects/locations/global/apis/configs`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayApiConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** Required. Resource name of the form: `projects/locations/global/apis/configs` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Resource name of the form: `projects/locations/global/apis/configs`
*/
public java.lang.String getName() {
return name;
}
/** Required. Resource name of the form: `projects/locations/global/apis/configs` */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
this.name = name;
return this;
}
/**
* Specifies which fields of the API Config are returned in the response. Defaults to
* `BASIC` view.
*/
@com.google.api.client.util.Key
private java.lang.String view;
/** Specifies which fields of the API Config are returned in the response. Defaults to `BASIC` view.
*/
public java.lang.String getView() {
return view;
}
/**
* Specifies which fields of the API Config are returned in the response. Defaults to
* `BASIC` view.
*/
public Get setView(java.lang.String view) {
this.view = view;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists and
* does not have a policy set.
*
* Create a request for the method "configs.getIamPolicy".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the operation documentation for
* the appropriate value for this field.
* @return the request
*/
public GetIamPolicy getIamPolicy(java.lang.String resource) throws java.io.IOException {
GetIamPolicy result = new GetIamPolicy(resource);
initialize(result);
return result;
}
public class GetIamPolicy extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayPolicy> {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* and does not have a policy set.
*
* Create a request for the method "configs.getIamPolicy".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation. <p> {@link
* GetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the operation documentation for
* the appropriate value for this field.
* @since 1.13
*/
protected GetIamPolicy(java.lang.String resource) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayPolicy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public GetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (GetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public GetIamPolicy setAccessToken(java.lang.String accessToken) {
return (GetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public GetIamPolicy setAlt(java.lang.String alt) {
return (GetIamPolicy) super.setAlt(alt);
}
@Override
public GetIamPolicy setCallback(java.lang.String callback) {
return (GetIamPolicy) super.setCallback(callback);
}
@Override
public GetIamPolicy setFields(java.lang.String fields) {
return (GetIamPolicy) super.setFields(fields);
}
@Override
public GetIamPolicy setKey(java.lang.String key) {
return (GetIamPolicy) super.setKey(key);
}
@Override
public GetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (GetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public GetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (GetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public GetIamPolicy setUploadType(java.lang.String uploadType) {
return (GetIamPolicy) super.setUploadType(uploadType);
}
@Override
public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (GetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being requested. See the operation
* documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being requested. See the operation documentation for
the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being requested. See the operation
* documentation for the appropriate value for this field.
*/
public GetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
this.resource = resource;
return this;
}
/**
* Optional. The policy format version to be returned. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies with any
* conditional bindings must specify version 3. Policies without any conditional
* bindings may specify any valid value or leave the field unset. To learn which
* resources support conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
@com.google.api.client.util.Key("options.requestedPolicyVersion")
private java.lang.Integer optionsRequestedPolicyVersion;
/** Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests
specifying an invalid value will be rejected. Requests for policies with any conditional bindings
must specify version 3. Policies without any conditional bindings may specify any valid value or
leave the field unset. To learn which resources support conditions in their IAM policies, see the
[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
public java.lang.Integer getOptionsRequestedPolicyVersion() {
return optionsRequestedPolicyVersion;
}
/**
* Optional. The policy format version to be returned. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies with any
* conditional bindings must specify version 3. Policies without any conditional
* bindings may specify any valid value or leave the field unset. To learn which
* resources support conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) {
this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion;
return this;
}
@Override
public GetIamPolicy set(String parameterName, Object value) {
return (GetIamPolicy) super.set(parameterName, value);
}
}
/**
* Lists ApiConfigs in a given project and location.
*
* Create a request for the method "configs.list".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource of the API Config, of the form: `projects/locations/global/apis`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayListApiConfigsResponse> {
private static final String REST_PATH = "v1/{+parent}/configs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
/**
* Lists ApiConfigs in a given project and location.
*
* Create a request for the method "configs.list".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param parent Required. Parent resource of the API Config, of the form: `projects/locations/global/apis`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayListApiConfigsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Parent resource of the API Config, of the form:
* `projects/locations/global/apis`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource of the API Config, of the form: `projects/locations/global/apis`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Parent resource of the API Config, of the form:
* `projects/locations/global/apis`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+$");
}
this.parent = parent;
return this;
}
/** Filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** Filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Order by parameters. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Order by parameters.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Order by parameters. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/** Page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** Page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** Page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** Page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates the parameters of a single ApiConfig.
*
* Create a request for the method "configs.patch".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. Resource name of the API Config. Format:
* projects/{project}/locations/global/apis/{api}/configs/{api_config}
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApiConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayApiConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
/**
* Updates the parameters of a single ApiConfig.
*
* Create a request for the method "configs.patch".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* <p> {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Output only. Resource name of the API Config. Format:
* projects/{project}/locations/global/apis/{api}/configs/{api_config}
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayApiConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayApiConfig content) {
super(Apigateway.this, "PATCH", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. Resource name of the API Config. Format:
* projects/{project}/locations/global/apis/{api}/configs/{api_config}
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. Resource name of the API Config. Format:
projects/{project}/locations/global/apis/{api}/configs/{api_config}
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. Resource name of the API Config. Format:
* projects/{project}/locations/global/apis/{api}/configs/{api_config}
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
this.name = name;
return this;
}
/**
* Field mask is used to specify the fields to be overwritten in the ApiConfig resource
* by the update. The fields specified in the update_mask are relative to the resource,
* not the full request. A field will be overwritten if it is in the mask. If the user
* does not provide a mask then all fields will be overwritten.
*/
@com.google.api.client.util.Key
private String updateMask;
/** Field mask is used to specify the fields to be overwritten in the ApiConfig resource by the update.
The fields specified in the update_mask are relative to the resource, not the full request. A field
will be overwritten if it is in the mask. If the user does not provide a mask then all fields will
be overwritten.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* Field mask is used to specify the fields to be overwritten in the ApiConfig resource
* by the update. The fields specified in the update_mask are relative to the resource,
* not the full request. A field will be overwritten if it is in the mask. If the user
* does not provide a mask then all fields will be overwritten.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "configs.setIamPolicy".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the operation documentation for
* the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayPolicy> {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "configs.setIamPolicy".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation. <p> {@link
* SetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the operation documentation for
* the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayPolicy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
}
@Override
public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (SetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public SetIamPolicy setAccessToken(java.lang.String accessToken) {
return (SetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public SetIamPolicy setAlt(java.lang.String alt) {
return (SetIamPolicy) super.setAlt(alt);
}
@Override
public SetIamPolicy setCallback(java.lang.String callback) {
return (SetIamPolicy) super.setCallback(callback);
}
@Override
public SetIamPolicy setFields(java.lang.String fields) {
return (SetIamPolicy) super.setFields(fields);
}
@Override
public SetIamPolicy setKey(java.lang.String key) {
return (SetIamPolicy) super.setKey(key);
}
@Override
public SetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (SetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public SetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (SetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public SetIamPolicy setUploadType(java.lang.String uploadType) {
return (SetIamPolicy) super.setUploadType(uploadType);
}
@Override
public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (SetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being specified. See the operation
* documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being specified. See the operation documentation for
the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being specified. See the operation
* documentation for the appropriate value for this field.
*/
public SetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public SetIamPolicy set(String parameterName, Object value) {
return (SetIamPolicy) super.set(parameterName, value);
}
}
/**
* Returns permissions that a caller has on the specified resource. If the resource does not exist,
* this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is
* designed to be used for building permission-aware UIs and command-line tools, not for
* authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "configs.testIamPermissions".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the operation
* documentation for the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsResponse> {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
* operation is designed to be used for building permission-aware UIs and command-line tools, not
* for authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "configs.testIamPermissions".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote
* operation. <p> {@link TestIamPermissions#initialize(com.google.api.client.googleapis.services.A
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the operation
* documentation for the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsResponse.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
}
@Override
public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) {
return (TestIamPermissions) super.set$Xgafv($Xgafv);
}
@Override
public TestIamPermissions setAccessToken(java.lang.String accessToken) {
return (TestIamPermissions) super.setAccessToken(accessToken);
}
@Override
public TestIamPermissions setAlt(java.lang.String alt) {
return (TestIamPermissions) super.setAlt(alt);
}
@Override
public TestIamPermissions setCallback(java.lang.String callback) {
return (TestIamPermissions) super.setCallback(callback);
}
@Override
public TestIamPermissions setFields(java.lang.String fields) {
return (TestIamPermissions) super.setFields(fields);
}
@Override
public TestIamPermissions setKey(java.lang.String key) {
return (TestIamPermissions) super.setKey(key);
}
@Override
public TestIamPermissions setOauthToken(java.lang.String oauthToken) {
return (TestIamPermissions) super.setOauthToken(oauthToken);
}
@Override
public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (TestIamPermissions) super.setPrettyPrint(prettyPrint);
}
@Override
public TestIamPermissions setQuotaUser(java.lang.String quotaUser) {
return (TestIamPermissions) super.setQuotaUser(quotaUser);
}
@Override
public TestIamPermissions setUploadType(java.lang.String uploadType) {
return (TestIamPermissions) super.setUploadType(uploadType);
}
@Override
public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) {
return (TestIamPermissions) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy detail is being requested. See the operation
documentation for the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
*/
public TestIamPermissions setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/apis/[^/]+/configs/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public TestIamPermissions set(String parameterName, Object value) {
return (TestIamPermissions) super.set(parameterName, value);
}
}
}
}
/**
* An accessor for creating requests from the Gateways collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Apigateway apigateway = new Apigateway(...);}
* {@code Apigateway.Gateways.List request = apigateway.gateways().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Gateways gateways() {
return new Gateways();
}
/**
* The "gateways" collection of methods.
*/
public class Gateways {
/**
* Creates a new Gateway in a given project and location.
*
* Create a request for the method "gateways.create".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource of the Gateway, of the form: `projects/locations`
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayGateway}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.apigateway.v1.model.ApigatewayGateway content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+parent}/gateways";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Creates a new Gateway in a given project and location.
*
* Create a request for the method "gateways.create".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* <p> {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param parent Required. Parent resource of the Gateway, of the form: `projects/locations`
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayGateway}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.apigateway.v1.model.ApigatewayGateway content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/** Required. Parent resource of the Gateway, of the form: `projects/locations` */
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource of the Gateway, of the form: `projects/locations`
*/
public java.lang.String getParent() {
return parent;
}
/** Required. Parent resource of the Gateway, of the form: `projects/locations` */
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Identifier to assign to the Gateway. Must be unique within scope of the
* parent resource.
*/
@com.google.api.client.util.Key
private java.lang.String gatewayId;
/** Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource.
*/
public java.lang.String getGatewayId() {
return gatewayId;
}
/**
* Required. Identifier to assign to the Gateway. Must be unique within scope of the
* parent resource.
*/
public Create setGatewayId(java.lang.String gatewayId) {
this.gatewayId = gatewayId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a single Gateway.
*
* Create a request for the method "gateways.delete".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the form: `projects/locations/gateways`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
/**
* Deletes a single Gateway.
*
* Create a request for the method "gateways.delete".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* <p> {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the form: `projects/locations/gateways`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(Apigateway.this, "DELETE", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** Required. Resource name of the form: `projects/locations/gateways` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Resource name of the form: `projects/locations/gateways`
*/
public java.lang.String getName() {
return name;
}
/** Required. Resource name of the form: `projects/locations/gateways` */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets details of a single Gateway.
*
* Create a request for the method "gateways.get".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the form: `projects/locations/gateways`
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayGateway> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
/**
* Gets details of a single Gateway.
*
* Create a request for the method "gateways.get".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the form: `projects/locations/gateways`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayGateway.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** Required. Resource name of the form: `projects/locations/gateways` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Resource name of the form: `projects/locations/gateways`
*/
public java.lang.String getName() {
return name;
}
/** Required. Resource name of the form: `projects/locations/gateways` */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists and
* does not have a policy set.
*
* Create a request for the method "gateways.getIamPolicy".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the operation documentation for
* the appropriate value for this field.
* @return the request
*/
public GetIamPolicy getIamPolicy(java.lang.String resource) throws java.io.IOException {
GetIamPolicy result = new GetIamPolicy(resource);
initialize(result);
return result;
}
public class GetIamPolicy extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayPolicy> {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* and does not have a policy set.
*
* Create a request for the method "gateways.getIamPolicy".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation. <p> {@link
* GetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the operation documentation for
* the appropriate value for this field.
* @since 1.13
*/
protected GetIamPolicy(java.lang.String resource) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayPolicy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public GetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (GetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public GetIamPolicy setAccessToken(java.lang.String accessToken) {
return (GetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public GetIamPolicy setAlt(java.lang.String alt) {
return (GetIamPolicy) super.setAlt(alt);
}
@Override
public GetIamPolicy setCallback(java.lang.String callback) {
return (GetIamPolicy) super.setCallback(callback);
}
@Override
public GetIamPolicy setFields(java.lang.String fields) {
return (GetIamPolicy) super.setFields(fields);
}
@Override
public GetIamPolicy setKey(java.lang.String key) {
return (GetIamPolicy) super.setKey(key);
}
@Override
public GetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (GetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public GetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (GetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public GetIamPolicy setUploadType(java.lang.String uploadType) {
return (GetIamPolicy) super.setUploadType(uploadType);
}
@Override
public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (GetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being requested. See the operation
* documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being requested. See the operation documentation for
the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being requested. See the operation
* documentation for the appropriate value for this field.
*/
public GetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
this.resource = resource;
return this;
}
/**
* Optional. The policy format version to be returned. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies with any
* conditional bindings must specify version 3. Policies without any conditional bindings
* may specify any valid value or leave the field unset. To learn which resources support
* conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
@com.google.api.client.util.Key("options.requestedPolicyVersion")
private java.lang.Integer optionsRequestedPolicyVersion;
/** Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests
specifying an invalid value will be rejected. Requests for policies with any conditional bindings
must specify version 3. Policies without any conditional bindings may specify any valid value or
leave the field unset. To learn which resources support conditions in their IAM policies, see the
[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
public java.lang.Integer getOptionsRequestedPolicyVersion() {
return optionsRequestedPolicyVersion;
}
/**
* Optional. The policy format version to be returned. Valid values are 0, 1, and 3.
* Requests specifying an invalid value will be rejected. Requests for policies with any
* conditional bindings must specify version 3. Policies without any conditional bindings
* may specify any valid value or leave the field unset. To learn which resources support
* conditions in their IAM policies, see the [IAM
* documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) {
this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion;
return this;
}
@Override
public GetIamPolicy set(String parameterName, Object value) {
return (GetIamPolicy) super.set(parameterName, value);
}
}
/**
* Lists Gateways in a given project and location.
*
* Create a request for the method "gateways.list".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource of the Gateway, of the form: `projects/locations`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayListGatewaysResponse> {
private static final String REST_PATH = "v1/{+parent}/gateways";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Lists Gateways in a given project and location.
*
* Create a request for the method "gateways.list".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param parent Required. Parent resource of the Gateway, of the form: `projects/locations`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayListGatewaysResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** Required. Parent resource of the Gateway, of the form: `projects/locations` */
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource of the Gateway, of the form: `projects/locations`
*/
public java.lang.String getParent() {
return parent;
}
/** Required. Parent resource of the Gateway, of the form: `projects/locations` */
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.parent = parent;
return this;
}
/** Filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** Filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Order by parameters. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Order by parameters.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Order by parameters. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/** Page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** Page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** Page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** Page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates the parameters of a single Gateway.
*
* Create a request for the method "gateways.patch".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. Resource name of the Gateway. Format:
* projects/{project}/locations/{location}/gateways/{gateway}
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayGateway}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayGateway content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
/**
* Updates the parameters of a single Gateway.
*
* Create a request for the method "gateways.patch".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* <p> {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Output only. Resource name of the Gateway. Format:
* projects/{project}/locations/{location}/gateways/{gateway}
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayGateway}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayGateway content) {
super(Apigateway.this, "PATCH", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. Resource name of the Gateway. Format:
* projects/{project}/locations/{location}/gateways/{gateway}
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. Resource name of the Gateway. Format:
projects/{project}/locations/{location}/gateways/{gateway}
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. Resource name of the Gateway. Format:
* projects/{project}/locations/{location}/gateways/{gateway}
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
this.name = name;
return this;
}
/**
* Field mask is used to specify the fields to be overwritten in the Gateway resource by
* the update. The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the user does
* not provide a mask then all fields will be overwritten.
*/
@com.google.api.client.util.Key
private String updateMask;
/** Field mask is used to specify the fields to be overwritten in the Gateway resource by the update.
The fields specified in the update_mask are relative to the resource, not the full request. A field
will be overwritten if it is in the mask. If the user does not provide a mask then all fields will
be overwritten.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* Field mask is used to specify the fields to be overwritten in the Gateway resource by
* the update. The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the user does
* not provide a mask then all fields will be overwritten.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "gateways.setIamPolicy".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the operation documentation for
* the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayPolicy> {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "gateways.setIamPolicy".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation. <p> {@link
* SetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the operation documentation for
* the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewaySetIamPolicyRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayPolicy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
}
@Override
public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (SetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public SetIamPolicy setAccessToken(java.lang.String accessToken) {
return (SetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public SetIamPolicy setAlt(java.lang.String alt) {
return (SetIamPolicy) super.setAlt(alt);
}
@Override
public SetIamPolicy setCallback(java.lang.String callback) {
return (SetIamPolicy) super.setCallback(callback);
}
@Override
public SetIamPolicy setFields(java.lang.String fields) {
return (SetIamPolicy) super.setFields(fields);
}
@Override
public SetIamPolicy setKey(java.lang.String key) {
return (SetIamPolicy) super.setKey(key);
}
@Override
public SetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (SetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public SetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (SetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public SetIamPolicy setUploadType(java.lang.String uploadType) {
return (SetIamPolicy) super.setUploadType(uploadType);
}
@Override
public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (SetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being specified. See the operation
* documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being specified. See the operation documentation for
the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being specified. See the operation
* documentation for the appropriate value for this field.
*/
public SetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public SetIamPolicy set(String parameterName, Object value) {
return (SetIamPolicy) super.set(parameterName, value);
}
}
/**
* Returns permissions that a caller has on the specified resource. If the resource does not exist,
* this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is
* designed to be used for building permission-aware UIs and command-line tools, not for
* authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "gateways.testIamPermissions".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the operation
* documentation for the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsResponse> {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
* operation is designed to be used for building permission-aware UIs and command-line tools, not
* for authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "gateways.testIamPermissions".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote
* operation. <p> {@link TestIamPermissions#initialize(com.google.api.client.googleapis.services.A
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor. </p>
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the operation
* documentation for the appropriate value for this field.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.ApigatewayTestIamPermissionsResponse.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
}
@Override
public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) {
return (TestIamPermissions) super.set$Xgafv($Xgafv);
}
@Override
public TestIamPermissions setAccessToken(java.lang.String accessToken) {
return (TestIamPermissions) super.setAccessToken(accessToken);
}
@Override
public TestIamPermissions setAlt(java.lang.String alt) {
return (TestIamPermissions) super.setAlt(alt);
}
@Override
public TestIamPermissions setCallback(java.lang.String callback) {
return (TestIamPermissions) super.setCallback(callback);
}
@Override
public TestIamPermissions setFields(java.lang.String fields) {
return (TestIamPermissions) super.setFields(fields);
}
@Override
public TestIamPermissions setKey(java.lang.String key) {
return (TestIamPermissions) super.setKey(key);
}
@Override
public TestIamPermissions setOauthToken(java.lang.String oauthToken) {
return (TestIamPermissions) super.setOauthToken(oauthToken);
}
@Override
public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (TestIamPermissions) super.setPrettyPrint(prettyPrint);
}
@Override
public TestIamPermissions setQuotaUser(java.lang.String quotaUser) {
return (TestIamPermissions) super.setQuotaUser(quotaUser);
}
@Override
public TestIamPermissions setUploadType(java.lang.String uploadType) {
return (TestIamPermissions) super.setUploadType(uploadType);
}
@Override
public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) {
return (TestIamPermissions) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy detail is being requested. See the operation
documentation for the appropriate value for this field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
*/
public TestIamPermissions setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/gateways/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public TestIamPermissions set(String parameterName, Object value) {
return (TestIamPermissions) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Operations collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Apigateway apigateway = new Apigateway(...);}
* {@code Apigateway.Operations.List request = apigateway.operations().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Operations operations() {
return new Operations();
}
/**
* The "operations" collection of methods.
*/
public class Operations {
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
* methods to check whether the cancellation succeeded or whether the operation completed despite
* cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
* operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
* `Code.CANCELLED`.
*
* Create a request for the method "operations.cancel".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be cancelled.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayCancelOperationRequest}
* @return the request
*/
public Cancel cancel(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayCancelOperationRequest content) throws java.io.IOException {
Cancel result = new Cancel(name, content);
initialize(result);
return result;
}
public class Cancel extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.Empty> {
private static final String REST_PATH = "v1/{+name}:cancel";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
* methods to check whether the cancellation succeeded or whether the operation completed despite
* cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
* operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
* `Code.CANCELLED`.
*
* Create a request for the method "operations.cancel".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
* <p> {@link
* Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name The name of the operation resource to be cancelled.
* @param content the {@link com.google.api.services.apigateway.v1.model.ApigatewayCancelOperationRequest}
* @since 1.13
*/
protected Cancel(java.lang.String name, com.google.api.services.apigateway.v1.model.ApigatewayCancelOperationRequest content) {
super(Apigateway.this, "POST", REST_PATH, content, com.google.api.services.apigateway.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
}
@Override
public Cancel set$Xgafv(java.lang.String $Xgafv) {
return (Cancel) super.set$Xgafv($Xgafv);
}
@Override
public Cancel setAccessToken(java.lang.String accessToken) {
return (Cancel) super.setAccessToken(accessToken);
}
@Override
public Cancel setAlt(java.lang.String alt) {
return (Cancel) super.setAlt(alt);
}
@Override
public Cancel setCallback(java.lang.String callback) {
return (Cancel) super.setCallback(callback);
}
@Override
public Cancel setFields(java.lang.String fields) {
return (Cancel) super.setFields(fields);
}
@Override
public Cancel setKey(java.lang.String key) {
return (Cancel) super.setKey(key);
}
@Override
public Cancel setOauthToken(java.lang.String oauthToken) {
return (Cancel) super.setOauthToken(oauthToken);
}
@Override
public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Cancel) super.setPrettyPrint(prettyPrint);
}
@Override
public Cancel setQuotaUser(java.lang.String quotaUser) {
return (Cancel) super.setQuotaUser(quotaUser);
}
@Override
public Cancel setUploadType(java.lang.String uploadType) {
return (Cancel) super.setUploadType(uploadType);
}
@Override
public Cancel setUploadProtocol(java.lang.String uploadProtocol) {
return (Cancel) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be cancelled. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be cancelled.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be cancelled. */
public Cancel setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Cancel set(String parameterName, Object value) {
return (Cancel) super.set(parameterName, value);
}
}
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
* method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "operations.delete".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be deleted.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.Empty> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
* method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "operations.delete".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* <p> {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name The name of the operation resource to be deleted.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(Apigateway.this, "DELETE", REST_PATH, null, com.google.api.services.apigateway.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be deleted. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be deleted.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be deleted. */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "operations.get".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource.
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayOperation> {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "operations.get".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation. <p>
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name The name of the operation resource.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayOperation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource. */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override
* the binding to use different resource name schemes, such as `users/operations`. To override the
* binding, API services can add a binding such as `"/v1/{name=users}/operations"` to their service
* configuration. For backwards compatibility, the default name includes the operations collection
* id, however overriding users must ensure the name binding is the parent resource, without the
* operations collection id.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the apigateway server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param name The name of the operation's parent resource.
* @return the request
*/
public List list(java.lang.String name) throws java.io.IOException {
List result = new List(name);
initialize(result);
return result;
}
public class List extends ApigatewayRequest<com.google.api.services.apigateway.v1.model.ApigatewayListOperationsResponse> {
private static final String REST_PATH = "v1/{+name}/operations";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
* override the binding to use different resource name schemes, such as `users/operations`. To
* override the binding, API services can add a binding such as `"/v1/{name=users}/operations"` to
* their service configuration. For backwards compatibility, the default name includes the
* operations collection id, however overriding users must ensure the name binding is the parent
* resource, without the operations collection id.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the the apigateway server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name The name of the operation's parent resource.
* @since 1.13
*/
protected List(java.lang.String name) {
super(Apigateway.this, "GET", REST_PATH, null, com.google.api.services.apigateway.v1.model.ApigatewayListOperationsResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation's parent resource. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation's parent resource.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation's parent resource. */
public List setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.name = name;
return this;
}
/** The standard list filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** The standard list filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** The standard list filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** The standard list page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The standard list page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** The standard list page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The standard list page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The standard list page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The standard list page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
}
}
/**
* Builder for {@link Apigateway}.
*
* <p>
* Implementation is not thread-safe.
* </p>
*
* @since 1.3.0
*/
public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {
private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) {
// If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint.
// If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS.
// Use the regular endpoint for all other cases.
String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT");
useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint;
if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) {
return DEFAULT_MTLS_ROOT_URL;
}
return DEFAULT_ROOT_URL;
}
/**
* Returns an instance of a new builder.
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
super(
transport,
jsonFactory,
Builder.chooseEndpoint(transport),
DEFAULT_SERVICE_PATH,
httpRequestInitializer,
false);
setBatchPath(DEFAULT_BATCH_PATH);
}
/** Builds a new instance of {@link Apigateway}. */
@Override
public Apigateway build() {
return new Apigateway(this);
}
@Override
public Builder setRootUrl(String rootUrl) {
return (Builder) super.setRootUrl(rootUrl);
}
@Override
public Builder setServicePath(String servicePath) {
return (Builder) super.setServicePath(servicePath);
}
@Override
public Builder setBatchPath(String batchPath) {
return (Builder) super.setBatchPath(batchPath);
}
@Override
public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
}
@Override
public Builder setApplicationName(String applicationName) {
return (Builder) super.setApplicationName(applicationName);
}
@Override
public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
}
@Override
public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
}
@Override
public Builder setSuppressAllChecks(boolean suppressAllChecks) {
return (Builder) super.setSuppressAllChecks(suppressAllChecks);
}
/**
* Set the {@link ApigatewayRequestInitializer}.
*
* @since 1.12
*/
public Builder setApigatewayRequestInitializer(
ApigatewayRequestInitializer apigatewayRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(apigatewayRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}
|
[
"[email protected]"
] | |
e0ccc535fc1e3953f474062acf2582bf953961a6
|
0efed5a8c2ad5dcf75bb8c119c898d880f5bfdb2
|
/src/main/java/com/example/demo/DubboApplication.java
|
e1c0e5b8ec21982af3682647735a1f6a15389b6b
|
[] |
no_license
|
cadeeper/dubbo-thrift-bug-demo
|
bf5b80c40ca7ce9d2d1c8451bd613dd9935428b7
|
e70b6399404eba230b073a05267093d7e79fc42c
|
refs/heads/master
| 2023-08-08T14:20:05.327344 | 2023-08-02T00:59:36 | 2023-08-02T00:59:36 | 162,375,901 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 750 |
java
|
package com.example.demo;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan("com.example.demo")
public class DubboApplication {
public static void main(String[] args) throws IOException {
Properties properties = new Properties();
InputStream in = DubboApplication.class.getClassLoader().getResourceAsStream("dubbo.properties");
properties.load(in);
SpringApplication app = new SpringApplication(DubboApplication.class);
app.setDefaultProperties(properties);
app.run(args);
}
}
|
[
"[email protected]"
] | |
b2db5aa4f1a8ac5fc12d6267bce37a39b0f084d1
|
6552bf0f7236d35d1b83a1bbcca084e864ff352c
|
/src/main/java/com/simplid/gol/GameOfLifeApplication.java
|
2b297b318fc103d00c7da6a59198b5fca8f1548d
|
[
"MIT"
] |
permissive
|
Krotki/game-of-life
|
6d48471887e05c6c9b73afcdb6e371ea93573474
|
ef0183fecb329bd90d120c20aeac35e2bda8e287
|
refs/heads/master
| 2021-01-02T23:07:49.751501 | 2015-07-10T15:51:07 | 2015-07-10T15:51:07 | 38,887,704 | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 327 |
java
|
package com.simplid.gol;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class GameOfLifeApplication {
public static void main(String[] args) {
SpringApplication.run(GameOfLifeApplication.class, args);
}
}
|
[
"[email protected]"
] | |
dfe445b45307df9b75dad695922f46c460bb793f
|
82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32
|
/ZmailSoap/src/wsdl-test/generated/zcsclient/mail/testFolder.java
|
9f847e2eace732786733c45860dafb61e91749ff
|
[
"MIT"
] |
permissive
|
keramist/zmailserver
|
d01187fb6086bf3784fe180bea2e1c0854c83f3f
|
762642b77c8f559a57e93c9f89b1473d6858c159
|
refs/heads/master
| 2021-01-21T05:56:25.642425 | 2013-10-21T11:27:05 | 2013-10-22T12:48:43 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Java
| false | false | 19,360 |
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
*
* Zimbra Collaboration Suite Server
* Copyright (C) 2011, 2012 VMware, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* ***** END LICENSE BLOCK *****
*/
package generated.zcsclient.mail;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for folder complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="folder">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:zmailMail}meta" maxOccurs="unbounded" minOccurs="0"/>
* <element name="acl" type="{urn:zmailMail}acl" minOccurs="0"/>
* <element ref="{urn:zmailMail}retentionPolicy" minOccurs="0"/>
* <choice maxOccurs="unbounded" minOccurs="0">
* <element ref="{urn:zmailMail}folder"/>
* <element ref="{urn:zmailMail}link"/>
* <element ref="{urn:zmailMail}search"/>
* </choice>
* </sequence>
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="uuid" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="l" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="luuid" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="f" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="color" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="rgb" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="u" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="i4u" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="view" type="{urn:zmailMail}view" />
* <attribute name="rev" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="ms" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="md" type="{http://www.w3.org/2001/XMLSchema}long" />
* <attribute name="n" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="i4n" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="s" type="{http://www.w3.org/2001/XMLSchema}long" />
* <attribute name="i4ms" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="i4next" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="url" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="activesyncdisabled" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="perm" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="recursive" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="rest" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "folder", propOrder = {
"meta",
"acl",
"retentionPolicy",
"folderOrLinkOrSearch"
})
@XmlSeeAlso({
testSearchFolder.class,
testMountpoint.class
})
public class testFolder {
protected List<testMailCustomMetadata> meta;
protected testAcl acl;
protected testRetentionPolicy retentionPolicy;
@XmlElements({
@XmlElement(name = "folder"),
@XmlElement(name = "search", type = testSearchFolder.class),
@XmlElement(name = "link", type = testMountpoint.class)
})
protected List<testFolder> folderOrLinkOrSearch;
@XmlAttribute(name = "id", required = true)
protected String id;
@XmlAttribute(name = "uuid", required = true)
protected String uuid;
@XmlAttribute(name = "name")
protected String name;
@XmlAttribute(name = "l")
protected String l;
@XmlAttribute(name = "luuid")
protected String luuid;
@XmlAttribute(name = "f")
protected String f;
@XmlAttribute(name = "color")
protected Integer color;
@XmlAttribute(name = "rgb")
protected String rgb;
@XmlAttribute(name = "u")
protected Integer u;
@XmlAttribute(name = "i4u")
protected Integer i4U;
@XmlAttribute(name = "view")
protected String view;
@XmlAttribute(name = "rev")
protected Integer rev;
@XmlAttribute(name = "ms")
protected Integer ms;
@XmlAttribute(name = "md")
protected Long md;
@XmlAttribute(name = "n")
protected Integer n;
@XmlAttribute(name = "i4n")
protected Integer i4N;
@XmlAttribute(name = "s")
protected Long s;
@XmlAttribute(name = "i4ms")
protected Integer i4Ms;
@XmlAttribute(name = "i4next")
protected Integer i4Next;
@XmlAttribute(name = "url")
protected String url;
@XmlAttribute(name = "activesyncdisabled")
protected Boolean activesyncdisabled;
@XmlAttribute(name = "perm")
protected String perm;
@XmlAttribute(name = "recursive")
protected Boolean recursive;
@XmlAttribute(name = "rest")
protected String rest;
/**
* Gets the value of the meta property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the meta property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMeta().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link testMailCustomMetadata }
*
*
*/
public List<testMailCustomMetadata> getMeta() {
if (meta == null) {
meta = new ArrayList<testMailCustomMetadata>();
}
return this.meta;
}
/**
* Gets the value of the acl property.
*
* @return
* possible object is
* {@link testAcl }
*
*/
public testAcl getAcl() {
return acl;
}
/**
* Sets the value of the acl property.
*
* @param value
* allowed object is
* {@link testAcl }
*
*/
public void setAcl(testAcl value) {
this.acl = value;
}
/**
* Gets the value of the retentionPolicy property.
*
* @return
* possible object is
* {@link testRetentionPolicy }
*
*/
public testRetentionPolicy getRetentionPolicy() {
return retentionPolicy;
}
/**
* Sets the value of the retentionPolicy property.
*
* @param value
* allowed object is
* {@link testRetentionPolicy }
*
*/
public void setRetentionPolicy(testRetentionPolicy value) {
this.retentionPolicy = value;
}
/**
* Gets the value of the folderOrLinkOrSearch property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the folderOrLinkOrSearch property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getFolderOrLinkOrSearch().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link testFolder }
* {@link testSearchFolder }
* {@link testMountpoint }
*
*
*/
public List<testFolder> getFolderOrLinkOrSearch() {
if (folderOrLinkOrSearch == null) {
folderOrLinkOrSearch = new ArrayList<testFolder>();
}
return this.folderOrLinkOrSearch;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the uuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUuid() {
return uuid;
}
/**
* Sets the value of the uuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUuid(String value) {
this.uuid = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the l property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getL() {
return l;
}
/**
* Sets the value of the l property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setL(String value) {
this.l = value;
}
/**
* Gets the value of the luuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLuuid() {
return luuid;
}
/**
* Sets the value of the luuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLuuid(String value) {
this.luuid = value;
}
/**
* Gets the value of the f property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getF() {
return f;
}
/**
* Sets the value of the f property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setF(String value) {
this.f = value;
}
/**
* Gets the value of the color property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getColor() {
return color;
}
/**
* Sets the value of the color property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setColor(Integer value) {
this.color = value;
}
/**
* Gets the value of the rgb property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRgb() {
return rgb;
}
/**
* Sets the value of the rgb property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRgb(String value) {
this.rgb = value;
}
/**
* Gets the value of the u property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getU() {
return u;
}
/**
* Sets the value of the u property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setU(Integer value) {
this.u = value;
}
/**
* Gets the value of the i4U property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getI4U() {
return i4U;
}
/**
* Sets the value of the i4U property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setI4U(Integer value) {
this.i4U = value;
}
/**
* Gets the value of the view property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getView() {
return view;
}
/**
* Sets the value of the view property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setView(String value) {
this.view = value;
}
/**
* Gets the value of the rev property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getRev() {
return rev;
}
/**
* Sets the value of the rev property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setRev(Integer value) {
this.rev = value;
}
/**
* Gets the value of the ms property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMs() {
return ms;
}
/**
* Sets the value of the ms property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setMs(Integer value) {
this.ms = value;
}
/**
* Gets the value of the md property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getMd() {
return md;
}
/**
* Sets the value of the md property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMd(Long value) {
this.md = value;
}
/**
* Gets the value of the n property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getN() {
return n;
}
/**
* Sets the value of the n property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setN(Integer value) {
this.n = value;
}
/**
* Gets the value of the i4N property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getI4N() {
return i4N;
}
/**
* Sets the value of the i4N property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setI4N(Integer value) {
this.i4N = value;
}
/**
* Gets the value of the s property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getS() {
return s;
}
/**
* Sets the value of the s property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setS(Long value) {
this.s = value;
}
/**
* Gets the value of the i4Ms property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getI4Ms() {
return i4Ms;
}
/**
* Sets the value of the i4Ms property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setI4Ms(Integer value) {
this.i4Ms = value;
}
/**
* Gets the value of the i4Next property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getI4Next() {
return i4Next;
}
/**
* Sets the value of the i4Next property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setI4Next(Integer value) {
this.i4Next = value;
}
/**
* Gets the value of the url property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUrl() {
return url;
}
/**
* Sets the value of the url property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUrl(String value) {
this.url = value;
}
/**
* Gets the value of the activesyncdisabled property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isActivesyncdisabled() {
return activesyncdisabled;
}
/**
* Sets the value of the activesyncdisabled property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setActivesyncdisabled(Boolean value) {
this.activesyncdisabled = value;
}
/**
* Gets the value of the perm property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPerm() {
return perm;
}
/**
* Sets the value of the perm property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPerm(String value) {
this.perm = value;
}
/**
* Gets the value of the recursive property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isRecursive() {
return recursive;
}
/**
* Sets the value of the recursive property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setRecursive(Boolean value) {
this.recursive = value;
}
/**
* Gets the value of the rest property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRest() {
return rest;
}
/**
* Sets the value of the rest property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRest(String value) {
this.rest = value;
}
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.