blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3cc3379ddf5c3a39a4ac69e72762734e2567f745 | 6a1edd42014bb0576c3f9bab94c28e195a4190ac | /learningmaterials/app/src/main/java/com/gec/learningmaterials/mech/III/sem2.java | c73ffab3281c00b3f01282bd66e00dc6ada0cd68 | [] | no_license | sksrvskr/apssdc-project | 37dae04432443d03915a585b1a6b5ab3623154e8 | 89128021c6f1e60732c19f0f528091d1700f988d | refs/heads/main | 2023-06-14T17:50:18.247625 | 2021-07-09T06:26:07 | 2021-07-09T06:26:07 | 382,881,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,129 | java | package com.gec.learningmaterials.mech.III;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.cardview.widget.CardView;
import com.gec.learningmaterials.R;
import com.google.android.material.appbar.CollapsingToolbarLayout;
public class sem2 extends AppCompatActivity {
Button I,II,III,IV,V,VI,VII,VIII;
LinearLayout ll1,ll2,ll3,ll4;
CardView c1,c2,c3,c4,c5,c6,c7,c8;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
CollapsingToolbarLayout toolBarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout);
toolBarLayout.setTitle("SEM2");
toolBarLayout.setContentScrimResource(R.color.colorAccent);
ll4 = findViewById(R.id.lil4);
ll4.setVisibility(View.INVISIBLE);
}
} | [
"[email protected]"
] | |
e67399e706e708d5584b6bf2011c784b0f2e070f | 5832504c187692c3410ab0754d647af1d191bec2 | /bin/ext-accelerator/acceleratorcms/src/de/hybris/platform/acceleratorcms/setup/AcceleratorCmsSystemSetup.java | bc790d336b31e7b49c4ec079b0fe132064d92c6b | [] | no_license | ramamohan/Hybris_TEST | d8505769885edc66ed85831def9e2b9f93bf33a6 | 820654707f194feb785483f9bf9851a1381af9d0 | refs/heads/master | 2021-12-09T05:35:58.257789 | 2016-04-28T23:42:26 | 2016-04-28T23:42:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,333 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.acceleratorcms.setup;
import java.util.Collections;
import java.util.List;
import de.hybris.platform.acceleratorcms.constants.AcceleratorCmsConstants;
import de.hybris.platform.commerceservices.setup.AbstractSystemSetup;
import de.hybris.platform.core.initialization.SystemSetup;
import de.hybris.platform.core.initialization.SystemSetupContext;
import de.hybris.platform.core.initialization.SystemSetupParameter;
@SystemSetup(extension = AcceleratorCmsConstants.EXTENSIONNAME)
public class AcceleratorCmsSystemSetup extends AbstractSystemSetup
{
@Override
public List<SystemSetupParameter> getInitializationOptions()
{
return Collections.emptyList();
}
@SystemSetup(type = SystemSetup.Type.ESSENTIAL, process = SystemSetup.Process.ALL)
public void createEssentialData(final SystemSetupContext context)
{
importImpexFile(context, "/acceleratorcms/import/essential-data.impex", true);
}
}
| [
"[email protected]"
] | |
1ff36e43ec3cb889b886f4e4f4a6602af0bb06e6 | 64c2988de61650f5217a404c06d7e9354818c20f | /app/src/main/java/metrowebz/com/quizforyou/Activity/Fragment/SkipQuestionDilaog.java | e81b29f26ac6587c775e1e6e51b945d2019be225 | [
"Apache-2.0"
] | permissive | abhilash002/QuizForYou | 38dba327f47fdf9559b333943d8407a967303841 | 1182d188f7f40e99a0731a8b3a98a020cddf2e49 | refs/heads/master | 2021-05-16T13:10:45.506146 | 2018-04-24T06:26:24 | 2018-04-24T06:26:24 | 105,362,159 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,716 | java | package metrowebz.com.quizforyou.Activity.Fragment;
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import metrowebz.com.quizforyou.R;
/**
* Created by Abhilash on 30-09-2017.
*/
public class SkipQuestionDilaog extends DialogFragment implements View.OnClickListener {
private View.OnClickListener listener;
private AlertDialog.Builder alertDBuilder;
private AlertDialog dialog;
private Button mDenyButton, mAcceptButton;
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
alertDBuilder = new AlertDialog.Builder(getContext());
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.skip_question_dialog, null);
mDenyButton = (Button) view.findViewById(R.id.deny);
mAcceptButton = (Button) view.findViewById(R.id.accept);
alertDBuilder.setView(view);
alertDBuilder.setCancelable(false);
mDenyButton.setOnClickListener(this);
mAcceptButton.setOnClickListener(this);
dialog = alertDBuilder.create();
return dialog;
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.deny:
dismiss();
break;
case R.id.accept:
this.onClick(v);
break;
}
}
public void setSkipDialogClickListener(View.OnClickListener listener){
this.listener = listener;
}
}
| [
"[email protected]"
] | |
a2ebf21971cf94daad08ac08e5a7f3f00354fedb | 255fad6b8eb20b574ab8514ba20176844814be79 | /app/src/main/java/faceapp/com/myapplication/persongroupmanagement/AddFaceToPersonActivity.java | 18337e2fb420ba78e88f29b7fb7f502e6cef70ef | [] | no_license | MinhUITk9/Foto | c0da4234f237a9bd180eb5e3da76b4779f0251d2 | 4cd0b8205d6cc182718bb8690553fe01f1ca81cc | refs/heads/master | 2021-01-12T05:03:15.868534 | 2017-01-02T14:24:53 | 2017-01-02T14:24:53 | 77,838,079 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,943 | java | package faceapp.com.myapplication.persongroupmanagement;
/**
* Created by Admin on 11/10/2016.
*/
import android.app.ProgressDialog;
import android.content.Context;
import android.content.ContextWrapper;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;
import com.microsoft.projectoxford.face.FaceServiceClient;
import com.microsoft.projectoxford.face.contract.AddPersistedFaceResult;
import com.microsoft.projectoxford.face.contract.Face;
import com.microsoft.projectoxford.face.contract.FaceRectangle;
import faceapp.com.myapplication.R;
import faceapp.com.myapplication.helper.ImageHelper;
import faceapp.com.myapplication.helper.LogHelper;
import faceapp.com.myapplication.helper.FaceApp;
import faceapp.com.myapplication.helper.StorageHelper;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
public class AddFaceToPersonActivity extends AppCompatActivity {
// Background task of adding a face to person.
class AddFaceTask extends AsyncTask<Void, String, Boolean> {
List<Integer> mFaceIndices;
AddFaceTask(List<Integer> faceIndices) {
mFaceIndices = faceIndices;
}
@Override
protected Boolean doInBackground(Void... params) {
// Get an instance of face service client to detect faces in image.
FaceServiceClient faceServiceClient = FaceApp.getFaceServiceClient();
try{
publishProgress("Adding face...");
UUID personId = UUID.fromString(mPersonId);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);
InputStream imageInputStream = new ByteArrayInputStream(stream.toByteArray());
for (Integer index: mFaceIndices) {
FaceRectangle faceRect = mFaceGridViewAdapter.faceRectList.get(index);
addLog("Request: Adding face to person " + mPersonId);
// Start the request to add face.
AddPersistedFaceResult result = faceServiceClient.addPersonFace(
mPersonGroupId,
personId,
imageInputStream,
"User data",
faceRect);
mFaceGridViewAdapter.faceIdList.set(index, result.persistedFaceId);
}
return true;
} catch (Exception e) {
publishProgress(e.getMessage());
addLog(e.getMessage());
return false;
}
}
@Override
protected void onPreExecute() {
setUiBeforeBackgroundTask();
}
@Override
protected void onProgressUpdate(String... progress) {
setUiDuringBackgroundTask(progress[0]);
}
@Override
protected void onPostExecute(Boolean result) {
setUiAfterAddingFace(result, mFaceIndices);
}
}
// Background task of face detection.
private class DetectionTask extends AsyncTask<InputStream, String, Face[]> {
private boolean mSucceed = true;
@Override
protected Face[] doInBackground(InputStream... params) {
// Get an instance of face service client to detect faces in image.
FaceServiceClient faceServiceClient = FaceApp.getFaceServiceClient();
try{
publishProgress("Detecting...");
// Start detection.
return faceServiceClient.detect(
params[0], /* Input stream of image to detect */
true, /* Whether to return face ID */
false, /* Whether to return face landmarks */
/* Which face attributes to analyze, currently we support:
age,gender,headPose,smile,facialHair */
null);
} catch (Exception e) {
mSucceed = false;
publishProgress(e.getMessage());
addLog(e.getMessage());
return null;
}
}
@Override
protected void onPreExecute() {
setUiBeforeBackgroundTask();
}
@Override
protected void onProgressUpdate(String... progress) {
setUiDuringBackgroundTask(progress[0]);
}
@Override
protected void onPostExecute(Face[] faces) {
if (mSucceed) {
addLog("Response: Success. Detected " + (faces == null ? 0 : faces.length)
+ " Face(s)");
}
// Show the result on screen when detection is done.
setUiAfterDetection(faces, mSucceed);
}
}
private void setUiBeforeBackgroundTask() {
mProgressDialog.show();
}
// Show the status of background detection task on screen.
private void setUiDuringBackgroundTask(String progress) {
mProgressDialog.setMessage(progress);
setInfo(progress);
}
private void setUiAfterAddingFace(boolean succeed, List<Integer> faceIndices) {
mProgressDialog.dismiss();
if (succeed) {
String faceIds = "";
for (Integer index : faceIndices) {
String faceId = mFaceGridViewAdapter.faceIdList.get(index).toString();
faceIds += faceId + ", ";
FileOutputStream fileOutputStream = null;
try {
File file = new File(getApplicationContext().getFilesDir(), faceId);
fileOutputStream = new FileOutputStream(file);
mFaceGridViewAdapter.faceThumbnails.get(index)
.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream);
fileOutputStream.flush();
Uri uri = Uri.fromFile(file);
StorageHelper.setFaceUri(
faceId, uri.toString(), mPersonId, AddFaceToPersonActivity.this);
} catch (IOException e) {
setInfo(e.getMessage());
} finally {
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e) {
setInfo(e.getMessage());
}
}
}
}
addLog("Response: Success. Face(s) " + faceIds + "added to person " + mPersonId);
finish();
}
}
// Show the result on screen when detection is done.
private void setUiAfterDetection(Face[] result, boolean succeed) {
mProgressDialog.dismiss();
if (succeed) {
// Set the information about the detection result.
if (result != null) {
setInfo(result.length + " face"
+ (result.length != 1 ? "s" : "") + " detected");
} else {
setInfo("0 face detected");
}
// Set the adapter of the ListView which contains the details of the detected faces.
mFaceGridViewAdapter = new FaceGridViewAdapter(result);
// Show the detailed list of detected faces.
GridView gridView = (GridView) findViewById(R.id.gridView_faces_to_select);
gridView.setAdapter(mFaceGridViewAdapter);
}
}
String mPersonGroupId;
String mPersonId;
String mImageUriStr;
Bitmap mBitmap;
FaceGridViewAdapter mFaceGridViewAdapter;
// Progress dialog popped up when communicating with server.
ProgressDialog mProgressDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_face_to_person);
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
mPersonId = bundle.getString("PersonId");
mPersonGroupId = bundle.getString("PersonGroupId");
mImageUriStr = bundle.getString("ImageUriStr");
}
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setTitle(getString(R.string.progress_dialog_title));
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("PersonId", mPersonId);
outState.putString("PersonGroupId", mPersonGroupId);
outState.putString("ImageUriStr", mImageUriStr);
}
@Override
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mPersonId = savedInstanceState.getString("PersonId");
mPersonGroupId = savedInstanceState.getString("PersonGroupId");
mImageUriStr = savedInstanceState.getString("ImageUriStr");
}
@Override
protected void onResume() {
super.onResume();
Uri imageUri = Uri.parse(mImageUriStr);
mBitmap = ImageHelper.loadSizeLimitedBitmapFromUri(
imageUri, getContentResolver());
if (mBitmap != null) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);
InputStream imageInputStream = new ByteArrayInputStream(stream.toByteArray());
addLog("Request: Detecting " + mImageUriStr);
new DetectionTask().execute(imageInputStream);
}
}
public void doneAndSave(View view) {
if (mFaceGridViewAdapter != null) {
List<Integer> faceIndices = new ArrayList<>();
for (int i = 0; i < mFaceGridViewAdapter.faceRectList.size(); ++i) {
if (mFaceGridViewAdapter.faceChecked.get(i)) {
faceIndices.add(i);
}
}
if (faceIndices.size() > 0) {
new AddFaceTask(faceIndices).execute();
} else {
finish();
}
}
}
// Add a log item.
private void addLog(String log) {
LogHelper.addIdentificationLog(log);
}
// Set the information panel on screen.
private void setInfo(String info) {
TextView textView = (TextView) findViewById(R.id.info);
textView.setText(info);
}
private class FaceGridViewAdapter extends BaseAdapter {
List<UUID> faceIdList;
List<FaceRectangle> faceRectList;
List<Bitmap> faceThumbnails;
List<Boolean> faceChecked;
FaceGridViewAdapter(Face[] detectionResult) {
faceIdList = new ArrayList<>();
faceRectList = new ArrayList<>();
faceThumbnails = new ArrayList<>();
faceChecked = new ArrayList<>();
if (detectionResult != null) {
List<Face> faces = Arrays.asList(detectionResult);
for (Face face : faces) {
try {
// Crop face thumbnail with five main landmarks drawn from original image.
faceThumbnails.add(ImageHelper.generateFaceThumbnail(
mBitmap, face.faceRectangle));
faceIdList.add(null);
faceRectList.add(face.faceRectangle);
faceChecked.add(false);
} catch (IOException e) {
// Show the exception when generating face thumbnail fails.
setInfo(e.getMessage());
}
}
}
}
@Override
public int getCount() {
return faceRectList.size();
}
@Override
public Object getItem(int position) {
return faceRectList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
// set the item view
if (convertView == null) {
LayoutInflater layoutInflater =
(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView =
layoutInflater.inflate(R.layout.item_face_with_checkbox, parent, false);
}
convertView.setId(position);
((ImageView)convertView.findViewById(R.id.image_face))
.setImageBitmap(faceThumbnails.get(position));
// set the checked status of the item
CheckBox checkBox = (CheckBox) convertView.findViewById(R.id.checkbox_face);
checkBox.setChecked(faceChecked.get(position));
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
faceChecked.set(position, isChecked);
}
});
return convertView;
}
}
}
| [
"[email protected]"
] | |
30052aabf8107e452128f2611429d238e9a4864d | 61c5a1db29c049b2ad1d1c01c8d02304039608b1 | /src/chapter_1/Exercise1_4__SimpleTable.java | 98a804da57c4512c4b2cd6399484cf8a85ed37b9 | [] | no_license | odielag/Java_book_started_2-10-2016 | 490b64ad4169e2627fc9689650561806bb3f5ac3 | bca39a3b3dc5f39338da333604eb3c961f55046d | refs/heads/master | 2020-05-21T23:38:37.834737 | 2016-11-06T10:36:59 | 2016-11-06T10:36:59 | 51,508,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 497 | java | package chapter_1;
public class Exercise1_4__SimpleTable {
public static void main(String[] args) {
// This program is for outputting a table
/*
* // example
*
* a a^2 a^3
* 1 1 1
* 2 4 8
* 3 9 27
* 4 16 64
*
*/
int[] a = {1, 2, 3, 4};
System.out.printf("a a^2 a^3\n");
for(int i = 0; i < 4; i++){
System.out.println(a[i] + "\t" + Math.pow((a[i]),2) + "\t" + Math.pow(a[i],3));
}
}
}
| [
"[email protected]"
] | |
bb8a4633ab465fd71087b6d2d3087ed723bc8b65 | 79ad64833f328397b1093779ef37bba5424de6ba | /app/src/main/java/vn/com/vnpt/vinaphone/vnptsoftware/vnptoffice/adapter/FileChiDaoAdapter.java | 0ce0c8703e7a5dac880467d8ba05d4f029b027f3 | [] | no_license | nguyenkiemhieu1/VNPT_01 | 75a047485b009b992ce8530acef4c18098a517c8 | 630612ff55049e6a68fa0aa0fb20f2d932f0b565 | refs/heads/master | 2023-02-01T00:40:09.029586 | 2020-12-18T08:27:30 | 2020-12-18T08:27:30 | 322,534,445 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,779 | java | package vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.List;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.R;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.common.Constants;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.configuration.Application;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.EditchiDaoV2Activity;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.ForwardChiDaoV2Activity;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.ReplyChiDaoV2Activity;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.activity.SendChiDaoV2Activity;
import vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.model.FileChiDao;
/**
* Created by LinhLK - 0948012236 on 8/31/2017.
*/
public class FileChiDaoAdapter extends ArrayAdapter<FileChiDao> {
private Context context;
private int resource;
private List<FileChiDao> attachFileInfoList;
private String type;
public FileChiDaoAdapter(Context context, int resource, List<FileChiDao> attachFileInfoList, String type) {
super(context, resource, attachFileInfoList);
this.context = context;
this.resource = resource;
this.attachFileInfoList = attachFileInfoList;
this.type = type;
}
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(this.resource, null);
final LinearLayout itemAttackFile = (LinearLayout) view.findViewById(R.id.itemAttackFile);
ImageView ic_file = (ImageView) view.findViewById(R.id.ic_file);
ImageView ic_remove = (ImageView) view.findViewById(R.id.ic_remove);
TextView filename = (TextView) view.findViewById(R.id.filename);
filename.setTypeface(Application.getApp().getTypeface());
final FileChiDao attachFileInfo = attachFileInfoList.get(position);
filename.setText(attachFileInfo.getName());
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.DOC) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.DOCX)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_doc));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.XLS) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.XLSX)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_xls));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PPT) || attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PPTX)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_ppt));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PDF)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_pdf));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.ZIP)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_zip));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.RAR)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_rar));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.TXT)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_txt));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.MPP)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_mpp));
}
if (attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.JPG)
|| attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.JPEG)
|| attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.PNG)
|| attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.GIF)
|| attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.TIFF)
|| attachFileInfo.getName().trim().toUpperCase().endsWith(Constants.BMP)) {
ic_file.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_image));
}
ic_remove.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
itemAttackFile.setVisibility(View.GONE);
if (type.equals("SEND")) {
((SendChiDaoV2Activity) context).removeFile(attachFileInfo.getName());
itemAttackFile.removeAllViews();
}
if (type.equals("EDIT")) {
((EditchiDaoV2Activity) context).removeFile(attachFileInfo.getName());
itemAttackFile.removeAllViews();
}
// if (type.equals("FW")) {
// ((ForwardChiDaoV2Activity) context).removeFile(attachFileInfo.getName());
// itemAttackFile.removeAllViews();
// }
if (type.equals("REPLY")) {
((ReplyChiDaoV2Activity) context).removeFile(attachFileInfo.getName());
itemAttackFile.removeAllViews();
}
}
});
return view;
}
}
| [
"[email protected]"
] | |
0fa31d1e9761bfe8ddbb44d7a4f3391bf3246343 | d3085f203677fea8b9d0b8cd5e8d0f321cdbf119 | /src/test/java/com/dong/dao/UserDaoTest.java | d416dc1a436359b72e3fbc22e32983a97b8d8c13 | [] | no_license | hifdong/ssh-x | 53cd7740e95bb71b1186ba96121f50a9af65507e | 659ee6505fcb03d6219c150290ff052aff104c52 | refs/heads/master | 2021-01-22T12:52:57.927640 | 2016-01-17T08:27:48 | 2016-01-17T08:27:48 | 49,581,455 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,426 | java | package com.dong.dao;
import com.dong.model.User;
import com.dong.service.UserService;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.junit.Test;
import org.springframework.web.context.ContextLoader;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author: hifdong
* @Date: 16/1/10.
*/
public class UserDaoTest {
private UserService userService;
@Test // 未整合spring前对hibernate配置测试
public void testConnect() {
Configuration config= new Configuration();
config.configure("hibernate.cfg.xml");
SessionFactory sf = config.buildSessionFactory();
Session session = sf.openSession();
Transaction trans = session.beginTransaction();
User user = new User();
user.setUserName("testSave");
user.setPassword("pas");
session.save(user);
trans.commit();
session.close();
}
// @Test
// public void testQueryUserList() {
// UserService userService = ContextLoader("");
// Map<String, Object> paramMap = new HashMap<String, Object>();
// try {
// List<User> userList = userService.queryUserList();
// assertTrue(userList.size() > 0);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
}
| [
"[email protected]"
] | |
eff40099fdb987e905724056d3a04237aa626cbf | 60416ddfc2ec70451712c063157271001851767c | /app/src/main/java/com/example/guest999/firebasenotification/adapters/DataAdapter.java | af2dda77481c988920cfa8d792c2d8a7a76e3765 | [] | no_license | HIREN4131KINAL/ShareDemo | f2261e7fdfd31a15026d6e35ddad91a582dd07a2 | 19bb0f33cabc56ad4f09e35096d33675fef8fbd9 | refs/heads/master | 2021-01-12T06:00:41.171805 | 2016-12-16T08:52:00 | 2016-12-16T08:52:00 | 77,269,570 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 48,042 | java | package com.example.guest999.firebasenotification.adapters;
import android.Manifest;
import android.app.Activity;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.net.Uri;
import android.os.Environment;
import android.provider.ContactsContract;
import android.support.v4.app.ActivityCompat;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.example.guest999.firebasenotification.Config;
import com.example.guest999.firebasenotification.R;
import com.example.guest999.firebasenotification.utilis.CheckConnection;
import com.example.guest999.firebasenotification.utilis.Delete_Data;
import com.example.guest999.firebasenotification.utilis.DownloadCallBack;
import com.example.guest999.firebasenotification.utilis.DownloadTaskIMG;
import com.example.guest999.firebasenotification.utilis.DownloadTaskPDF;
import com.example.guest999.firebasenotification.utilis.MarshmallowPermissions;
import com.example.guest999.firebasenotification.utilis.SharedPreferenceManager;
import com.orangegangsters.github.swipyrefreshlayout.library.SwipyRefreshLayout;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import io.netopen.hotbitmapgg.library.view.RingProgressBar;
import static com.example.guest999.firebasenotification.Config.PhoneFromDevice;
/**
* Created by Harshad and Modified by Joshi Tushar and Hiren
*/
public class DataAdapter extends RecyclerView.Adapter<DataAdapter.ViewHolder> implements DownloadCallBack {
private static final int REQUEST_WRITE_STORAGE = 112;
private static final int RESULT_LOAD_FILE = 0;
private static final int RESULT_LOAD_IMAGE = 1;
private static final int REQUEST_CODE_PICK_CONTACTS = 99;
private static final int REQUEST_TEXT = 7;
private static DownloadTaskIMG downloadTask;
private static DownloadTaskPDF downloadPdf;
private static ArrayList<HashMap<String, String>> file_paths = new ArrayList<>();
private SwipyRefreshLayout swipeRefreshLayout;
private Boolean chkVisibility = false;
private ImagePick image;
private File extStore;
private String ImageFileName, localPaTH, FileName;
private DownloadCallBack downloadCallBack;
private File myFile, LocalFile, myFile_;
private LayoutInflater inflater = null;
private Context context;
private MarshmallowPermissions marshmallowPermissions;
private FilePick file;
private Delete_Data delete_data;
public DataAdapter(Context mcontext, ArrayList<HashMap<String, String>> file_paths, SwipyRefreshLayout swipeRefreshLayout) {
this.context = mcontext;
inflater = LayoutInflater.from(context);
DataAdapter.file_paths = file_paths;
downloadCallBack = this;
this.swipeRefreshLayout = swipeRefreshLayout;
marshmallowPermissions = new MarshmallowPermissions((Activity) context);
}
@Override
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
super.onAttachedToRecyclerView(recyclerView);
}
@Override
public int getItemViewType(int position) {
// Log.e("getItemViewType:pos ", String.valueOf(position));
Log.e("IS this PDF ?", String.valueOf(file_paths.get(position).get(Config.TAG_DATA).endsWith(".pdf")));
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pdf") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".docx") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".doc") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".txt") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".ppt") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pptx") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xls") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xlsx")) {
return RESULT_LOAD_FILE;
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".png") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".jpg") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".jpeg")) {
return RESULT_LOAD_IMAGE;
} else if (file_paths.get(position).get(Config.TAG_DATA).contains("::")) {
return REQUEST_CODE_PICK_CONTACTS;
} else {
return REQUEST_TEXT;
}
}
private void NoApplicationAvailable(final int position) {
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(context);
builder.setTitle("Warning");
builder.setMessage("No Application available to view this file");
builder.setIcon(R.drawable.error);
builder.setPositiveButton("Download",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
final String appPackageName = context.getPackageName(); // getPackageName() from Context or Activity object
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar")) {
try {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.rarlab.rar&hl=en" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.rarlab.rar&hl=en" + appPackageName)));
}
} else {
try {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=cn.wps.moffice_eng&hl=en" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=cn.wps.moffice_eng&hl=en" + appPackageName)));
}
}
}
});
builder.setNegativeButton("Not Now",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
android.support.v7.app.AlertDialog dialog = builder.create();
// display dialog
try {
dialog.show();
} catch (Exception ed) {
ed.printStackTrace();
}
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v;
Log.e("layout code: ", viewType + "");
if (viewType == RESULT_LOAD_FILE) {
v = inflater
.inflate(R.layout.raw_file, parent, false);
return new FilePick(v);
} else if (viewType == RESULT_LOAD_IMAGE) {
v = inflater
.inflate(R.layout.raw_image, parent, false);
return new ImagePick(v);
} else if (viewType == REQUEST_CODE_PICK_CONTACTS) {
v = inflater
.inflate(R.layout.raw_contact, parent, false);
return new ContactPick(v);
} else {
v = inflater
.inflate(R.layout.raw_text, parent, false);
return new TextSend(v);
}
}
@Override
public void onBindViewHolder(ViewHolder holder, final int position) {
holder.setIsRecyclable(false);
//for Internet
CheckConnection cd;
IntentFilter filter;
String ad_date = file_paths.get(position).get(Config.CURRENT_DATE);
String ad_time = file_paths.get(position).get(Config.CURRENT_TIME);
String file_size = file_paths.get(position).get(Config.KEY_FILE_SIZE);
PhoneFromDevice = SharedPreferenceManager.getDefaults("phone", context);
Log.e("onBindViewHolder:pos ", String.valueOf(position));
if (holder instanceof FilePick) {
file = (FilePick) holder;
final String pdfname = file_paths.get(position).get(Config.TAG_DATA).replace("http://www.laxmisecurity.com/android/uploads/", "");
FileName = file.temp.getText().toString();
extStore = Environment.getExternalStorageDirectory();
myFile_ = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + FileName);
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pdf")) {
file.file_type_image.setBackgroundResource(R.drawable.pdf);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".docx") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".doc")) {
file.file_type_image.setBackgroundResource(R.drawable.word);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".txt")) {
file.file_type_image.setBackgroundResource(R.drawable.txt);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".ppt")) {
file.file_type_image.setBackgroundResource(R.drawable.ppt);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pptx")) {
file.file_type_image.setBackgroundResource(R.drawable.ppt);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
file.file_type_image.setBackgroundResource(R.drawable.zip);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xls") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xlsx")) {
file.file_type_image.setBackgroundResource(R.drawable.xls);
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar")) {
file.file_type_image.setBackgroundResource(R.drawable.rar);
}
file.temp.setText(pdfname.substring(10));
file.textview_time.setText(ad_time);
file.textview_date.setText(ad_date);
file.txt_file_size.setText(file_size);
if (!file_paths.get(position).get(Config.KEY_PHONE).equals(PhoneFromDevice)) {
//for receive file
file.status.setText(R.string.received);
file.txt_file_size.setTextColor(Color.GRAY);
try {
file.outgoing_layout_bubble.setGravity(Gravity.START | Gravity.BOTTOM);
file.linearLayout.setGravity(Gravity.START | Gravity.BOTTOM);
boolean tabletSize = context.getResources().getBoolean(R.bool.tablet);
if (tabletSize) {
// do something
file.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incomin_normal);
} else {
// do something else
file.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incoming_normal);
}
file.outgoing_layout_bubble.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//for downloading pdf 07-10-2016
localPaTH = file_paths.get(position).get(Config.KEY_LOCAL_PATH);
LocalFile = new File(localPaTH);
FileName = file.temp.getText().toString();
extStore = Environment.getExternalStorageDirectory();
myFile_ = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + pdfname.substring(10));
// File myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + file.temp.getText().toString());
if (myFile_.exists()) {
// Toast.makeText(context, "File already Exists in " + myFile, Toast.LENGTH_SHORT).show();
try {
// File pdfFile = new File(Environment.getExternalStorageDirectory() + "/FileSharing/" + pdfname ); // -> filename
//file.outgoing_layout_bubble.removeView(file.myButton);
Uri path = Uri.fromFile(myFile_);
Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pdf")) {
pdfIntent.setDataAndType(path, "application/pdf");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".docx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".doc")) {
pdfIntent.setDataAndType(path, "application/msword");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".txt")) {
pdfIntent.setDataAndType(path, "text/plain");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".ppt")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-powerpoint");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pptx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.presentationml.presentation");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/zip");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xls")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-excel");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xlsx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar")) {
pdfIntent.setDataAndType(path, "application/x-rar-compressed");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/octet-stream");
}
// file.myButton.setVisibility(INVISIBLE);
context.startActivity(pdfIntent);
} catch (ActivityNotFoundException e) {
NoApplicationAvailable(position);
}
} else {
extStore = Environment.getExternalStorageDirectory();
//myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + ImageFileName);
myFile_ = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + pdfname.substring(10));
if (!myFile_.exists()) {
if (marshmallowPermissions.checkIfAlreadyhavePermission()) {
// execute this when the downloader must be fired
downloadPdf = new DownloadTaskPDF(context, Config.INTERNAL_IMAGE_PATH_URI, "" + pdfname.substring(10), downloadCallBack, swipeRefreshLayout);
// downloadTask.execute("http://ia.tranetech.ae:82/upload/uploads/five-point-someone-chetan-bhagat_ebook.pdf", "" + finalHolder.tv_paper_name.getText().toString() + ".pdf");
downloadPdf.execute(file_paths.get(position).get(Config.TAG_DATA), "" + pdfname.substring(10));
} else {
marshmallowPermissions.requestpermissions();
}
} else {
try {
// File pdfFile = new File(Environment.getExternalStorageDirectory() + "/FileSharing/" + pdfname ); // -> filename
//file.outgoing_layout_bubble.removeView(file.myButton);
Uri path = Uri.fromFile(myFile_);
Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pdf")) {
pdfIntent.setDataAndType(path, "application/pdf");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".docx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".doc")) {
pdfIntent.setDataAndType(path, "application/msword");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".txt")) {
pdfIntent.setDataAndType(path, "text/plain");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".ppt")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-powerpoint");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pptx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.presentationml.presentation");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/zip");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xls")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-excel");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xlsx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar")) {
pdfIntent.setDataAndType(path, "application/x-rar-compressed");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/octet-stream");
}
// file.myButton.setVisibility(INVISIBLE);
context.startActivity(pdfIntent);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, "No Application available to view PDF", Toast.LENGTH_SHORT).show();
NoApplicationAvailable(position);
}
}
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
} else {
//for sent files
file.status.setText(R.string.sent);
try {
file.outgoing_layout_bubble.setGravity(Gravity.END | Gravity.BOTTOM);
file.linearLayout.setGravity(Gravity.END | Gravity.BOTTOM);
boolean tabletSize = context.getResources().getBoolean(R.bool.tablet);
if (tabletSize) {
// do something
file.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoin_normal);
} else {
// do something else
file.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoing_normal);
}
file.temp.setTextColor(Color.WHITE);
file.txt_file_size.setTextColor(Color.WHITE);
file.textview_time.setTextColor(Color.WHITE);
file.textview_date.setTextColor(Color.WHITE);
file.status.setTextColor(Color.WHITE);
} catch (Exception e) {
e.printStackTrace();
}
//for image download on click.
file.outgoing_layout_bubble.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
localPaTH = file_paths.get(position).get(Config.KEY_LOCAL_PATH);
LocalFile = new File(localPaTH);
FileName = file.temp.getText().toString();
extStore = Environment.getExternalStorageDirectory();
//myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + ImageFileName);
myFile_ = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + pdfname.substring(10));
// File myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah File/" + file.temp.getText().toString());
if (LocalFile.exists()) {
// Toast.makeText(context, "File already Exists in " + myFile, Toast.LENGTH_SHORT).show();
try {
// File pdfFile = new File(Environment.getExternalStorageDirectory() + "/FileSharing/" + pdfname ); // -> filename
//file.outgoing_layout_bubble.removeView(file.myButton);
Uri path = Uri.fromFile(LocalFile);
Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pdf")) {
pdfIntent.setDataAndType(path, "application/pdf");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".docx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".doc")) {
pdfIntent.setDataAndType(path, "application/msword");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".txt")) {
pdfIntent.setDataAndType(path, "text/plain");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".ppt")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-powerpoint");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pptx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.presentationml.presentation");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/zip");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xls")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-excel");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xlsx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar")) {
pdfIntent.setDataAndType(path, "application/x-rar-compressed");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/octet-stream");
}
// file.myButton.setVisibility(INVISIBLE);
context.startActivity(pdfIntent);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, "No Application available to view PDF", Toast.LENGTH_SHORT).show();
NoApplicationAvailable(position);
}
} else {
if (!myFile_.exists()) {
if (marshmallowPermissions.checkIfAlreadyhavePermission()) {
// execute this when the downloader must be fired
downloadPdf = new DownloadTaskPDF(context, Config.INTERNAL_IMAGE_PATH_URI, "" + pdfname.substring(10), downloadCallBack, swipeRefreshLayout);
// downloadTask.execute("http://ia.tranetech.ae:82/upload/uploads/five-point-someone-chetan-bhagat_ebook.pdf", "" + finalHolder.tv_paper_name.getText().toString() + ".pdf");
downloadPdf.execute(file_paths.get(position).get(Config.TAG_DATA), "" + pdfname.substring(10));
} else {
marshmallowPermissions.requestpermissions();
}
} else {
try {
// File pdfFile = new File(Environment.getExternalStorageDirectory() + "/FileSharing/" + pdfname ); // -> filename
//file.outgoing_layout_bubble.removeView(file.myButton);
Uri path = Uri.fromFile(myFile_);
Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pdf")) {
pdfIntent.setDataAndType(path, "application/pdf");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".docx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".doc")) {
pdfIntent.setDataAndType(path, "application/msword");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".txt")) {
pdfIntent.setDataAndType(path, "text/plain");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".ppt")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-powerpoint");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".pptx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.presentationml.presentation");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/zip");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xls")) {
pdfIntent.setDataAndType(path, "application/vnd.ms-excel");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".xlsx")) {
pdfIntent.setDataAndType(path, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar")) {
pdfIntent.setDataAndType(path, "application/x-rar-compressed");
} else if (file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".rar") || file_paths.get(position).get(Config.TAG_DATA).toLowerCase().endsWith(".zip")) {
pdfIntent.setDataAndType(path, "application/octet-stream");
}
// file.myButton.setVisibility(INVISIBLE);
context.startActivity(pdfIntent);
} catch (ActivityNotFoundException e) {
NoApplicationAvailable(position);
}
}
}
}
});
}
file.outgoing_layout_bubble.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
file.dialog = new Dialog(context);
file.dialog.setContentView(R.layout.dialog_del);
file.dialog.setTitle("Select Action");
file.dialog.findViewById(R.id.lv_del).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Delet_data(position, file_paths.size());
file.dialog.dismiss();
}
});
// show dialog on screen
//contactPick.dialog.getWindow().getAttributes().windowAnimations = animationSource;
file.dialog.show();
return false;
}
});
} else if (holder instanceof ImagePick) {
// below code changed by Hiren please ask if you want to modified.
try {
image = (DataAdapter.ImagePick) holder;
ImageFileName = file_paths.get(position).get(Config.TAG_DATA).replace(Config.INTERNAL_IMAGE_PATH_URI, "");
extStore = Environment.getExternalStorageDirectory();
myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah Images/" + ImageFileName.substring(10));
localPaTH = file_paths.get(position).get(Config.KEY_LOCAL_PATH);
LocalFile = new File(localPaTH);
image.txt_img_size.setText(file_size);
image.textview_time.setText(ad_time);
image.textview_date.setText(ad_date);
PhoneFromDevice = SharedPreferenceManager.getDefaults("phone", context);
if (!file_paths.get(position).get(Config.KEY_PHONE).equals(PhoneFromDevice)) {
image.status.setText(R.string.received);
image.outgoing_layout_bubble.setGravity(Gravity.LEFT | Gravity.BOTTOM);
image.linearLayout.setGravity(Gravity.LEFT | Gravity.BOTTOM);
boolean tabletSize = context.getResources().getBoolean(R.bool.tablet);
if (tabletSize) {
// do something
image.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incomin_normal);
} else {
// do something else
image.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incoming_normal);
}
// coding for recived items
// below code created by Hiren please ask if you want to delete it.
if (!myFile.exists()) {
chkVisibility = true;
Change_VisiBility(chkVisibility);
try {
Glide.with(context.getApplicationContext())
.load(file_paths.get(position).get(Config.TAG_DATA))
.placeholder(R.drawable.placeholder)
.override(18, 18)
.error(R.drawable.placeholder)
.crossFade()
.centerCrop()
.into(image.score);
} catch (Exception e) {
e.printStackTrace();
}
} else {
chkVisibility = false;
Change_VisiBility(chkVisibility);
try {
Glide.with(context.getApplicationContext())
.load(myFile)
.placeholder(R.drawable.placeholder)
.error(R.drawable.placeholder)
.crossFade()
.centerCrop()
.into(image.score);
} catch (Exception e) {
e.printStackTrace();
}
}
} else {
// coding for sent items
image.status.setText(R.string.sent);
image.outgoing_layout_bubble.setGravity(Gravity.RIGHT | Gravity.BOTTOM);
image.linearLayout.setGravity(Gravity.RIGHT | Gravity.BOTTOM);
boolean tabletSize = context.getResources().getBoolean(R.bool.tablet);
if (tabletSize) {
// do something
image.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoin_normal);
} else {
// do something else
image.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoing_normal);
}
image.status.setTextColor(Color.WHITE);
image.textview_time.setTextColor(Color.WHITE);
image.textview_date.setTextColor(Color.WHITE);
//below code created by Hiren please ask if you want to delete it.
localPaTH = file_paths.get(position).get(Config.KEY_LOCAL_PATH);
LocalFile = new File(localPaTH);
if (LocalFile.exists()) {
chkVisibility = false;
Change_VisiBility(chkVisibility);
try {
Glide.with(context.getApplicationContext())
.load(LocalFile)
.placeholder(R.drawable.placeholder)
.error(R.drawable.placeholder)
.crossFade()
.centerCrop()
.into(image.score);
} catch (Exception e) {
e.printStackTrace();
}
} else {
//below code created by Hiren please ask if you want to delete it.
ImageFileName = file_paths.get(position).get(Config.TAG_DATA).replace(Config.INTERNAL_IMAGE_PATH_URI, "");
extStore = Environment.getExternalStorageDirectory();
myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah Images/" + ImageFileName.substring(10));
if (!myFile.exists()) {
// image.spinwheel.setVisibility(View.VISIBLE);
chkVisibility = true;
Change_VisiBility(chkVisibility);
try {
Glide.with(context.getApplicationContext())
.load(file_paths.get(position).get(Config.TAG_DATA))
.placeholder(R.drawable.placeholder)
.override(18, 18)
.error(R.drawable.placeholder)
.crossFade()
.centerCrop()
.into(image.score);
} catch (Exception e) {
e.printStackTrace();
}
} else {
// image.spinwheel.setVisibility(View.INVISIBLE);
chkVisibility = false;
Change_VisiBility(chkVisibility);
try {
Glide.with(context.getApplicationContext())
.load(myFile)
.placeholder(R.drawable.placeholder)
.error(R.drawable.placeholder)
.crossFade()
.centerCrop()
.into(image.score);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
//for image download on click.
image.outgoing_layout_bubble.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//below code created by Hiren please ask if you want to delete it.
localPaTH = file_paths.get(position).get(Config.KEY_LOCAL_PATH);
LocalFile = new File(localPaTH);
//below code created by Hiren please ask if you want to delete it.
ImageFileName = file_paths.get(position).get(Config.TAG_DATA).replace(Config.INTERNAL_IMAGE_PATH_URI, "");
extStore = Environment.getExternalStorageDirectory();
myFile = new File(extStore.getAbsolutePath() + "/P L Shah/P L Shah Images/" + ImageFileName.substring(10));
if (myFile.exists()) {
chkVisibility = false;
Change_VisiBility(chkVisibility);
Uri path = Uri.fromFile(myFile);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "image/*");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
try {
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, "No Application in your device available to view", Toast.LENGTH_SHORT).show();
}
} else {
if (!myFile.exists()) {
if (marshmallowPermissions.checkIfAlreadyhavePermission()) {
// execute this when the downloader must be fired
downloadTask = new DownloadTaskIMG(context, Config.INTERNAL_IMAGE_PATH_URI, "" + ImageFileName, downloadCallBack, swipeRefreshLayout);
downloadTask.execute();
} else {
marshmallowPermissions.requestpermissions();
}
} else {
chkVisibility = false;
Change_VisiBility(chkVisibility);
Uri path = Uri.fromFile(myFile);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "image/*");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
try {
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, "No Application in your device available to view", Toast.LENGTH_SHORT).show();
}
}
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
image.outgoing_layout_bubble.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
image.dialog = new Dialog(context);
image.dialog.setContentView(R.layout.dialog_del);
image.dialog.setTitle("Select Action");
image.dialog.findViewById(R.id.lv_del).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Delet_data(position, file_paths.size());
image.dialog.dismiss();
}
});
// show dialog on screen
//contactPick.dialog.getWindow().getAttributes().windowAnimations = animationSource;
image.dialog.show();
return false;
}
});
} else if (holder instanceof ContactPick) {
try {
final String Contact_name = file_paths.get(position).get(Config.TAG_DATA);
final ContactPick contactPick = (ContactPick) holder;
String[] splited = Contact_name.split("::");
final String phone_no = splited[0];
final String phone_name = splited[1];
try {
Log.e("onBindViewHolder: ", phone_no);
Log.e("onBindViewHolder: ", phone_name);
} catch (Exception e) {
e.printStackTrace();
}
try {
contactPick.no.setText(phone_no);
contactPick.name.setText(phone_name);
contactPick.textview_time.setText(ad_time);
contactPick.textview_date.setText(ad_date);
} catch (Exception e) {
e.printStackTrace();
}
if (!file_paths.get(position).get(Config.KEY_PHONE).equals(PhoneFromDevice)) {
contactPick.status.setText(R.string.received);
contactPick.outgoing_layout_bubble.setGravity(Gravity.START | Gravity.BOTTOM);
contactPick.linearLayout.setGravity(Gravity.START | Gravity.BOTTOM);
contactPick.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incoming_normal);
contactPick.outgoing_layout_bubble.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
contactPick.dialog = new Dialog(context);
contactPick.dialog.setContentView(R.layout.dialog_contact);
contactPick.dialog.setTitle("Select Action");
contactPick.dialog.findViewById(R.id.lv_call).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phone_no));
Log.e("onClick: ", phone_no);
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
context.startActivity(callIntent);
contactPick.dialog.dismiss();
}
});
contactPick.dialog.findViewById(R.id.lv_del).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Delet_data(position, file_paths.size());
contactPick.dialog.dismiss();
}
});
contactPick.dialog.findViewById(R.id.lv_add).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_INSERT,
ContactsContract.Contacts.CONTENT_URI);
intent.putExtra(ContactsContract.Intents.Insert.NAME, phone_name);
intent.putExtra(ContactsContract.Intents.Insert.PHONE, phone_no);
context.startActivity(intent);
contactPick.dialog.dismiss();
}
});
// show dialog on screen
//contactPick.dialog.getWindow().getAttributes().windowAnimations = animationSource;
contactPick.dialog.show();
return false;
}
});
} else {
contactPick.status.setText(R.string.sent);
contactPick.outgoing_layout_bubble.setGravity(Gravity.END | Gravity.BOTTOM);
contactPick.linearLayout.setGravity(Gravity.END | Gravity.BOTTOM);
contactPick.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoing_normal);
contactPick.status.setTextColor(Color.WHITE);
contactPick.no.setTextColor(Color.WHITE);
contactPick.name.setTextColor(Color.WHITE);
contactPick.textview_time.setTextColor(Color.WHITE);
contactPick.textview_date.setTextColor(Color.WHITE);
contactPick.outgoing_layout_bubble.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
contactPick.dialog = new Dialog(context);
contactPick.dialog.setContentView(R.layout.dialog_contact);
contactPick.dialog.setTitle("Select Action");
contactPick.dialog.findViewById(R.id.lv_call).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phone_no));
Log.e("onClick: ", phone_no);
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
context.startActivity(callIntent);
contactPick.dialog.dismiss();
}
});
contactPick.dialog.findViewById(R.id.lv_del).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Delet_data(position, file_paths.size());
contactPick.dialog.dismiss();
}
});
contactPick.dialog.findViewById(R.id.lv_add).setVisibility(View.GONE);
contactPick.dialog.findViewById(R.id.contact_divider).setVisibility(View.GONE);
// show dialog on screen
//contactPick.dialog.getWindow().getAttributes().windowAnimations = animationSource;
contactPick.dialog.show();
return false;
}
});
}
} catch (Exception e) {
e.printStackTrace();
}
} else if (holder instanceof TextSend) {
try {
final String Contact_name = file_paths.get(position).get(Config.TAG_DATA);
final TextSend textSend = (TextSend) holder;
try {
textSend.msg.setText(Contact_name);
textSend.textview_time.setText(ad_time);
textSend.textview_date.setText(ad_date);
} catch (Exception e) {
e.printStackTrace();
}
if (!file_paths.get(position).get(Config.KEY_PHONE).equals(PhoneFromDevice)) {
textSend.status.setText(R.string.received);
textSend.outgoing_layout_bubble.setGravity(Gravity.START | Gravity.BOTTOM);
textSend.linearLayout.setGravity(Gravity.START | Gravity.BOTTOM);
boolean tabletSize = context.getResources().getBoolean(R.bool.tablet);
if (tabletSize) {
// do something
textSend.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incomin_normal);
} else {
// do something else
textSend.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_incoming_normal);
}
} else {
textSend.status.setText(R.string.sent);
textSend.outgoing_layout_bubble.setGravity(Gravity.END | Gravity.BOTTOM);
textSend.linearLayout.setGravity(Gravity.END | Gravity.BOTTOM);
boolean tabletSize = context.getResources().getBoolean(R.bool.tablet);
if (tabletSize) {
// do something
textSend.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoin_normal);
} else {
// do something else
textSend.outgoing_layout_bubble.setBackgroundResource(R.drawable.balloon_outgoing_normal);
}
textSend.status.setTextColor(Color.WHITE);
textSend.msg.setTextColor(Color.WHITE);
textSend.textview_time.setTextColor(Color.WHITE);
textSend.textview_date.setTextColor(Color.WHITE);
}
textSend.outgoing_layout_bubble.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
textSend.dialog = new Dialog(context);
textSend.dialog.setContentView(R.layout.dialog_del);
textSend.dialog.setTitle("Select Action");
textSend.dialog.findViewById(R.id.lv_del).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Delet_data(position, file_paths.size());
textSend.dialog.dismiss();
}
});
// show dialog on screen
//contactPick.dialog.getWindow().getAttributes().windowAnimations = animationSource;
textSend.dialog.show();
return false;
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
}
private void Delet_data(int position, int size) {
if (CheckConnection.ni != null) {
String adid = file_paths.get(position).get(Config.ad_id);
delete_data = new Delete_Data(context, adid, swipeRefreshLayout);
file_paths.remove(position);
notifyItemRemoved(position);
notifyItemRangeChanged(position, size);
notifyDataSetChanged();
} else {
Toast.makeText(context, "No Internet Available", Toast.LENGTH_LONG).show();
}
}
@Override
public int getItemCount() {
return file_paths.size();
}
@Override
public void onDownloadComplete() {
notifyDataSetChanged();
}
private void Change_VisiBility(Boolean chkVisibility) {
if (chkVisibility) {
image.txt_img_size.setVisibility(View.VISIBLE);
image.rl_img_size.setVisibility(View.VISIBLE);
image.rpb_img_size.setVisibility(View.VISIBLE);
image.ib_img_size.setVisibility(View.VISIBLE);
} else {
image.txt_img_size.setVisibility(View.INVISIBLE);
image.rl_img_size.setVisibility(View.INVISIBLE);
image.rpb_img_size.setVisibility(View.INVISIBLE);
image.ib_img_size.setVisibility(View.INVISIBLE);
}
}
class ViewHolder extends RecyclerView.ViewHolder {
ViewHolder(View itemView) {
super(itemView);
}
}
private class FilePick extends ViewHolder {
TextView temp, txt_file_size;
TextView status, textview_time, textview_date;
LinearLayout outgoing_layout_bubble;
LinearLayout linearLayout;
ImageView file_type_image;
private Dialog dialog;
FilePick(View v) {
super(v);
this.temp = (TextView) v.findViewById(R.id.file_name);
this.status = (TextView) v.findViewById(R.id.send_receive);
this.txt_file_size = (TextView) v.findViewById(R.id.txt_file_size);
this.textview_time = (TextView) v.findViewById(R.id.textview_time);
this.textview_date = (TextView) v.findViewById(R.id.textview_date);
this.outgoing_layout_bubble = (LinearLayout) v.findViewById(R.id.outgoing_layout_bubble);
this.linearLayout = (LinearLayout) v.findViewById(R.id.mainlinearlayout);
this.file_type_image = (ImageView) v.findViewById(R.id.file_image);
}
}
private class ImagePick extends ViewHolder {
private RingProgressBar rpb_img_size;
private ImageButton ib_img_size;
// private ProgressBar spinwheel;
private RelativeLayout rl_img_size;
private ImageView score;
private Dialog dialog;
private TextView status, textview_time, textview_date, txt_img_size;
private LinearLayout outgoing_layout_bubble;
private LinearLayout linearLayout;
ImagePick(View v) {
super(v);
this.txt_img_size = (TextView) v.findViewById(R.id.txt_img_size);
this.ib_img_size = (ImageButton) v.findViewById(R.id.ib_img_size);
this.rpb_img_size = (RingProgressBar) v.findViewById(R.id.rpb_img_size);
this.rl_img_size = (RelativeLayout) v.findViewById(R.id.rl_img_size);
this.score = (ImageView) v.findViewById(R.id.image_list);
this.status = (TextView) v.findViewById(R.id.send_receive);
this.textview_time = (TextView) v.findViewById(R.id.textview_time);
this.textview_date = (TextView) v.findViewById(R.id.textview_date);
this.outgoing_layout_bubble = (LinearLayout) v.findViewById(R.id.outgoing_layout_bubble);
this.linearLayout = (LinearLayout) v.findViewById(R.id.mainlinearlayout);
}
}
private class ContactPick extends ViewHolder {
TextView status, textview_time, textview_date, no, name;
LinearLayout outgoing_layout_bubble;
LinearLayout linearLayout;
private Dialog dialog;
ContactPick(View v) {
super(v);
this.no = (TextView) v.findViewById(R.id.contact_no);
this.name = (TextView) v.findViewById(R.id.contact_name);
this.status = (TextView) v.findViewById(R.id.send_receive);
this.textview_time = (TextView) v.findViewById(R.id.textview_time);
this.textview_date = (TextView) v.findViewById(R.id.textview_date);
this.outgoing_layout_bubble = (LinearLayout) v.findViewById(R.id.outgoing_layout_bubble);
this.linearLayout = (LinearLayout) v.findViewById(R.id.mainlinearlayout);
}
}
private class TextSend extends ViewHolder {
TextView status, textview_time, textview_date, msg;
LinearLayout outgoing_layout_bubble;
LinearLayout linearLayout;
private Dialog dialog;
TextSend(View v) {
super(v);
this.msg = (TextView) v.findViewById(R.id.client_text);
this.status = (TextView) v.findViewById(R.id.send_receive);
this.textview_time = (TextView) v.findViewById(R.id.textview_time);
this.textview_date = (TextView) v.findViewById(R.id.textview_date);
this.outgoing_layout_bubble = (LinearLayout) v.findViewById(R.id.outgoing_layout_bubble);
this.linearLayout = (LinearLayout) v.findViewById(R.id.mainlinearlayout);
}
}
}
| [
"[email protected]"
] | |
6d97298d440c24747e99ea09467d07cc1ad4bd89 | f4cc04502801992aad4dfdcff92297d4abd333d4 | /src/main/java/com/ofemmy/librarymanager/models/user/MyUserDetails.java | 9be612832689c1aca445c3f19aea0879e8f88896 | [] | no_license | ofemmy/library-manager | 15424b3ede469d1bf6688725338b64cc571dd758 | f72accb5b5fb022d0cb7491f66383b42ccfe3d89 | refs/heads/master | 2022-12-05T12:09:10.001241 | 2020-08-29T02:35:06 | 2020-08-29T02:35:06 | 288,858,749 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,446 | java | package com.ofemmy.librarymanager.models.user;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
public class MyUserDetails implements UserDetails {
private String userName;
private String password;
private boolean isActive;
private List<GrantedAuthority> authorities = new ArrayList<>();
public MyUserDetails(UserAccount user) {
this.userName = user.getEmail();
this.password = user.getPassword();
this.isActive = user.getEnabled();
this.authorities.add(new SimpleGrantedAuthority(user.getRole().name()));
}
/* public MyUserDetails(String userName) {
this.userName = userName;
this.password = "foo";
}*/
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return this.authorities;
}
@Override
public String getPassword() {
return this.password;
}
@Override
public String getUsername() {
return this.userName;
}
@Override
public boolean isAccountNonExpired() {
return true;
}
@Override
public boolean isAccountNonLocked() {
return true;
}
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
public boolean isEnabled() {
return this.isActive;
}
}
| [
"[email protected]"
] | |
8b036511072bf1b85d589bf917cb3b2d89815e98 | 3385b9d15b34c4d67e142bb2c61e5557bd59a76d | /ch25/InterfaceBaseConst.java | 82c5f52fe79c34bc9e621881e492889b00dad3a6 | [] | no_license | j-hoon/Java | 69572bdf0039c7d2ded44526f5299dea3ff0ff00 | 6ebeb89cb3f7c34f3e102c07f482750a74e926b9 | refs/heads/master | 2021-08-28T12:34:08.644096 | 2017-12-12T08:31:14 | 2017-12-12T08:31:14 | 103,651,294 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | interface Scale {
int DO = 0; int RE = 1;
int MI = 2; int FA = 3;
int SO = 4; int RA = 5;
int TI = 6;
}
class InterfaceBaseConst {
public static void main(String[] args) {
int sc = Scale.DO;
switch(sc) {
case Scale.DO:
System.out.println("도~ ");
break;
case Scale.RE:
System.out.println("레~ ");
break;
case Scale.MI:
System.out.println("미~ ");
break;
case Scale.FA:
System.out.println("파~ ");
break;
default:
System.out.println("솔~ 라~ 시~ ");
}
}
}
| [
"[email protected]"
] | |
32f7fdaa0371ea9d9467e734abe3631e5e97c03d | 16c885354a0e095894420c799aa9615e9a7b9845 | /uSearch/src/uSearch/CreateItems.java | 4295d7427ec48a955856dd41aa3b252a2f625dec | [
"MIT"
] | permissive | NishanthRaveendran/uSearch | 45cb62795fc57efffa317bdb3e6ad6f301bd5f7c | 9499839cde41b4d36bc0fad482d7fbf9f036f61d | refs/heads/master | 2020-05-21T03:59:38.885839 | 2019-05-10T02:24:38 | 2019-05-10T02:24:38 | 185,902,401 | 0 | 0 | MIT | 2019-05-10T02:12:16 | 2019-05-10T02:12:16 | null | UTF-8 | Java | false | false | 3,008 | java | package uSearch;
/**
* Library of functions to create corresponding items used in the program from a
* list describing it.
*/
public class CreateItems {
/**
* Used to create products from list of strings take from data set.
*
* @param productString List of strings of product data
* @return List of products made from list of strings
*/
public static Product[] createProducts(String[] productstring) {
Product[] products = new Product[productstring.length];
for (int j = 0; j < products.length; j++) {
String[] tempsplit1 = productstring[j].split(", group:");
String[] leftsplit = tempsplit1[0].split(", title:");
String[] leftleftsplit = leftsplit[0].split(":");
String asin = leftleftsplit[1].strip();
String title = leftsplit[1].strip();
String[] tempsplit = tempsplit1[1].split(":");
String[] tempsplit2 = tempsplit[0].split(",");
String group = tempsplit2[0].strip();
tempsplit2 = tempsplit[1].split(",");
String[] similar = null;
String[] testnull = tempsplit2[0].split(" ");
if (Integer.parseInt(testnull[0].strip()) != 0) {
similar = new String[testnull.length - 1];
for (int i = 1; i < testnull.length; i++) {
similar[i - 1] = testnull[i];
}
}
double rating = Double.parseDouble((tempsplit[2].strip()));
products[j] = new Product(asin, title, group, similar, rating);
}
return products;
}
/**
* Used to create reviews from list of strings take from data set.
*
* @param productString List of strings of review data
* @return List of reviews made from list of strings
*/
public static Review[] createReviews(String[] reviewstring) {
Review[] reviews = new Review[reviewstring.length];
for (int j = 0; j < reviewstring.length; j++) {
String[] tempsplit1 = reviewstring[j].split(", \"reviewText\":");
String[] tempsplit = tempsplit1[0].split(":");
String[] tempsplit2 = tempsplit[2].split(",");
String asin = tempsplit2[0].replaceAll("\"", "").strip();
tempsplit2 = tempsplit[3].split(",");
String reviewerName = tempsplit2[0].replaceAll("\"", "").strip();
String[] rightsplit = tempsplit1[1].split(", \"summary\":");
String[] leftsplit = rightsplit[0].split(", \"overall\":");
String reviewText = leftsplit[0].replaceAll("\"", "").strip();
double overall = Double.parseDouble(leftsplit[1].replaceAll("\"", "").strip());
String[] rightrightsplit = rightsplit[1].split(", \"unixReviewTime\":");
String summary = rightrightsplit[0].replaceAll("\"", "").strip();
tempsplit2 = rightrightsplit[1].split(", \"reviewTime\":");
int unixTime = Integer.parseInt(tempsplit2[0].replaceAll("\"", "").strip());
String temp = tempsplit2[1].replaceAll("}", "").strip();
String reviewTime = temp.replaceAll("\"", "").strip();
reviews[j] = new Review(asin, reviewerName, reviewText, overall, reviewTime, unixTime, summary);
}
return reviews;
}
} | [
"[email protected]"
] | |
804be21d8dca63804225e9bea53093019d97a1f8 | 08f11bfcfe8c380516c4054ec5564d7345daa962 | /project-group-02-Backend/src/main/java/ca/mcgill/ecse321/projectgroup02/model/DeliveryMethod.java | cfc093c4e5feec012460663ff2a37ec9dd57a536 | [] | no_license | McGill-ECSE321-Fall2020/project-group-02 | f8ccdeacce89b0ba2eb4ffeac955d5fda25d97ef | 178005a77f49a68c8370647cf7cf457d977457c2 | refs/heads/master | 2023-01-23T04:42:03.482808 | 2020-11-28T03:20:00 | 2020-11-28T03:20:00 | 298,360,432 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 174 | java | package ca.mcgill.ecse321.projectgroup02.model;
import javax.persistence.Entity;
import javax.persistence.Id;
public enum DeliveryMethod{
INSTOREPICKUP,
HOMEDELIVERY;
} | [
"[email protected]"
] | |
e70923ed900b5b4efffb2989ad30c3a61a1b7ed2 | 5fd36bb90f5bbf7f261bdc7696c4c6f129d87cae | /src/main/java/com/minheum/app/repository/LanguageRepository.java | f6a8483d66ab53c03cc80acca1c565903e0734ae | [] | no_license | MinHeum/ks-web | c1f622f2d5a7b81aa60394484635f7249629e88a | 80bc337c091909b1dfd4b94d873598a59a6fdbdc | refs/heads/master | 2021-05-23T19:15:10.065318 | 2020-05-11T09:28:25 | 2020-05-11T09:28:25 | 253,431,422 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 218 | java | package com.minheum.app.repository;
import com.minheum.app.Entity.Language;
import org.springframework.data.jpa.repository.JpaRepository;
public interface LanguageRepository extends JpaRepository<Language, Long> {
}
| [
"[email protected]"
] | |
0e7f46a38b3b319d508f7edc1b7ae5d7ace38e27 | 191e63ed6283cdd8454aed37c32e79fde1031ca4 | /20. Web Service and RESTful/BlogManagerREST/src/main/java/com/codegym/blog/controller/model/Post.java | 849547aa6a3b14456efa56ce0a7d8f5dd47ffe5b | [] | no_license | nhatnpa2508/NhatModule02 | 095e3b898618d34d75395bbc8bf6e6a6749bd94d | 1fb19e26c40de4a5830e941e78e57330ed6bbe95 | refs/heads/master | 2022-12-22T15:40:46.324037 | 2019-08-19T07:34:09 | 2019-08-19T07:34:09 | 191,078,938 | 0 | 0 | null | 2022-12-16T09:43:46 | 2019-06-10T01:58:44 | CSS | UTF-8 | Java | false | false | 1,695 | java | /*
*************************************
* Created by IntelliJ IDEA *
* User: Nhat *
* Email: [email protected] *
* Date: 7/25/2019 *
* Time: 11:55 PM *
*************************************
*/
package com.codegym.blog.controller.model;
import javax.persistence.*;
@Entity
@Table(name="posts")
public class Post {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String title;
private String content;
private String author;
@ManyToOne
@JoinColumn(name = "category_id")
private Category category;
public Post() {
}
public Post(String title, String content, String author) {
this.title = title;
this.content = content;
this.author = author;
}
@Override
public String toString(){
return String.format("Post[id=%d,title='%s',content='%s',author='%s']",id, title,content,author);
}
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 getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
}
| [
"[email protected]"
] | |
d82a9f1cb95c594543bc66562ecb31acc855dfaa | f84b6f345115f63cd78562030299ccdafd1fef54 | /src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java | fe366bbf9678f87d635b5145806bb9381ae7807c | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | JordanField/connectedhomeip | 436bde7b804ffbbaafd254e3d782cabf569a8186 | 8dcf5d70cd54209511be6b1180156a00dd8e0cf8 | refs/heads/master | 2023-09-04T02:30:33.821611 | 2021-10-30T14:14:43 | 2021-10-30T14:14:43 | 423,137,284 | 0 | 0 | Apache-2.0 | 2021-10-31T12:08:08 | 2021-10-31T12:08:08 | null | UTF-8 | Java | false | false | 363,073 | java | /*
*
* Copyright (c) 2021 Project CHIP Authors
*
* 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 FILE IS GENERATED BY ZAP
package chip.devicecontroller;
import chip.clusterinfo.ClusterCommandCallback;
import chip.clusterinfo.ClusterInfo;
import chip.clusterinfo.CommandInfo;
import chip.clusterinfo.CommandParameterInfo;
import chip.clusterinfo.DelegatedClusterCallback;
import chip.devicecontroller.ChipClusters.DefaultClusterCallback;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class ClusterInfoMapping {
class DelegatedDefaultClusterCallback
implements DefaultClusterCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
// Parameters and list-adds here should be generated - refer to the template code that creates
// each callback interface.
@Override
public void onSuccess() {
List<Object> responseValues = new ArrayList<>();
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception e) {
callback.onFailure(e);
}
}
public class DelegatedGetSetupPINResponseCallback
implements ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(String setupPIN) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(setupPIN);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedLaunchAppResponseCallback
implements ChipClusters.ApplicationLauncherCluster.LaunchAppResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, String data) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(data);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedLaunchContentResponseCallback
implements ChipClusters.ContentLauncherCluster.LaunchContentResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(String data, int contentLaunchStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(data);
responseValues.add(contentLaunchStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedLaunchURLResponseCallback
implements ChipClusters.ContentLauncherCluster.LaunchURLResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(String data, int contentLaunchStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(data);
responseValues.add(contentLaunchStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedRetrieveLogsResponseCallback
implements ChipClusters.DiagnosticLogsCluster.RetrieveLogsResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, byte[] content, long timeStamp, long timeSinceBoot) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(content);
responseValues.add(timeStamp);
responseValues.add(timeSinceBoot);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearAllPinsResponseCallback
implements ChipClusters.DoorLockCluster.ClearAllPinsResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearAllRfidsResponseCallback
implements ChipClusters.DoorLockCluster.ClearAllRfidsResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearHolidayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.ClearHolidayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearPinResponseCallback
implements ChipClusters.DoorLockCluster.ClearPinResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearRfidResponseCallback
implements ChipClusters.DoorLockCluster.ClearRfidResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearWeekdayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.ClearWeekdayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedClearYeardayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.ClearYeardayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetHolidayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.GetHolidayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
int scheduleId,
int status,
long localStartTime,
long localEndTime,
int operatingModeDuringHoliday) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(scheduleId);
responseValues.add(status);
responseValues.add(localStartTime);
responseValues.add(localEndTime);
responseValues.add(operatingModeDuringHoliday);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetLogRecordResponseCallback
implements ChipClusters.DoorLockCluster.GetLogRecordResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
int logEntryId,
long timestamp,
int eventType,
int source,
int eventIdOrAlarmCode,
int userId,
byte[] pin) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(logEntryId);
responseValues.add(timestamp);
responseValues.add(eventType);
responseValues.add(source);
responseValues.add(eventIdOrAlarmCode);
responseValues.add(userId);
responseValues.add(pin);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetPinResponseCallback
implements ChipClusters.DoorLockCluster.GetPinResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int userId, int userStatus, int userType, byte[] pin) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(userId);
responseValues.add(userStatus);
responseValues.add(userType);
responseValues.add(pin);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetRfidResponseCallback
implements ChipClusters.DoorLockCluster.GetRfidResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int userId, int userStatus, int userType, byte[] rfid) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(userId);
responseValues.add(userStatus);
responseValues.add(userType);
responseValues.add(rfid);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetUserTypeResponseCallback
implements ChipClusters.DoorLockCluster.GetUserTypeResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int userId, int userType) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(userId);
responseValues.add(userType);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetWeekdayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.GetWeekdayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
int scheduleId,
int userId,
int status,
int daysMask,
int startHour,
int startMinute,
int endHour,
int endMinute) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(scheduleId);
responseValues.add(userId);
responseValues.add(status);
responseValues.add(daysMask);
responseValues.add(startHour);
responseValues.add(startMinute);
responseValues.add(endHour);
responseValues.add(endMinute);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetYeardayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.GetYeardayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
int scheduleId, int userId, int status, long localStartTime, long localEndTime) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(scheduleId);
responseValues.add(userId);
responseValues.add(status);
responseValues.add(localStartTime);
responseValues.add(localEndTime);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedLockDoorResponseCallback
implements ChipClusters.DoorLockCluster.LockDoorResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetHolidayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.SetHolidayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetPinResponseCallback
implements ChipClusters.DoorLockCluster.SetPinResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetRfidResponseCallback
implements ChipClusters.DoorLockCluster.SetRfidResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetUserTypeResponseCallback
implements ChipClusters.DoorLockCluster.SetUserTypeResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetWeekdayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.SetWeekdayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetYeardayScheduleResponseCallback
implements ChipClusters.DoorLockCluster.SetYeardayScheduleResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedUnlockDoorResponseCallback
implements ChipClusters.DoorLockCluster.UnlockDoorResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedUnlockWithTimeoutResponseCallback
implements ChipClusters.DoorLockCluster.UnlockWithTimeoutResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedArmFailSafeResponseCallback
implements ChipClusters.GeneralCommissioningCluster.ArmFailSafeResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedCommissioningCompleteResponseCallback
implements ChipClusters.GeneralCommissioningCluster.CommissioningCompleteResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSetRegulatoryConfigResponseCallback
implements ChipClusters.GeneralCommissioningCluster.SetRegulatoryConfigResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedAddGroupResponseCallback
implements ChipClusters.GroupsCluster.AddGroupResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetGroupMembershipResponseCallback
implements ChipClusters.GroupsCluster.GetGroupMembershipResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int capacity, int groupCount
// groupList: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(capacity);
responseValues.add(groupCount);
// groupList: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedRemoveGroupResponseCallback
implements ChipClusters.GroupsCluster.RemoveGroupResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedViewGroupResponseCallback
implements ChipClusters.GroupsCluster.ViewGroupResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId, String groupName) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
responseValues.add(groupName);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedIdentifyQueryResponseCallback
implements ChipClusters.IdentifyCluster.IdentifyQueryResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int timeout) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(timeout);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedSendKeyResponseCallback
implements ChipClusters.KeypadInputCluster.SendKeyResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaFastForwardResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaFastForwardResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaNextResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaNextResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaPauseResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaPauseResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaPlayResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaPlayResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaPreviousResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaPreviousResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaRewindResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaRewindResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaSeekResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaSeekResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaSkipBackwardResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaSkipBackwardResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaSkipForwardResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaSkipForwardResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaStartOverResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaStartOverResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedMediaStopResponseCallback
implements ChipClusters.MediaPlaybackCluster.MediaStopResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int mediaPlaybackStatus) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(mediaPlaybackStatus);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedAddThreadNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.AddThreadNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedAddWiFiNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.AddWiFiNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedDisableNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.DisableNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedEnableNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.EnableNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedRemoveNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.RemoveNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedScanNetworksResponseCallback
implements ChipClusters.NetworkCommissioningCluster.ScanNetworksResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText
// wifiScanResults: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
// threadScanResults: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
// wifiScanResults: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
// threadScanResults: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedUpdateThreadNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.UpdateThreadNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedUpdateWiFiNetworkResponseCallback
implements ChipClusters.NetworkCommissioningCluster.UpdateWiFiNetworkResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int errorCode, String debugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(errorCode);
responseValues.add(debugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedApplyUpdateRequestResponseCallback
implements ChipClusters.OtaSoftwareUpdateProviderCluster.ApplyUpdateRequestResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int action, long delayedActionTime) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(action);
responseValues.add(delayedActionTime);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedQueryImageResponseCallback
implements ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
int status,
long delayedActionTime,
String imageURI,
long softwareVersion,
String softwareVersionString,
byte[] updateToken,
boolean userConsentNeeded,
byte[] metadataForRequestor) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(delayedActionTime);
responseValues.add(imageURI);
responseValues.add(softwareVersion);
responseValues.add(softwareVersionString);
responseValues.add(updateToken);
responseValues.add(userConsentNeeded);
responseValues.add(metadataForRequestor);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedAttestationResponseCallback
implements ChipClusters.OperationalCredentialsCluster.AttestationResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(byte[] AttestationElements, byte[] Signature) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(AttestationElements);
responseValues.add(Signature);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedCertificateChainResponseCallback
implements ChipClusters.OperationalCredentialsCluster.CertificateChainResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(byte[] Certificate) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(Certificate);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedNOCResponseCallback
implements ChipClusters.OperationalCredentialsCluster.NOCResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int StatusCode, int FabricIndex, String DebugText) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(StatusCode);
responseValues.add(FabricIndex);
responseValues.add(DebugText);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedOpCSRResponseCallback
implements ChipClusters.OperationalCredentialsCluster.OpCSRResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(byte[] NOCSRElements, byte[] AttestationSignature) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(NOCSRElements);
responseValues.add(AttestationSignature);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedAddSceneResponseCallback
implements ChipClusters.ScenesCluster.AddSceneResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId, int sceneId) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
responseValues.add(sceneId);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedGetSceneMembershipResponseCallback
implements ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int capacity, int groupId, int sceneCount
// sceneList: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(capacity);
responseValues.add(groupId);
responseValues.add(sceneCount);
// sceneList: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedRemoveAllScenesResponseCallback
implements ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedRemoveSceneResponseCallback
implements ChipClusters.ScenesCluster.RemoveSceneResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId, int sceneId) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
responseValues.add(sceneId);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedStoreSceneResponseCallback
implements ChipClusters.ScenesCluster.StoreSceneResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId, int sceneId) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
responseValues.add(sceneId);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedViewSceneResponseCallback
implements ChipClusters.ScenesCluster.ViewSceneResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, int groupId, int sceneId, int transitionTime, String sceneName
// extensionFieldSets: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(groupId);
responseValues.add(sceneId);
responseValues.add(transitionTime);
responseValues.add(sceneName);
// extensionFieldSets: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedChangeChannelResponseCallback
implements ChipClusters.TvChannelCluster.ChangeChannelResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
// ChannelMatch: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
int ErrorType) {
List<Object> responseValues = new ArrayList<>();
// ChannelMatch: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
responseValues.add(ErrorType);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedNavigateTargetResponseCallback
implements ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int status, String data) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(status);
responseValues.add(data);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedTestAddArgumentsResponseCallback
implements ChipClusters.TestClusterCluster.TestAddArgumentsResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int returnValue) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(returnValue);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedTestEnumsResponseCallback
implements ChipClusters.TestClusterCluster.TestEnumsResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int arg1, int arg2) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(arg1);
responseValues.add(arg2);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedTestListInt8UReverseResponseCallback
implements ChipClusters.TestClusterCluster.TestListInt8UReverseResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(
// arg1: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
) {
List<Object> responseValues = new ArrayList<>();
// arg1: /* TYPE WARNING: array array defaults to */ uint8_t *
// Conversion from this type to Java is not properly implemented yet
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedTestNullableOptionalResponseCallback
implements ChipClusters.TestClusterCluster.TestNullableOptionalResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(boolean wasPresent, boolean wasNull, int value, int originalValue) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(wasPresent);
responseValues.add(wasNull);
responseValues.add(value);
responseValues.add(originalValue);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public class DelegatedTestSpecificResponseCallback
implements ChipClusters.TestClusterCluster.TestSpecificResponseCallback,
DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
public void setCallbackDelegate(ClusterCommandCallback callback) {
this.callback = callback;
}
@Override
public void onSuccess(int returnValue) {
List<Object> responseValues = new ArrayList<>();
responseValues.add(returnValue);
callback.onSuccess(responseValues);
}
@Override
public void onError(Exception error) {
callback.onFailure(error);
}
}
public Map<String, ClusterInfo> getClusterMap() {
Map<String, ClusterInfo> clusterMap = new HashMap<>();
Map<String, CommandInfo> accountLoginClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> accountLogingetSetupPINCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo accountLogingetSetupPINCommandParameterInfo =
new CommandParameterInfo(
"AccountLogin", ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback.class);
CommandParameterInfo accountLogingetSetupPINtempAccountIdentifierCommandParameterInfo =
new CommandParameterInfo("tempAccountIdentifier", String.class);
accountLogingetSetupPINCommandParams.put(
"tempAccountIdentifier", accountLogingetSetupPINtempAccountIdentifierCommandParameterInfo);
// Populate commands
CommandInfo accountLogingetSetupPINCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AccountLoginCluster) cluster)
.getSetupPIN(
(ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback) callback,
(String) commandArguments.get("tempAccountIdentifier"));
},
() -> new DelegatedGetSetupPINResponseCallback(),
accountLogingetSetupPINCommandParams);
accountLoginClusterCommandInfoMap.put("getSetupPIN", accountLogingetSetupPINCommandInfo);
Map<String, CommandParameterInfo> accountLoginloginCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo accountLoginloginCommandParameterInfo =
new CommandParameterInfo("AccountLogin", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo accountLoginlogintempAccountIdentifierCommandParameterInfo =
new CommandParameterInfo("tempAccountIdentifier", String.class);
accountLoginloginCommandParams.put(
"tempAccountIdentifier", accountLoginlogintempAccountIdentifierCommandParameterInfo);
CommandParameterInfo accountLoginloginsetupPINCommandParameterInfo =
new CommandParameterInfo("setupPIN", String.class);
accountLoginloginCommandParams.put("setupPIN", accountLoginloginsetupPINCommandParameterInfo);
// Populate commands
CommandInfo accountLoginloginCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AccountLoginCluster) cluster)
.login(
(DefaultClusterCallback) callback,
(String) commandArguments.get("tempAccountIdentifier"),
(String) commandArguments.get("setupPIN"));
},
() -> new DelegatedDefaultClusterCallback(),
accountLoginloginCommandParams);
accountLoginClusterCommandInfoMap.put("login", accountLoginloginCommandInfo);
// Populate cluster
ClusterInfo accountLoginClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.AccountLoginCluster(ptr, endpointId),
accountLoginClusterCommandInfoMap);
clusterMap.put("accountLogin", accountLoginClusterInfo);
Map<String, CommandInfo> administratorCommissioningClusterCommandInfoMap =
new LinkedHashMap<>();
Map<String, CommandParameterInfo>
administratorCommissioningopenBasicCommissioningWindowCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo
administratorCommissioningopenBasicCommissioningWindowCommandParameterInfo =
new CommandParameterInfo(
"AdministratorCommissioning", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
administratorCommissioningopenBasicCommissioningWindowcommissioningTimeoutCommandParameterInfo =
new CommandParameterInfo("commissioningTimeout", int.class);
administratorCommissioningopenBasicCommissioningWindowCommandParams.put(
"commissioningTimeout",
administratorCommissioningopenBasicCommissioningWindowcommissioningTimeoutCommandParameterInfo);
// Populate commands
CommandInfo administratorCommissioningopenBasicCommissioningWindowCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AdministratorCommissioningCluster) cluster)
.openBasicCommissioningWindow(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("commissioningTimeout"));
},
() -> new DelegatedDefaultClusterCallback(),
administratorCommissioningopenBasicCommissioningWindowCommandParams);
administratorCommissioningClusterCommandInfoMap.put(
"openBasicCommissioningWindow",
administratorCommissioningopenBasicCommissioningWindowCommandInfo);
Map<String, CommandParameterInfo>
administratorCommissioningopenCommissioningWindowCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo administratorCommissioningopenCommissioningWindowCommandParameterInfo =
new CommandParameterInfo(
"AdministratorCommissioning", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
administratorCommissioningopenCommissioningWindowcommissioningTimeoutCommandParameterInfo =
new CommandParameterInfo("commissioningTimeout", int.class);
administratorCommissioningopenCommissioningWindowCommandParams.put(
"commissioningTimeout",
administratorCommissioningopenCommissioningWindowcommissioningTimeoutCommandParameterInfo);
CommandParameterInfo
administratorCommissioningopenCommissioningWindowPAKEVerifierCommandParameterInfo =
new CommandParameterInfo("PAKEVerifier", byte[].class);
administratorCommissioningopenCommissioningWindowCommandParams.put(
"PAKEVerifier",
administratorCommissioningopenCommissioningWindowPAKEVerifierCommandParameterInfo);
CommandParameterInfo
administratorCommissioningopenCommissioningWindowdiscriminatorCommandParameterInfo =
new CommandParameterInfo("discriminator", int.class);
administratorCommissioningopenCommissioningWindowCommandParams.put(
"discriminator",
administratorCommissioningopenCommissioningWindowdiscriminatorCommandParameterInfo);
CommandParameterInfo
administratorCommissioningopenCommissioningWindowiterationsCommandParameterInfo =
new CommandParameterInfo("iterations", long.class);
administratorCommissioningopenCommissioningWindowCommandParams.put(
"iterations",
administratorCommissioningopenCommissioningWindowiterationsCommandParameterInfo);
CommandParameterInfo administratorCommissioningopenCommissioningWindowsaltCommandParameterInfo =
new CommandParameterInfo("salt", byte[].class);
administratorCommissioningopenCommissioningWindowCommandParams.put(
"salt", administratorCommissioningopenCommissioningWindowsaltCommandParameterInfo);
CommandParameterInfo
administratorCommissioningopenCommissioningWindowpasscodeIDCommandParameterInfo =
new CommandParameterInfo("passcodeID", int.class);
administratorCommissioningopenCommissioningWindowCommandParams.put(
"passcodeID",
administratorCommissioningopenCommissioningWindowpasscodeIDCommandParameterInfo);
// Populate commands
CommandInfo administratorCommissioningopenCommissioningWindowCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AdministratorCommissioningCluster) cluster)
.openCommissioningWindow(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("commissioningTimeout"),
(byte[]) commandArguments.get("PAKEVerifier"),
(Integer) commandArguments.get("discriminator"),
(Long) commandArguments.get("iterations"),
(byte[]) commandArguments.get("salt"),
(Integer) commandArguments.get("passcodeID"));
},
() -> new DelegatedDefaultClusterCallback(),
administratorCommissioningopenCommissioningWindowCommandParams);
administratorCommissioningClusterCommandInfoMap.put(
"openCommissioningWindow", administratorCommissioningopenCommissioningWindowCommandInfo);
Map<String, CommandParameterInfo> administratorCommissioningrevokeCommissioningCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo administratorCommissioningrevokeCommissioningCommandParameterInfo =
new CommandParameterInfo(
"AdministratorCommissioning", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo administratorCommissioningrevokeCommissioningCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AdministratorCommissioningCluster) cluster)
.revokeCommissioning((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
administratorCommissioningrevokeCommissioningCommandParams);
administratorCommissioningClusterCommandInfoMap.put(
"revokeCommissioning", administratorCommissioningrevokeCommissioningCommandInfo);
// Populate cluster
ClusterInfo administratorCommissioningClusterInfo =
new ClusterInfo(
(ptr, endpointId) ->
new ChipClusters.AdministratorCommissioningCluster(ptr, endpointId),
administratorCommissioningClusterCommandInfoMap);
clusterMap.put("administratorCommissioning", administratorCommissioningClusterInfo);
Map<String, CommandInfo> applicationBasicClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> applicationBasicchangeStatusCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo applicationBasicchangeStatusCommandParameterInfo =
new CommandParameterInfo("ApplicationBasic", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo applicationBasicchangeStatusstatusCommandParameterInfo =
new CommandParameterInfo("status", int.class);
applicationBasicchangeStatusCommandParams.put(
"status", applicationBasicchangeStatusstatusCommandParameterInfo);
// Populate commands
CommandInfo applicationBasicchangeStatusCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ApplicationBasicCluster) cluster)
.changeStatus(
(DefaultClusterCallback) callback, (Integer) commandArguments.get("status"));
},
() -> new DelegatedDefaultClusterCallback(),
applicationBasicchangeStatusCommandParams);
applicationBasicClusterCommandInfoMap.put(
"changeStatus", applicationBasicchangeStatusCommandInfo);
// Populate cluster
ClusterInfo applicationBasicClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ApplicationBasicCluster(ptr, endpointId),
applicationBasicClusterCommandInfoMap);
clusterMap.put("applicationBasic", applicationBasicClusterInfo);
Map<String, CommandInfo> applicationLauncherClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> applicationLauncherlaunchAppCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo applicationLauncherlaunchAppCommandParameterInfo =
new CommandParameterInfo(
"ApplicationLauncher",
ChipClusters.ApplicationLauncherCluster.LaunchAppResponseCallback.class);
CommandParameterInfo applicationLauncherlaunchAppdataCommandParameterInfo =
new CommandParameterInfo("data", String.class);
applicationLauncherlaunchAppCommandParams.put(
"data", applicationLauncherlaunchAppdataCommandParameterInfo);
CommandParameterInfo applicationLauncherlaunchAppcatalogVendorIdCommandParameterInfo =
new CommandParameterInfo("catalogVendorId", int.class);
applicationLauncherlaunchAppCommandParams.put(
"catalogVendorId", applicationLauncherlaunchAppcatalogVendorIdCommandParameterInfo);
CommandParameterInfo applicationLauncherlaunchAppapplicationIdCommandParameterInfo =
new CommandParameterInfo("applicationId", String.class);
applicationLauncherlaunchAppCommandParams.put(
"applicationId", applicationLauncherlaunchAppapplicationIdCommandParameterInfo);
// Populate commands
CommandInfo applicationLauncherlaunchAppCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ApplicationLauncherCluster) cluster)
.launchApp(
(ChipClusters.ApplicationLauncherCluster.LaunchAppResponseCallback) callback,
(String) commandArguments.get("data"),
(Integer) commandArguments.get("catalogVendorId"),
(String) commandArguments.get("applicationId"));
},
() -> new DelegatedLaunchAppResponseCallback(),
applicationLauncherlaunchAppCommandParams);
applicationLauncherClusterCommandInfoMap.put(
"launchApp", applicationLauncherlaunchAppCommandInfo);
// Populate cluster
ClusterInfo applicationLauncherClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ApplicationLauncherCluster(ptr, endpointId),
applicationLauncherClusterCommandInfoMap);
clusterMap.put("applicationLauncher", applicationLauncherClusterInfo);
Map<String, CommandInfo> audioOutputClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> audioOutputrenameOutputCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo audioOutputrenameOutputCommandParameterInfo =
new CommandParameterInfo("AudioOutput", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo audioOutputrenameOutputindexCommandParameterInfo =
new CommandParameterInfo("index", int.class);
audioOutputrenameOutputCommandParams.put(
"index", audioOutputrenameOutputindexCommandParameterInfo);
CommandParameterInfo audioOutputrenameOutputnameCommandParameterInfo =
new CommandParameterInfo("name", String.class);
audioOutputrenameOutputCommandParams.put(
"name", audioOutputrenameOutputnameCommandParameterInfo);
// Populate commands
CommandInfo audioOutputrenameOutputCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AudioOutputCluster) cluster)
.renameOutput(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("index"),
(String) commandArguments.get("name"));
},
() -> new DelegatedDefaultClusterCallback(),
audioOutputrenameOutputCommandParams);
audioOutputClusterCommandInfoMap.put("renameOutput", audioOutputrenameOutputCommandInfo);
Map<String, CommandParameterInfo> audioOutputselectOutputCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo audioOutputselectOutputCommandParameterInfo =
new CommandParameterInfo("AudioOutput", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo audioOutputselectOutputindexCommandParameterInfo =
new CommandParameterInfo("index", int.class);
audioOutputselectOutputCommandParams.put(
"index", audioOutputselectOutputindexCommandParameterInfo);
// Populate commands
CommandInfo audioOutputselectOutputCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.AudioOutputCluster) cluster)
.selectOutput(
(DefaultClusterCallback) callback, (Integer) commandArguments.get("index"));
},
() -> new DelegatedDefaultClusterCallback(),
audioOutputselectOutputCommandParams);
audioOutputClusterCommandInfoMap.put("selectOutput", audioOutputselectOutputCommandInfo);
// Populate cluster
ClusterInfo audioOutputClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.AudioOutputCluster(ptr, endpointId),
audioOutputClusterCommandInfoMap);
clusterMap.put("audioOutput", audioOutputClusterInfo);
Map<String, CommandInfo> barrierControlClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> barrierControlbarrierControlGoToPercentCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo barrierControlbarrierControlGoToPercentCommandParameterInfo =
new CommandParameterInfo("BarrierControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo barrierControlbarrierControlGoToPercentpercentOpenCommandParameterInfo =
new CommandParameterInfo("percentOpen", int.class);
barrierControlbarrierControlGoToPercentCommandParams.put(
"percentOpen", barrierControlbarrierControlGoToPercentpercentOpenCommandParameterInfo);
// Populate commands
CommandInfo barrierControlbarrierControlGoToPercentCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BarrierControlCluster) cluster)
.barrierControlGoToPercent(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("percentOpen"));
},
() -> new DelegatedDefaultClusterCallback(),
barrierControlbarrierControlGoToPercentCommandParams);
barrierControlClusterCommandInfoMap.put(
"barrierControlGoToPercent", barrierControlbarrierControlGoToPercentCommandInfo);
Map<String, CommandParameterInfo> barrierControlbarrierControlStopCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo barrierControlbarrierControlStopCommandParameterInfo =
new CommandParameterInfo("BarrierControl", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo barrierControlbarrierControlStopCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BarrierControlCluster) cluster)
.barrierControlStop((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
barrierControlbarrierControlStopCommandParams);
barrierControlClusterCommandInfoMap.put(
"barrierControlStop", barrierControlbarrierControlStopCommandInfo);
// Populate cluster
ClusterInfo barrierControlClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BarrierControlCluster(ptr, endpointId),
barrierControlClusterCommandInfoMap);
clusterMap.put("barrierControl", barrierControlClusterInfo);
Map<String, CommandInfo> basicClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> basicmfgSpecificPingCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo basicmfgSpecificPingCommandParameterInfo =
new CommandParameterInfo("Basic", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo basicmfgSpecificPingCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BasicCluster) cluster)
.mfgSpecificPing((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
basicmfgSpecificPingCommandParams);
basicClusterCommandInfoMap.put("mfgSpecificPing", basicmfgSpecificPingCommandInfo);
// Populate cluster
ClusterInfo basicClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BasicCluster(ptr, endpointId),
basicClusterCommandInfoMap);
clusterMap.put("basic", basicClusterInfo);
Map<String, CommandInfo> binaryInputBasicClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo binaryInputBasicClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BinaryInputBasicCluster(ptr, endpointId),
binaryInputBasicClusterCommandInfoMap);
clusterMap.put("binaryInputBasic", binaryInputBasicClusterInfo);
Map<String, CommandInfo> bindingClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> bindingbindCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bindingbindCommandParameterInfo =
new CommandParameterInfo("Binding", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bindingbindnodeIdCommandParameterInfo =
new CommandParameterInfo("nodeId", long.class);
bindingbindCommandParams.put("nodeId", bindingbindnodeIdCommandParameterInfo);
CommandParameterInfo bindingbindgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
bindingbindCommandParams.put("groupId", bindingbindgroupIdCommandParameterInfo);
CommandParameterInfo bindingbindendpointIdCommandParameterInfo =
new CommandParameterInfo("endpointId", int.class);
bindingbindCommandParams.put("endpointId", bindingbindendpointIdCommandParameterInfo);
CommandParameterInfo bindingbindclusterIdCommandParameterInfo =
new CommandParameterInfo("clusterId", long.class);
bindingbindCommandParams.put("clusterId", bindingbindclusterIdCommandParameterInfo);
// Populate commands
CommandInfo bindingbindCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BindingCluster) cluster)
.bind(
(DefaultClusterCallback) callback,
(Long) commandArguments.get("nodeId"),
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("endpointId"),
(Long) commandArguments.get("clusterId"));
},
() -> new DelegatedDefaultClusterCallback(),
bindingbindCommandParams);
bindingClusterCommandInfoMap.put("bind", bindingbindCommandInfo);
Map<String, CommandParameterInfo> bindingunbindCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bindingunbindCommandParameterInfo =
new CommandParameterInfo("Binding", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bindingunbindnodeIdCommandParameterInfo =
new CommandParameterInfo("nodeId", long.class);
bindingunbindCommandParams.put("nodeId", bindingunbindnodeIdCommandParameterInfo);
CommandParameterInfo bindingunbindgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
bindingunbindCommandParams.put("groupId", bindingunbindgroupIdCommandParameterInfo);
CommandParameterInfo bindingunbindendpointIdCommandParameterInfo =
new CommandParameterInfo("endpointId", int.class);
bindingunbindCommandParams.put("endpointId", bindingunbindendpointIdCommandParameterInfo);
CommandParameterInfo bindingunbindclusterIdCommandParameterInfo =
new CommandParameterInfo("clusterId", long.class);
bindingunbindCommandParams.put("clusterId", bindingunbindclusterIdCommandParameterInfo);
// Populate commands
CommandInfo bindingunbindCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BindingCluster) cluster)
.unbind(
(DefaultClusterCallback) callback,
(Long) commandArguments.get("nodeId"),
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("endpointId"),
(Long) commandArguments.get("clusterId"));
},
() -> new DelegatedDefaultClusterCallback(),
bindingunbindCommandParams);
bindingClusterCommandInfoMap.put("unbind", bindingunbindCommandInfo);
// Populate cluster
ClusterInfo bindingClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BindingCluster(ptr, endpointId),
bindingClusterCommandInfoMap);
clusterMap.put("binding", bindingClusterInfo);
Map<String, CommandInfo> booleanStateClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo booleanStateClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BooleanStateCluster(ptr, endpointId),
booleanStateClusterCommandInfoMap);
clusterMap.put("booleanState", booleanStateClusterInfo);
Map<String, CommandInfo> bridgedActionsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> bridgedActionsdisableActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsdisableActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsdisableActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsdisableActionCommandParams.put(
"actionID", bridgedActionsdisableActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsdisableActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsdisableActionCommandParams.put(
"invokeID", bridgedActionsdisableActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsdisableActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.disableAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsdisableActionCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"disableAction", bridgedActionsdisableActionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsdisableActionWithDurationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsdisableActionWithDurationCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsdisableActionWithDurationactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsdisableActionWithDurationCommandParams.put(
"actionID", bridgedActionsdisableActionWithDurationactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsdisableActionWithDurationinvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsdisableActionWithDurationCommandParams.put(
"invokeID", bridgedActionsdisableActionWithDurationinvokeIDCommandParameterInfo);
CommandParameterInfo bridgedActionsdisableActionWithDurationdurationCommandParameterInfo =
new CommandParameterInfo("duration", long.class);
bridgedActionsdisableActionWithDurationCommandParams.put(
"duration", bridgedActionsdisableActionWithDurationdurationCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsdisableActionWithDurationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.disableActionWithDuration(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"),
(Long) commandArguments.get("duration"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsdisableActionWithDurationCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"disableActionWithDuration", bridgedActionsdisableActionWithDurationCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsenableActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsenableActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsenableActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsenableActionCommandParams.put(
"actionID", bridgedActionsenableActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsenableActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsenableActionCommandParams.put(
"invokeID", bridgedActionsenableActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsenableActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.enableAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsenableActionCommandParams);
bridgedActionsClusterCommandInfoMap.put("enableAction", bridgedActionsenableActionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsenableActionWithDurationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsenableActionWithDurationCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsenableActionWithDurationactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsenableActionWithDurationCommandParams.put(
"actionID", bridgedActionsenableActionWithDurationactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsenableActionWithDurationinvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsenableActionWithDurationCommandParams.put(
"invokeID", bridgedActionsenableActionWithDurationinvokeIDCommandParameterInfo);
CommandParameterInfo bridgedActionsenableActionWithDurationdurationCommandParameterInfo =
new CommandParameterInfo("duration", long.class);
bridgedActionsenableActionWithDurationCommandParams.put(
"duration", bridgedActionsenableActionWithDurationdurationCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsenableActionWithDurationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.enableActionWithDuration(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"),
(Long) commandArguments.get("duration"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsenableActionWithDurationCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"enableActionWithDuration", bridgedActionsenableActionWithDurationCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsinstantActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsinstantActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsinstantActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsinstantActionCommandParams.put(
"actionID", bridgedActionsinstantActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsinstantActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsinstantActionCommandParams.put(
"invokeID", bridgedActionsinstantActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsinstantActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.instantAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsinstantActionCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"instantAction", bridgedActionsinstantActionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsinstantActionWithTransitionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsinstantActionWithTransitionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsinstantActionWithTransitionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsinstantActionWithTransitionCommandParams.put(
"actionID", bridgedActionsinstantActionWithTransitionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsinstantActionWithTransitioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsinstantActionWithTransitionCommandParams.put(
"invokeID", bridgedActionsinstantActionWithTransitioninvokeIDCommandParameterInfo);
CommandParameterInfo
bridgedActionsinstantActionWithTransitiontransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
bridgedActionsinstantActionWithTransitionCommandParams.put(
"transitionTime",
bridgedActionsinstantActionWithTransitiontransitionTimeCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsinstantActionWithTransitionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.instantActionWithTransition(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"),
(Integer) commandArguments.get("transitionTime"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsinstantActionWithTransitionCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"instantActionWithTransition", bridgedActionsinstantActionWithTransitionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionspauseActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionspauseActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionspauseActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionspauseActionCommandParams.put(
"actionID", bridgedActionspauseActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionspauseActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionspauseActionCommandParams.put(
"invokeID", bridgedActionspauseActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionspauseActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.pauseAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionspauseActionCommandParams);
bridgedActionsClusterCommandInfoMap.put("pauseAction", bridgedActionspauseActionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionspauseActionWithDurationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionspauseActionWithDurationCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionspauseActionWithDurationactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionspauseActionWithDurationCommandParams.put(
"actionID", bridgedActionspauseActionWithDurationactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionspauseActionWithDurationinvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionspauseActionWithDurationCommandParams.put(
"invokeID", bridgedActionspauseActionWithDurationinvokeIDCommandParameterInfo);
CommandParameterInfo bridgedActionspauseActionWithDurationdurationCommandParameterInfo =
new CommandParameterInfo("duration", long.class);
bridgedActionspauseActionWithDurationCommandParams.put(
"duration", bridgedActionspauseActionWithDurationdurationCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionspauseActionWithDurationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.pauseActionWithDuration(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"),
(Long) commandArguments.get("duration"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionspauseActionWithDurationCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"pauseActionWithDuration", bridgedActionspauseActionWithDurationCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsresumeActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsresumeActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsresumeActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsresumeActionCommandParams.put(
"actionID", bridgedActionsresumeActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsresumeActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsresumeActionCommandParams.put(
"invokeID", bridgedActionsresumeActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsresumeActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.resumeAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsresumeActionCommandParams);
bridgedActionsClusterCommandInfoMap.put("resumeAction", bridgedActionsresumeActionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsstartActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsstartActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsstartActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsstartActionCommandParams.put(
"actionID", bridgedActionsstartActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsstartActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsstartActionCommandParams.put(
"invokeID", bridgedActionsstartActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsstartActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.startAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsstartActionCommandParams);
bridgedActionsClusterCommandInfoMap.put("startAction", bridgedActionsstartActionCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsstartActionWithDurationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsstartActionWithDurationCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsstartActionWithDurationactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsstartActionWithDurationCommandParams.put(
"actionID", bridgedActionsstartActionWithDurationactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsstartActionWithDurationinvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsstartActionWithDurationCommandParams.put(
"invokeID", bridgedActionsstartActionWithDurationinvokeIDCommandParameterInfo);
CommandParameterInfo bridgedActionsstartActionWithDurationdurationCommandParameterInfo =
new CommandParameterInfo("duration", long.class);
bridgedActionsstartActionWithDurationCommandParams.put(
"duration", bridgedActionsstartActionWithDurationdurationCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsstartActionWithDurationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.startActionWithDuration(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"),
(Long) commandArguments.get("duration"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsstartActionWithDurationCommandParams);
bridgedActionsClusterCommandInfoMap.put(
"startActionWithDuration", bridgedActionsstartActionWithDurationCommandInfo);
Map<String, CommandParameterInfo> bridgedActionsstopActionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo bridgedActionsstopActionCommandParameterInfo =
new CommandParameterInfo("BridgedActions", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo bridgedActionsstopActionactionIDCommandParameterInfo =
new CommandParameterInfo("actionID", int.class);
bridgedActionsstopActionCommandParams.put(
"actionID", bridgedActionsstopActionactionIDCommandParameterInfo);
CommandParameterInfo bridgedActionsstopActioninvokeIDCommandParameterInfo =
new CommandParameterInfo("invokeID", long.class);
bridgedActionsstopActionCommandParams.put(
"invokeID", bridgedActionsstopActioninvokeIDCommandParameterInfo);
// Populate commands
CommandInfo bridgedActionsstopActionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.BridgedActionsCluster) cluster)
.stopAction(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("actionID"),
(Long) commandArguments.get("invokeID"));
},
() -> new DelegatedDefaultClusterCallback(),
bridgedActionsstopActionCommandParams);
bridgedActionsClusterCommandInfoMap.put("stopAction", bridgedActionsstopActionCommandInfo);
// Populate cluster
ClusterInfo bridgedActionsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BridgedActionsCluster(ptr, endpointId),
bridgedActionsClusterCommandInfoMap);
clusterMap.put("bridgedActions", bridgedActionsClusterInfo);
Map<String, CommandInfo> bridgedDeviceBasicClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo bridgedDeviceBasicClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.BridgedDeviceBasicCluster(ptr, endpointId),
bridgedDeviceBasicClusterCommandInfoMap);
clusterMap.put("bridgedDeviceBasic", bridgedDeviceBasicClusterInfo);
Map<String, CommandInfo> colorControlClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> colorControlcolorLoopSetCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlcolorLoopSetCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlcolorLoopSetupdateFlagsCommandParameterInfo =
new CommandParameterInfo("updateFlags", int.class);
colorControlcolorLoopSetCommandParams.put(
"updateFlags", colorControlcolorLoopSetupdateFlagsCommandParameterInfo);
CommandParameterInfo colorControlcolorLoopSetactionCommandParameterInfo =
new CommandParameterInfo("action", int.class);
colorControlcolorLoopSetCommandParams.put(
"action", colorControlcolorLoopSetactionCommandParameterInfo);
CommandParameterInfo colorControlcolorLoopSetdirectionCommandParameterInfo =
new CommandParameterInfo("direction", int.class);
colorControlcolorLoopSetCommandParams.put(
"direction", colorControlcolorLoopSetdirectionCommandParameterInfo);
CommandParameterInfo colorControlcolorLoopSettimeCommandParameterInfo =
new CommandParameterInfo("time", int.class);
colorControlcolorLoopSetCommandParams.put(
"time", colorControlcolorLoopSettimeCommandParameterInfo);
CommandParameterInfo colorControlcolorLoopSetstartHueCommandParameterInfo =
new CommandParameterInfo("startHue", int.class);
colorControlcolorLoopSetCommandParams.put(
"startHue", colorControlcolorLoopSetstartHueCommandParameterInfo);
CommandParameterInfo colorControlcolorLoopSetoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlcolorLoopSetCommandParams.put(
"optionsMask", colorControlcolorLoopSetoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlcolorLoopSetoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlcolorLoopSetCommandParams.put(
"optionsOverride", colorControlcolorLoopSetoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlcolorLoopSetCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.colorLoopSet(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("updateFlags"),
(Integer) commandArguments.get("action"),
(Integer) commandArguments.get("direction"),
(Integer) commandArguments.get("time"),
(Integer) commandArguments.get("startHue"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlcolorLoopSetCommandParams);
colorControlClusterCommandInfoMap.put("colorLoopSet", colorControlcolorLoopSetCommandInfo);
Map<String, CommandParameterInfo> colorControlenhancedMoveHueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlenhancedMoveHueCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlenhancedMoveHuemoveModeCommandParameterInfo =
new CommandParameterInfo("moveMode", int.class);
colorControlenhancedMoveHueCommandParams.put(
"moveMode", colorControlenhancedMoveHuemoveModeCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveHuerateCommandParameterInfo =
new CommandParameterInfo("rate", int.class);
colorControlenhancedMoveHueCommandParams.put(
"rate", colorControlenhancedMoveHuerateCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveHueoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlenhancedMoveHueCommandParams.put(
"optionsMask", colorControlenhancedMoveHueoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlenhancedMoveHueCommandParams.put(
"optionsOverride", colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlenhancedMoveHueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.enhancedMoveHue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("moveMode"),
(Integer) commandArguments.get("rate"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlenhancedMoveHueCommandParams);
colorControlClusterCommandInfoMap.put(
"enhancedMoveHue", colorControlenhancedMoveHueCommandInfo);
Map<String, CommandParameterInfo> colorControlenhancedMoveToHueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlenhancedMoveToHueCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlenhancedMoveToHueenhancedHueCommandParameterInfo =
new CommandParameterInfo("enhancedHue", int.class);
colorControlenhancedMoveToHueCommandParams.put(
"enhancedHue", colorControlenhancedMoveToHueenhancedHueCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveToHuedirectionCommandParameterInfo =
new CommandParameterInfo("direction", int.class);
colorControlenhancedMoveToHueCommandParams.put(
"direction", colorControlenhancedMoveToHuedirectionCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlenhancedMoveToHueCommandParams.put(
"transitionTime", colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlenhancedMoveToHueCommandParams.put(
"optionsMask", colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlenhancedMoveToHueCommandParams.put(
"optionsOverride", colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlenhancedMoveToHueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.enhancedMoveToHue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("enhancedHue"),
(Integer) commandArguments.get("direction"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlenhancedMoveToHueCommandParams);
colorControlClusterCommandInfoMap.put(
"enhancedMoveToHue", colorControlenhancedMoveToHueCommandInfo);
Map<String, CommandParameterInfo> colorControlenhancedMoveToHueAndSaturationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlenhancedMoveToHueAndSaturationCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo =
new CommandParameterInfo("enhancedHue", int.class);
colorControlenhancedMoveToHueAndSaturationCommandParams.put(
"enhancedHue", colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo =
new CommandParameterInfo("saturation", int.class);
colorControlenhancedMoveToHueAndSaturationCommandParams.put(
"saturation", colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo);
CommandParameterInfo
colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlenhancedMoveToHueAndSaturationCommandParams.put(
"transitionTime",
colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlenhancedMoveToHueAndSaturationCommandParams.put(
"optionsMask", colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo);
CommandParameterInfo
colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlenhancedMoveToHueAndSaturationCommandParams.put(
"optionsOverride",
colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlenhancedMoveToHueAndSaturationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.enhancedMoveToHueAndSaturation(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("enhancedHue"),
(Integer) commandArguments.get("saturation"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlenhancedMoveToHueAndSaturationCommandParams);
colorControlClusterCommandInfoMap.put(
"enhancedMoveToHueAndSaturation", colorControlenhancedMoveToHueAndSaturationCommandInfo);
Map<String, CommandParameterInfo> colorControlenhancedStepHueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlenhancedStepHueCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlenhancedStepHuestepModeCommandParameterInfo =
new CommandParameterInfo("stepMode", int.class);
colorControlenhancedStepHueCommandParams.put(
"stepMode", colorControlenhancedStepHuestepModeCommandParameterInfo);
CommandParameterInfo colorControlenhancedStepHuestepSizeCommandParameterInfo =
new CommandParameterInfo("stepSize", int.class);
colorControlenhancedStepHueCommandParams.put(
"stepSize", colorControlenhancedStepHuestepSizeCommandParameterInfo);
CommandParameterInfo colorControlenhancedStepHuetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlenhancedStepHueCommandParams.put(
"transitionTime", colorControlenhancedStepHuetransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlenhancedStepHueoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlenhancedStepHueCommandParams.put(
"optionsMask", colorControlenhancedStepHueoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlenhancedStepHueoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlenhancedStepHueCommandParams.put(
"optionsOverride", colorControlenhancedStepHueoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlenhancedStepHueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.enhancedStepHue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepMode"),
(Integer) commandArguments.get("stepSize"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlenhancedStepHueCommandParams);
colorControlClusterCommandInfoMap.put(
"enhancedStepHue", colorControlenhancedStepHueCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveColorCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveColorCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveColorrateXCommandParameterInfo =
new CommandParameterInfo("rateX", int.class);
colorControlmoveColorCommandParams.put("rateX", colorControlmoveColorrateXCommandParameterInfo);
CommandParameterInfo colorControlmoveColorrateYCommandParameterInfo =
new CommandParameterInfo("rateY", int.class);
colorControlmoveColorCommandParams.put("rateY", colorControlmoveColorrateYCommandParameterInfo);
CommandParameterInfo colorControlmoveColoroptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveColorCommandParams.put(
"optionsMask", colorControlmoveColoroptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveColoroptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveColorCommandParams.put(
"optionsOverride", colorControlmoveColoroptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveColorCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveColor(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("rateX"),
(Integer) commandArguments.get("rateY"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveColorCommandParams);
colorControlClusterCommandInfoMap.put("moveColor", colorControlmoveColorCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveColorTemperatureCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveColorTemperatureCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveColorTemperaturemoveModeCommandParameterInfo =
new CommandParameterInfo("moveMode", int.class);
colorControlmoveColorTemperatureCommandParams.put(
"moveMode", colorControlmoveColorTemperaturemoveModeCommandParameterInfo);
CommandParameterInfo colorControlmoveColorTemperaturerateCommandParameterInfo =
new CommandParameterInfo("rate", int.class);
colorControlmoveColorTemperatureCommandParams.put(
"rate", colorControlmoveColorTemperaturerateCommandParameterInfo);
CommandParameterInfo
colorControlmoveColorTemperaturecolorTemperatureMinimumCommandParameterInfo =
new CommandParameterInfo("colorTemperatureMinimum", int.class);
colorControlmoveColorTemperatureCommandParams.put(
"colorTemperatureMinimum",
colorControlmoveColorTemperaturecolorTemperatureMinimumCommandParameterInfo);
CommandParameterInfo
colorControlmoveColorTemperaturecolorTemperatureMaximumCommandParameterInfo =
new CommandParameterInfo("colorTemperatureMaximum", int.class);
colorControlmoveColorTemperatureCommandParams.put(
"colorTemperatureMaximum",
colorControlmoveColorTemperaturecolorTemperatureMaximumCommandParameterInfo);
CommandParameterInfo colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveColorTemperatureCommandParams.put(
"optionsMask", colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveColorTemperatureCommandParams.put(
"optionsOverride", colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveColorTemperatureCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveColorTemperature(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("moveMode"),
(Integer) commandArguments.get("rate"),
(Integer) commandArguments.get("colorTemperatureMinimum"),
(Integer) commandArguments.get("colorTemperatureMaximum"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveColorTemperatureCommandParams);
colorControlClusterCommandInfoMap.put(
"moveColorTemperature", colorControlmoveColorTemperatureCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveHueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveHueCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveHuemoveModeCommandParameterInfo =
new CommandParameterInfo("moveMode", int.class);
colorControlmoveHueCommandParams.put(
"moveMode", colorControlmoveHuemoveModeCommandParameterInfo);
CommandParameterInfo colorControlmoveHuerateCommandParameterInfo =
new CommandParameterInfo("rate", int.class);
colorControlmoveHueCommandParams.put("rate", colorControlmoveHuerateCommandParameterInfo);
CommandParameterInfo colorControlmoveHueoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveHueCommandParams.put(
"optionsMask", colorControlmoveHueoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveHueoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveHueCommandParams.put(
"optionsOverride", colorControlmoveHueoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveHueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveHue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("moveMode"),
(Integer) commandArguments.get("rate"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveHueCommandParams);
colorControlClusterCommandInfoMap.put("moveHue", colorControlmoveHueCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveSaturationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveSaturationCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveSaturationmoveModeCommandParameterInfo =
new CommandParameterInfo("moveMode", int.class);
colorControlmoveSaturationCommandParams.put(
"moveMode", colorControlmoveSaturationmoveModeCommandParameterInfo);
CommandParameterInfo colorControlmoveSaturationrateCommandParameterInfo =
new CommandParameterInfo("rate", int.class);
colorControlmoveSaturationCommandParams.put(
"rate", colorControlmoveSaturationrateCommandParameterInfo);
CommandParameterInfo colorControlmoveSaturationoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveSaturationCommandParams.put(
"optionsMask", colorControlmoveSaturationoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveSaturationoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveSaturationCommandParams.put(
"optionsOverride", colorControlmoveSaturationoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveSaturationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveSaturation(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("moveMode"),
(Integer) commandArguments.get("rate"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveSaturationCommandParams);
colorControlClusterCommandInfoMap.put("moveSaturation", colorControlmoveSaturationCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveToColorCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveToColorCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveToColorcolorXCommandParameterInfo =
new CommandParameterInfo("colorX", int.class);
colorControlmoveToColorCommandParams.put(
"colorX", colorControlmoveToColorcolorXCommandParameterInfo);
CommandParameterInfo colorControlmoveToColorcolorYCommandParameterInfo =
new CommandParameterInfo("colorY", int.class);
colorControlmoveToColorCommandParams.put(
"colorY", colorControlmoveToColorcolorYCommandParameterInfo);
CommandParameterInfo colorControlmoveToColortransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlmoveToColorCommandParams.put(
"transitionTime", colorControlmoveToColortransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlmoveToColoroptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveToColorCommandParams.put(
"optionsMask", colorControlmoveToColoroptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveToColoroptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveToColorCommandParams.put(
"optionsOverride", colorControlmoveToColoroptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveToColorCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveToColor(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("colorX"),
(Integer) commandArguments.get("colorY"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveToColorCommandParams);
colorControlClusterCommandInfoMap.put("moveToColor", colorControlmoveToColorCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveToColorTemperatureCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveToColorTemperatureCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveToColorTemperaturecolorTemperatureCommandParameterInfo =
new CommandParameterInfo("colorTemperature", int.class);
colorControlmoveToColorTemperatureCommandParams.put(
"colorTemperature", colorControlmoveToColorTemperaturecolorTemperatureCommandParameterInfo);
CommandParameterInfo colorControlmoveToColorTemperaturetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlmoveToColorTemperatureCommandParams.put(
"transitionTime", colorControlmoveToColorTemperaturetransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlmoveToColorTemperatureoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveToColorTemperatureCommandParams.put(
"optionsMask", colorControlmoveToColorTemperatureoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveToColorTemperatureoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveToColorTemperatureCommandParams.put(
"optionsOverride", colorControlmoveToColorTemperatureoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveToColorTemperatureCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveToColorTemperature(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("colorTemperature"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveToColorTemperatureCommandParams);
colorControlClusterCommandInfoMap.put(
"moveToColorTemperature", colorControlmoveToColorTemperatureCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveToHueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveToHueCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveToHuehueCommandParameterInfo =
new CommandParameterInfo("hue", int.class);
colorControlmoveToHueCommandParams.put("hue", colorControlmoveToHuehueCommandParameterInfo);
CommandParameterInfo colorControlmoveToHuedirectionCommandParameterInfo =
new CommandParameterInfo("direction", int.class);
colorControlmoveToHueCommandParams.put(
"direction", colorControlmoveToHuedirectionCommandParameterInfo);
CommandParameterInfo colorControlmoveToHuetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlmoveToHueCommandParams.put(
"transitionTime", colorControlmoveToHuetransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlmoveToHueoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveToHueCommandParams.put(
"optionsMask", colorControlmoveToHueoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveToHueoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveToHueCommandParams.put(
"optionsOverride", colorControlmoveToHueoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveToHueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveToHue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("hue"),
(Integer) commandArguments.get("direction"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveToHueCommandParams);
colorControlClusterCommandInfoMap.put("moveToHue", colorControlmoveToHueCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveToHueAndSaturationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveToHueAndSaturationCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveToHueAndSaturationhueCommandParameterInfo =
new CommandParameterInfo("hue", int.class);
colorControlmoveToHueAndSaturationCommandParams.put(
"hue", colorControlmoveToHueAndSaturationhueCommandParameterInfo);
CommandParameterInfo colorControlmoveToHueAndSaturationsaturationCommandParameterInfo =
new CommandParameterInfo("saturation", int.class);
colorControlmoveToHueAndSaturationCommandParams.put(
"saturation", colorControlmoveToHueAndSaturationsaturationCommandParameterInfo);
CommandParameterInfo colorControlmoveToHueAndSaturationtransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlmoveToHueAndSaturationCommandParams.put(
"transitionTime", colorControlmoveToHueAndSaturationtransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlmoveToHueAndSaturationoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveToHueAndSaturationCommandParams.put(
"optionsMask", colorControlmoveToHueAndSaturationoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveToHueAndSaturationoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveToHueAndSaturationCommandParams.put(
"optionsOverride", colorControlmoveToHueAndSaturationoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveToHueAndSaturationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveToHueAndSaturation(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("hue"),
(Integer) commandArguments.get("saturation"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveToHueAndSaturationCommandParams);
colorControlClusterCommandInfoMap.put(
"moveToHueAndSaturation", colorControlmoveToHueAndSaturationCommandInfo);
Map<String, CommandParameterInfo> colorControlmoveToSaturationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlmoveToSaturationCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlmoveToSaturationsaturationCommandParameterInfo =
new CommandParameterInfo("saturation", int.class);
colorControlmoveToSaturationCommandParams.put(
"saturation", colorControlmoveToSaturationsaturationCommandParameterInfo);
CommandParameterInfo colorControlmoveToSaturationtransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlmoveToSaturationCommandParams.put(
"transitionTime", colorControlmoveToSaturationtransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlmoveToSaturationoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlmoveToSaturationCommandParams.put(
"optionsMask", colorControlmoveToSaturationoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlmoveToSaturationoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlmoveToSaturationCommandParams.put(
"optionsOverride", colorControlmoveToSaturationoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlmoveToSaturationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.moveToSaturation(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("saturation"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlmoveToSaturationCommandParams);
colorControlClusterCommandInfoMap.put(
"moveToSaturation", colorControlmoveToSaturationCommandInfo);
Map<String, CommandParameterInfo> colorControlstepColorCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlstepColorCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlstepColorstepXCommandParameterInfo =
new CommandParameterInfo("stepX", int.class);
colorControlstepColorCommandParams.put("stepX", colorControlstepColorstepXCommandParameterInfo);
CommandParameterInfo colorControlstepColorstepYCommandParameterInfo =
new CommandParameterInfo("stepY", int.class);
colorControlstepColorCommandParams.put("stepY", colorControlstepColorstepYCommandParameterInfo);
CommandParameterInfo colorControlstepColortransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlstepColorCommandParams.put(
"transitionTime", colorControlstepColortransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlstepColoroptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlstepColorCommandParams.put(
"optionsMask", colorControlstepColoroptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlstepColoroptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlstepColorCommandParams.put(
"optionsOverride", colorControlstepColoroptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlstepColorCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.stepColor(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepX"),
(Integer) commandArguments.get("stepY"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlstepColorCommandParams);
colorControlClusterCommandInfoMap.put("stepColor", colorControlstepColorCommandInfo);
Map<String, CommandParameterInfo> colorControlstepColorTemperatureCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlstepColorTemperatureCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlstepColorTemperaturestepModeCommandParameterInfo =
new CommandParameterInfo("stepMode", int.class);
colorControlstepColorTemperatureCommandParams.put(
"stepMode", colorControlstepColorTemperaturestepModeCommandParameterInfo);
CommandParameterInfo colorControlstepColorTemperaturestepSizeCommandParameterInfo =
new CommandParameterInfo("stepSize", int.class);
colorControlstepColorTemperatureCommandParams.put(
"stepSize", colorControlstepColorTemperaturestepSizeCommandParameterInfo);
CommandParameterInfo colorControlstepColorTemperaturetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlstepColorTemperatureCommandParams.put(
"transitionTime", colorControlstepColorTemperaturetransitionTimeCommandParameterInfo);
CommandParameterInfo
colorControlstepColorTemperaturecolorTemperatureMinimumCommandParameterInfo =
new CommandParameterInfo("colorTemperatureMinimum", int.class);
colorControlstepColorTemperatureCommandParams.put(
"colorTemperatureMinimum",
colorControlstepColorTemperaturecolorTemperatureMinimumCommandParameterInfo);
CommandParameterInfo
colorControlstepColorTemperaturecolorTemperatureMaximumCommandParameterInfo =
new CommandParameterInfo("colorTemperatureMaximum", int.class);
colorControlstepColorTemperatureCommandParams.put(
"colorTemperatureMaximum",
colorControlstepColorTemperaturecolorTemperatureMaximumCommandParameterInfo);
CommandParameterInfo colorControlstepColorTemperatureoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlstepColorTemperatureCommandParams.put(
"optionsMask", colorControlstepColorTemperatureoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlstepColorTemperatureCommandParams.put(
"optionsOverride", colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlstepColorTemperatureCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.stepColorTemperature(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepMode"),
(Integer) commandArguments.get("stepSize"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("colorTemperatureMinimum"),
(Integer) commandArguments.get("colorTemperatureMaximum"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlstepColorTemperatureCommandParams);
colorControlClusterCommandInfoMap.put(
"stepColorTemperature", colorControlstepColorTemperatureCommandInfo);
Map<String, CommandParameterInfo> colorControlstepHueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlstepHueCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlstepHuestepModeCommandParameterInfo =
new CommandParameterInfo("stepMode", int.class);
colorControlstepHueCommandParams.put(
"stepMode", colorControlstepHuestepModeCommandParameterInfo);
CommandParameterInfo colorControlstepHuestepSizeCommandParameterInfo =
new CommandParameterInfo("stepSize", int.class);
colorControlstepHueCommandParams.put(
"stepSize", colorControlstepHuestepSizeCommandParameterInfo);
CommandParameterInfo colorControlstepHuetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlstepHueCommandParams.put(
"transitionTime", colorControlstepHuetransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlstepHueoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlstepHueCommandParams.put(
"optionsMask", colorControlstepHueoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlstepHueoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlstepHueCommandParams.put(
"optionsOverride", colorControlstepHueoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlstepHueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.stepHue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepMode"),
(Integer) commandArguments.get("stepSize"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlstepHueCommandParams);
colorControlClusterCommandInfoMap.put("stepHue", colorControlstepHueCommandInfo);
Map<String, CommandParameterInfo> colorControlstepSaturationCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlstepSaturationCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlstepSaturationstepModeCommandParameterInfo =
new CommandParameterInfo("stepMode", int.class);
colorControlstepSaturationCommandParams.put(
"stepMode", colorControlstepSaturationstepModeCommandParameterInfo);
CommandParameterInfo colorControlstepSaturationstepSizeCommandParameterInfo =
new CommandParameterInfo("stepSize", int.class);
colorControlstepSaturationCommandParams.put(
"stepSize", colorControlstepSaturationstepSizeCommandParameterInfo);
CommandParameterInfo colorControlstepSaturationtransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
colorControlstepSaturationCommandParams.put(
"transitionTime", colorControlstepSaturationtransitionTimeCommandParameterInfo);
CommandParameterInfo colorControlstepSaturationoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlstepSaturationCommandParams.put(
"optionsMask", colorControlstepSaturationoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlstepSaturationoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlstepSaturationCommandParams.put(
"optionsOverride", colorControlstepSaturationoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlstepSaturationCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.stepSaturation(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepMode"),
(Integer) commandArguments.get("stepSize"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlstepSaturationCommandParams);
colorControlClusterCommandInfoMap.put("stepSaturation", colorControlstepSaturationCommandInfo);
Map<String, CommandParameterInfo> colorControlstopMoveStepCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo colorControlstopMoveStepCommandParameterInfo =
new CommandParameterInfo("ColorControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo colorControlstopMoveStepoptionsMaskCommandParameterInfo =
new CommandParameterInfo("optionsMask", int.class);
colorControlstopMoveStepCommandParams.put(
"optionsMask", colorControlstopMoveStepoptionsMaskCommandParameterInfo);
CommandParameterInfo colorControlstopMoveStepoptionsOverrideCommandParameterInfo =
new CommandParameterInfo("optionsOverride", int.class);
colorControlstopMoveStepCommandParams.put(
"optionsOverride", colorControlstopMoveStepoptionsOverrideCommandParameterInfo);
// Populate commands
CommandInfo colorControlstopMoveStepCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ColorControlCluster) cluster)
.stopMoveStep(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("optionsMask"),
(Integer) commandArguments.get("optionsOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
colorControlstopMoveStepCommandParams);
colorControlClusterCommandInfoMap.put("stopMoveStep", colorControlstopMoveStepCommandInfo);
// Populate cluster
ClusterInfo colorControlClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ColorControlCluster(ptr, endpointId),
colorControlClusterCommandInfoMap);
clusterMap.put("colorControl", colorControlClusterInfo);
Map<String, CommandInfo> contentLauncherClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> contentLauncherlaunchContentCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo contentLauncherlaunchContentCommandParameterInfo =
new CommandParameterInfo(
"ContentLauncher",
ChipClusters.ContentLauncherCluster.LaunchContentResponseCallback.class);
CommandParameterInfo contentLauncherlaunchContentautoPlayCommandParameterInfo =
new CommandParameterInfo("autoPlay", boolean.class);
contentLauncherlaunchContentCommandParams.put(
"autoPlay", contentLauncherlaunchContentautoPlayCommandParameterInfo);
CommandParameterInfo contentLauncherlaunchContentdataCommandParameterInfo =
new CommandParameterInfo("data", String.class);
contentLauncherlaunchContentCommandParams.put(
"data", contentLauncherlaunchContentdataCommandParameterInfo);
// Populate commands
CommandInfo contentLauncherlaunchContentCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ContentLauncherCluster) cluster)
.launchContent(
(ChipClusters.ContentLauncherCluster.LaunchContentResponseCallback) callback,
(Boolean) commandArguments.get("autoPlay"),
(String) commandArguments.get("data"));
},
() -> new DelegatedLaunchContentResponseCallback(),
contentLauncherlaunchContentCommandParams);
contentLauncherClusterCommandInfoMap.put(
"launchContent", contentLauncherlaunchContentCommandInfo);
Map<String, CommandParameterInfo> contentLauncherlaunchURLCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo contentLauncherlaunchURLCommandParameterInfo =
new CommandParameterInfo(
"ContentLauncher", ChipClusters.ContentLauncherCluster.LaunchURLResponseCallback.class);
CommandParameterInfo contentLauncherlaunchURLcontentURLCommandParameterInfo =
new CommandParameterInfo("contentURL", String.class);
contentLauncherlaunchURLCommandParams.put(
"contentURL", contentLauncherlaunchURLcontentURLCommandParameterInfo);
CommandParameterInfo contentLauncherlaunchURLdisplayStringCommandParameterInfo =
new CommandParameterInfo("displayString", String.class);
contentLauncherlaunchURLCommandParams.put(
"displayString", contentLauncherlaunchURLdisplayStringCommandParameterInfo);
// Populate commands
CommandInfo contentLauncherlaunchURLCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ContentLauncherCluster) cluster)
.launchURL(
(ChipClusters.ContentLauncherCluster.LaunchURLResponseCallback) callback,
(String) commandArguments.get("contentURL"),
(String) commandArguments.get("displayString"));
},
() -> new DelegatedLaunchURLResponseCallback(),
contentLauncherlaunchURLCommandParams);
contentLauncherClusterCommandInfoMap.put("launchURL", contentLauncherlaunchURLCommandInfo);
// Populate cluster
ClusterInfo contentLauncherClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ContentLauncherCluster(ptr, endpointId),
contentLauncherClusterCommandInfoMap);
clusterMap.put("contentLauncher", contentLauncherClusterInfo);
Map<String, CommandInfo> descriptorClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo descriptorClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.DescriptorCluster(ptr, endpointId),
descriptorClusterCommandInfoMap);
clusterMap.put("descriptor", descriptorClusterInfo);
Map<String, CommandInfo> diagnosticLogsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> diagnosticLogsretrieveLogsRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo diagnosticLogsretrieveLogsRequestCommandParameterInfo =
new CommandParameterInfo(
"DiagnosticLogs",
ChipClusters.DiagnosticLogsCluster.RetrieveLogsResponseCallback.class);
CommandParameterInfo diagnosticLogsretrieveLogsRequestintentCommandParameterInfo =
new CommandParameterInfo("intent", int.class);
diagnosticLogsretrieveLogsRequestCommandParams.put(
"intent", diagnosticLogsretrieveLogsRequestintentCommandParameterInfo);
CommandParameterInfo diagnosticLogsretrieveLogsRequestrequestedProtocolCommandParameterInfo =
new CommandParameterInfo("requestedProtocol", int.class);
diagnosticLogsretrieveLogsRequestCommandParams.put(
"requestedProtocol",
diagnosticLogsretrieveLogsRequestrequestedProtocolCommandParameterInfo);
CommandParameterInfo
diagnosticLogsretrieveLogsRequesttransferFileDesignatorCommandParameterInfo =
new CommandParameterInfo("transferFileDesignator", byte[].class);
diagnosticLogsretrieveLogsRequestCommandParams.put(
"transferFileDesignator",
diagnosticLogsretrieveLogsRequesttransferFileDesignatorCommandParameterInfo);
// Populate commands
CommandInfo diagnosticLogsretrieveLogsRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DiagnosticLogsCluster) cluster)
.retrieveLogsRequest(
(ChipClusters.DiagnosticLogsCluster.RetrieveLogsResponseCallback) callback,
(Integer) commandArguments.get("intent"),
(Integer) commandArguments.get("requestedProtocol"),
(byte[]) commandArguments.get("transferFileDesignator"));
},
() -> new DelegatedRetrieveLogsResponseCallback(),
diagnosticLogsretrieveLogsRequestCommandParams);
diagnosticLogsClusterCommandInfoMap.put(
"retrieveLogsRequest", diagnosticLogsretrieveLogsRequestCommandInfo);
// Populate cluster
ClusterInfo diagnosticLogsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.DiagnosticLogsCluster(ptr, endpointId),
diagnosticLogsClusterCommandInfoMap);
clusterMap.put("diagnosticLogs", diagnosticLogsClusterInfo);
Map<String, CommandInfo> doorLockClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> doorLockclearAllPinsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearAllPinsCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearAllPinsResponseCallback.class);
// Populate commands
CommandInfo doorLockclearAllPinsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearAllPins(
(ChipClusters.DoorLockCluster.ClearAllPinsResponseCallback) callback);
},
() -> new DelegatedClearAllPinsResponseCallback(),
doorLockclearAllPinsCommandParams);
doorLockClusterCommandInfoMap.put("clearAllPins", doorLockclearAllPinsCommandInfo);
Map<String, CommandParameterInfo> doorLockclearAllRfidsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearAllRfidsCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearAllRfidsResponseCallback.class);
// Populate commands
CommandInfo doorLockclearAllRfidsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearAllRfids(
(ChipClusters.DoorLockCluster.ClearAllRfidsResponseCallback) callback);
},
() -> new DelegatedClearAllRfidsResponseCallback(),
doorLockclearAllRfidsCommandParams);
doorLockClusterCommandInfoMap.put("clearAllRfids", doorLockclearAllRfidsCommandInfo);
Map<String, CommandParameterInfo> doorLockclearHolidayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearHolidayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearHolidayScheduleResponseCallback.class);
CommandParameterInfo doorLockclearHolidaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLockclearHolidayScheduleCommandParams.put(
"scheduleId", doorLockclearHolidaySchedulescheduleIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockclearHolidayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearHolidaySchedule(
(ChipClusters.DoorLockCluster.ClearHolidayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"));
},
() -> new DelegatedClearHolidayScheduleResponseCallback(),
doorLockclearHolidayScheduleCommandParams);
doorLockClusterCommandInfoMap.put(
"clearHolidaySchedule", doorLockclearHolidayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLockclearPinCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearPinCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearPinResponseCallback.class);
CommandParameterInfo doorLockclearPinuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockclearPinCommandParams.put("userId", doorLockclearPinuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockclearPinCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearPin(
(ChipClusters.DoorLockCluster.ClearPinResponseCallback) callback,
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedClearPinResponseCallback(),
doorLockclearPinCommandParams);
doorLockClusterCommandInfoMap.put("clearPin", doorLockclearPinCommandInfo);
Map<String, CommandParameterInfo> doorLockclearRfidCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearRfidCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearRfidResponseCallback.class);
CommandParameterInfo doorLockclearRfiduserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockclearRfidCommandParams.put("userId", doorLockclearRfiduserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockclearRfidCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearRfid(
(ChipClusters.DoorLockCluster.ClearRfidResponseCallback) callback,
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedClearRfidResponseCallback(),
doorLockclearRfidCommandParams);
doorLockClusterCommandInfoMap.put("clearRfid", doorLockclearRfidCommandInfo);
Map<String, CommandParameterInfo> doorLockclearWeekdayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearWeekdayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearWeekdayScheduleResponseCallback.class);
CommandParameterInfo doorLockclearWeekdaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLockclearWeekdayScheduleCommandParams.put(
"scheduleId", doorLockclearWeekdaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLockclearWeekdayScheduleuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockclearWeekdayScheduleCommandParams.put(
"userId", doorLockclearWeekdayScheduleuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockclearWeekdayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearWeekdaySchedule(
(ChipClusters.DoorLockCluster.ClearWeekdayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedClearWeekdayScheduleResponseCallback(),
doorLockclearWeekdayScheduleCommandParams);
doorLockClusterCommandInfoMap.put(
"clearWeekdaySchedule", doorLockclearWeekdayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLockclearYeardayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockclearYeardayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.ClearYeardayScheduleResponseCallback.class);
CommandParameterInfo doorLockclearYeardaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLockclearYeardayScheduleCommandParams.put(
"scheduleId", doorLockclearYeardaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLockclearYeardayScheduleuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockclearYeardayScheduleCommandParams.put(
"userId", doorLockclearYeardayScheduleuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockclearYeardayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.clearYeardaySchedule(
(ChipClusters.DoorLockCluster.ClearYeardayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedClearYeardayScheduleResponseCallback(),
doorLockclearYeardayScheduleCommandParams);
doorLockClusterCommandInfoMap.put(
"clearYeardaySchedule", doorLockclearYeardayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLockgetHolidayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetHolidayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetHolidayScheduleResponseCallback.class);
CommandParameterInfo doorLockgetHolidaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLockgetHolidayScheduleCommandParams.put(
"scheduleId", doorLockgetHolidaySchedulescheduleIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetHolidayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getHolidaySchedule(
(ChipClusters.DoorLockCluster.GetHolidayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"));
},
() -> new DelegatedGetHolidayScheduleResponseCallback(),
doorLockgetHolidayScheduleCommandParams);
doorLockClusterCommandInfoMap.put("getHolidaySchedule", doorLockgetHolidayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLockgetLogRecordCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetLogRecordCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetLogRecordResponseCallback.class);
CommandParameterInfo doorLockgetLogRecordlogIndexCommandParameterInfo =
new CommandParameterInfo("logIndex", int.class);
doorLockgetLogRecordCommandParams.put(
"logIndex", doorLockgetLogRecordlogIndexCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetLogRecordCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getLogRecord(
(ChipClusters.DoorLockCluster.GetLogRecordResponseCallback) callback,
(Integer) commandArguments.get("logIndex"));
},
() -> new DelegatedGetLogRecordResponseCallback(),
doorLockgetLogRecordCommandParams);
doorLockClusterCommandInfoMap.put("getLogRecord", doorLockgetLogRecordCommandInfo);
Map<String, CommandParameterInfo> doorLockgetPinCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetPinCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetPinResponseCallback.class);
CommandParameterInfo doorLockgetPinuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockgetPinCommandParams.put("userId", doorLockgetPinuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetPinCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getPin(
(ChipClusters.DoorLockCluster.GetPinResponseCallback) callback,
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedGetPinResponseCallback(),
doorLockgetPinCommandParams);
doorLockClusterCommandInfoMap.put("getPin", doorLockgetPinCommandInfo);
Map<String, CommandParameterInfo> doorLockgetRfidCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetRfidCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetRfidResponseCallback.class);
CommandParameterInfo doorLockgetRfiduserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockgetRfidCommandParams.put("userId", doorLockgetRfiduserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetRfidCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getRfid(
(ChipClusters.DoorLockCluster.GetRfidResponseCallback) callback,
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedGetRfidResponseCallback(),
doorLockgetRfidCommandParams);
doorLockClusterCommandInfoMap.put("getRfid", doorLockgetRfidCommandInfo);
Map<String, CommandParameterInfo> doorLockgetUserTypeCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetUserTypeCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetUserTypeResponseCallback.class);
CommandParameterInfo doorLockgetUserTypeuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockgetUserTypeCommandParams.put("userId", doorLockgetUserTypeuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetUserTypeCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getUserType(
(ChipClusters.DoorLockCluster.GetUserTypeResponseCallback) callback,
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedGetUserTypeResponseCallback(),
doorLockgetUserTypeCommandParams);
doorLockClusterCommandInfoMap.put("getUserType", doorLockgetUserTypeCommandInfo);
Map<String, CommandParameterInfo> doorLockgetWeekdayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetWeekdayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetWeekdayScheduleResponseCallback.class);
CommandParameterInfo doorLockgetWeekdaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLockgetWeekdayScheduleCommandParams.put(
"scheduleId", doorLockgetWeekdaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLockgetWeekdayScheduleuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockgetWeekdayScheduleCommandParams.put(
"userId", doorLockgetWeekdayScheduleuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetWeekdayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getWeekdaySchedule(
(ChipClusters.DoorLockCluster.GetWeekdayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedGetWeekdayScheduleResponseCallback(),
doorLockgetWeekdayScheduleCommandParams);
doorLockClusterCommandInfoMap.put("getWeekdaySchedule", doorLockgetWeekdayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLockgetYeardayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockgetYeardayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.GetYeardayScheduleResponseCallback.class);
CommandParameterInfo doorLockgetYeardaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLockgetYeardayScheduleCommandParams.put(
"scheduleId", doorLockgetYeardaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLockgetYeardayScheduleuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLockgetYeardayScheduleCommandParams.put(
"userId", doorLockgetYeardayScheduleuserIdCommandParameterInfo);
// Populate commands
CommandInfo doorLockgetYeardayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.getYeardaySchedule(
(ChipClusters.DoorLockCluster.GetYeardayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Integer) commandArguments.get("userId"));
},
() -> new DelegatedGetYeardayScheduleResponseCallback(),
doorLockgetYeardayScheduleCommandParams);
doorLockClusterCommandInfoMap.put("getYeardaySchedule", doorLockgetYeardayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLocklockDoorCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocklockDoorCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.LockDoorResponseCallback.class);
CommandParameterInfo doorLocklockDoorpinCommandParameterInfo =
new CommandParameterInfo("pin", byte[].class);
doorLocklockDoorCommandParams.put("pin", doorLocklockDoorpinCommandParameterInfo);
// Populate commands
CommandInfo doorLocklockDoorCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.lockDoor(
(ChipClusters.DoorLockCluster.LockDoorResponseCallback) callback,
(byte[]) commandArguments.get("pin"));
},
() -> new DelegatedLockDoorResponseCallback(),
doorLocklockDoorCommandParams);
doorLockClusterCommandInfoMap.put("lockDoor", doorLocklockDoorCommandInfo);
Map<String, CommandParameterInfo> doorLocksetHolidayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocksetHolidayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.SetHolidayScheduleResponseCallback.class);
CommandParameterInfo doorLocksetHolidaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLocksetHolidayScheduleCommandParams.put(
"scheduleId", doorLocksetHolidaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLocksetHolidaySchedulelocalStartTimeCommandParameterInfo =
new CommandParameterInfo("localStartTime", long.class);
doorLocksetHolidayScheduleCommandParams.put(
"localStartTime", doorLocksetHolidaySchedulelocalStartTimeCommandParameterInfo);
CommandParameterInfo doorLocksetHolidaySchedulelocalEndTimeCommandParameterInfo =
new CommandParameterInfo("localEndTime", long.class);
doorLocksetHolidayScheduleCommandParams.put(
"localEndTime", doorLocksetHolidaySchedulelocalEndTimeCommandParameterInfo);
CommandParameterInfo doorLocksetHolidayScheduleoperatingModeDuringHolidayCommandParameterInfo =
new CommandParameterInfo("operatingModeDuringHoliday", int.class);
doorLocksetHolidayScheduleCommandParams.put(
"operatingModeDuringHoliday",
doorLocksetHolidayScheduleoperatingModeDuringHolidayCommandParameterInfo);
// Populate commands
CommandInfo doorLocksetHolidayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.setHolidaySchedule(
(ChipClusters.DoorLockCluster.SetHolidayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Long) commandArguments.get("localStartTime"),
(Long) commandArguments.get("localEndTime"),
(Integer) commandArguments.get("operatingModeDuringHoliday"));
},
() -> new DelegatedSetHolidayScheduleResponseCallback(),
doorLocksetHolidayScheduleCommandParams);
doorLockClusterCommandInfoMap.put("setHolidaySchedule", doorLocksetHolidayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLocksetPinCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocksetPinCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.SetPinResponseCallback.class);
CommandParameterInfo doorLocksetPinuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLocksetPinCommandParams.put("userId", doorLocksetPinuserIdCommandParameterInfo);
CommandParameterInfo doorLocksetPinuserStatusCommandParameterInfo =
new CommandParameterInfo("userStatus", int.class);
doorLocksetPinCommandParams.put("userStatus", doorLocksetPinuserStatusCommandParameterInfo);
CommandParameterInfo doorLocksetPinuserTypeCommandParameterInfo =
new CommandParameterInfo("userType", int.class);
doorLocksetPinCommandParams.put("userType", doorLocksetPinuserTypeCommandParameterInfo);
CommandParameterInfo doorLocksetPinpinCommandParameterInfo =
new CommandParameterInfo("pin", byte[].class);
doorLocksetPinCommandParams.put("pin", doorLocksetPinpinCommandParameterInfo);
// Populate commands
CommandInfo doorLocksetPinCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.setPin(
(ChipClusters.DoorLockCluster.SetPinResponseCallback) callback,
(Integer) commandArguments.get("userId"),
(Integer) commandArguments.get("userStatus"),
(Integer) commandArguments.get("userType"),
(byte[]) commandArguments.get("pin"));
},
() -> new DelegatedSetPinResponseCallback(),
doorLocksetPinCommandParams);
doorLockClusterCommandInfoMap.put("setPin", doorLocksetPinCommandInfo);
Map<String, CommandParameterInfo> doorLocksetRfidCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocksetRfidCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.SetRfidResponseCallback.class);
CommandParameterInfo doorLocksetRfiduserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLocksetRfidCommandParams.put("userId", doorLocksetRfiduserIdCommandParameterInfo);
CommandParameterInfo doorLocksetRfiduserStatusCommandParameterInfo =
new CommandParameterInfo("userStatus", int.class);
doorLocksetRfidCommandParams.put("userStatus", doorLocksetRfiduserStatusCommandParameterInfo);
CommandParameterInfo doorLocksetRfiduserTypeCommandParameterInfo =
new CommandParameterInfo("userType", int.class);
doorLocksetRfidCommandParams.put("userType", doorLocksetRfiduserTypeCommandParameterInfo);
CommandParameterInfo doorLocksetRfididCommandParameterInfo =
new CommandParameterInfo("id", byte[].class);
doorLocksetRfidCommandParams.put("id", doorLocksetRfididCommandParameterInfo);
// Populate commands
CommandInfo doorLocksetRfidCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.setRfid(
(ChipClusters.DoorLockCluster.SetRfidResponseCallback) callback,
(Integer) commandArguments.get("userId"),
(Integer) commandArguments.get("userStatus"),
(Integer) commandArguments.get("userType"),
(byte[]) commandArguments.get("id"));
},
() -> new DelegatedSetRfidResponseCallback(),
doorLocksetRfidCommandParams);
doorLockClusterCommandInfoMap.put("setRfid", doorLocksetRfidCommandInfo);
Map<String, CommandParameterInfo> doorLocksetUserTypeCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocksetUserTypeCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.SetUserTypeResponseCallback.class);
CommandParameterInfo doorLocksetUserTypeuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLocksetUserTypeCommandParams.put("userId", doorLocksetUserTypeuserIdCommandParameterInfo);
CommandParameterInfo doorLocksetUserTypeuserTypeCommandParameterInfo =
new CommandParameterInfo("userType", int.class);
doorLocksetUserTypeCommandParams.put(
"userType", doorLocksetUserTypeuserTypeCommandParameterInfo);
// Populate commands
CommandInfo doorLocksetUserTypeCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.setUserType(
(ChipClusters.DoorLockCluster.SetUserTypeResponseCallback) callback,
(Integer) commandArguments.get("userId"),
(Integer) commandArguments.get("userType"));
},
() -> new DelegatedSetUserTypeResponseCallback(),
doorLocksetUserTypeCommandParams);
doorLockClusterCommandInfoMap.put("setUserType", doorLocksetUserTypeCommandInfo);
Map<String, CommandParameterInfo> doorLocksetWeekdayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocksetWeekdayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.SetWeekdayScheduleResponseCallback.class);
CommandParameterInfo doorLocksetWeekdaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"scheduleId", doorLocksetWeekdaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLocksetWeekdayScheduleuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"userId", doorLocksetWeekdayScheduleuserIdCommandParameterInfo);
CommandParameterInfo doorLocksetWeekdayScheduledaysMaskCommandParameterInfo =
new CommandParameterInfo("daysMask", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"daysMask", doorLocksetWeekdayScheduledaysMaskCommandParameterInfo);
CommandParameterInfo doorLocksetWeekdaySchedulestartHourCommandParameterInfo =
new CommandParameterInfo("startHour", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"startHour", doorLocksetWeekdaySchedulestartHourCommandParameterInfo);
CommandParameterInfo doorLocksetWeekdaySchedulestartMinuteCommandParameterInfo =
new CommandParameterInfo("startMinute", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"startMinute", doorLocksetWeekdaySchedulestartMinuteCommandParameterInfo);
CommandParameterInfo doorLocksetWeekdayScheduleendHourCommandParameterInfo =
new CommandParameterInfo("endHour", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"endHour", doorLocksetWeekdayScheduleendHourCommandParameterInfo);
CommandParameterInfo doorLocksetWeekdayScheduleendMinuteCommandParameterInfo =
new CommandParameterInfo("endMinute", int.class);
doorLocksetWeekdayScheduleCommandParams.put(
"endMinute", doorLocksetWeekdayScheduleendMinuteCommandParameterInfo);
// Populate commands
CommandInfo doorLocksetWeekdayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.setWeekdaySchedule(
(ChipClusters.DoorLockCluster.SetWeekdayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Integer) commandArguments.get("userId"),
(Integer) commandArguments.get("daysMask"),
(Integer) commandArguments.get("startHour"),
(Integer) commandArguments.get("startMinute"),
(Integer) commandArguments.get("endHour"),
(Integer) commandArguments.get("endMinute"));
},
() -> new DelegatedSetWeekdayScheduleResponseCallback(),
doorLocksetWeekdayScheduleCommandParams);
doorLockClusterCommandInfoMap.put("setWeekdaySchedule", doorLocksetWeekdayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLocksetYeardayScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLocksetYeardayScheduleCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.SetYeardayScheduleResponseCallback.class);
CommandParameterInfo doorLocksetYeardaySchedulescheduleIdCommandParameterInfo =
new CommandParameterInfo("scheduleId", int.class);
doorLocksetYeardayScheduleCommandParams.put(
"scheduleId", doorLocksetYeardaySchedulescheduleIdCommandParameterInfo);
CommandParameterInfo doorLocksetYeardayScheduleuserIdCommandParameterInfo =
new CommandParameterInfo("userId", int.class);
doorLocksetYeardayScheduleCommandParams.put(
"userId", doorLocksetYeardayScheduleuserIdCommandParameterInfo);
CommandParameterInfo doorLocksetYeardaySchedulelocalStartTimeCommandParameterInfo =
new CommandParameterInfo("localStartTime", long.class);
doorLocksetYeardayScheduleCommandParams.put(
"localStartTime", doorLocksetYeardaySchedulelocalStartTimeCommandParameterInfo);
CommandParameterInfo doorLocksetYeardaySchedulelocalEndTimeCommandParameterInfo =
new CommandParameterInfo("localEndTime", long.class);
doorLocksetYeardayScheduleCommandParams.put(
"localEndTime", doorLocksetYeardaySchedulelocalEndTimeCommandParameterInfo);
// Populate commands
CommandInfo doorLocksetYeardayScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.setYeardaySchedule(
(ChipClusters.DoorLockCluster.SetYeardayScheduleResponseCallback) callback,
(Integer) commandArguments.get("scheduleId"),
(Integer) commandArguments.get("userId"),
(Long) commandArguments.get("localStartTime"),
(Long) commandArguments.get("localEndTime"));
},
() -> new DelegatedSetYeardayScheduleResponseCallback(),
doorLocksetYeardayScheduleCommandParams);
doorLockClusterCommandInfoMap.put("setYeardaySchedule", doorLocksetYeardayScheduleCommandInfo);
Map<String, CommandParameterInfo> doorLockunlockDoorCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockunlockDoorCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.UnlockDoorResponseCallback.class);
CommandParameterInfo doorLockunlockDoorpinCommandParameterInfo =
new CommandParameterInfo("pin", byte[].class);
doorLockunlockDoorCommandParams.put("pin", doorLockunlockDoorpinCommandParameterInfo);
// Populate commands
CommandInfo doorLockunlockDoorCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.unlockDoor(
(ChipClusters.DoorLockCluster.UnlockDoorResponseCallback) callback,
(byte[]) commandArguments.get("pin"));
},
() -> new DelegatedUnlockDoorResponseCallback(),
doorLockunlockDoorCommandParams);
doorLockClusterCommandInfoMap.put("unlockDoor", doorLockunlockDoorCommandInfo);
Map<String, CommandParameterInfo> doorLockunlockWithTimeoutCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo doorLockunlockWithTimeoutCommandParameterInfo =
new CommandParameterInfo(
"DoorLock", ChipClusters.DoorLockCluster.UnlockWithTimeoutResponseCallback.class);
CommandParameterInfo doorLockunlockWithTimeouttimeoutInSecondsCommandParameterInfo =
new CommandParameterInfo("timeoutInSeconds", int.class);
doorLockunlockWithTimeoutCommandParams.put(
"timeoutInSeconds", doorLockunlockWithTimeouttimeoutInSecondsCommandParameterInfo);
CommandParameterInfo doorLockunlockWithTimeoutpinCommandParameterInfo =
new CommandParameterInfo("pin", byte[].class);
doorLockunlockWithTimeoutCommandParams.put(
"pin", doorLockunlockWithTimeoutpinCommandParameterInfo);
// Populate commands
CommandInfo doorLockunlockWithTimeoutCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.DoorLockCluster) cluster)
.unlockWithTimeout(
(ChipClusters.DoorLockCluster.UnlockWithTimeoutResponseCallback) callback,
(Integer) commandArguments.get("timeoutInSeconds"),
(byte[]) commandArguments.get("pin"));
},
() -> new DelegatedUnlockWithTimeoutResponseCallback(),
doorLockunlockWithTimeoutCommandParams);
doorLockClusterCommandInfoMap.put("unlockWithTimeout", doorLockunlockWithTimeoutCommandInfo);
// Populate cluster
ClusterInfo doorLockClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.DoorLockCluster(ptr, endpointId),
doorLockClusterCommandInfoMap);
clusterMap.put("doorLock", doorLockClusterInfo);
Map<String, CommandInfo> electricalMeasurementClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo electricalMeasurementClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ElectricalMeasurementCluster(ptr, endpointId),
electricalMeasurementClusterCommandInfoMap);
clusterMap.put("electricalMeasurement", electricalMeasurementClusterInfo);
Map<String, CommandInfo> ethernetNetworkDiagnosticsClusterCommandInfoMap =
new LinkedHashMap<>();
Map<String, CommandParameterInfo> ethernetNetworkDiagnosticsresetCountsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo ethernetNetworkDiagnosticsresetCountsCommandParameterInfo =
new CommandParameterInfo(
"EthernetNetworkDiagnostics", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo ethernetNetworkDiagnosticsresetCountsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.EthernetNetworkDiagnosticsCluster) cluster)
.resetCounts((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
ethernetNetworkDiagnosticsresetCountsCommandParams);
ethernetNetworkDiagnosticsClusterCommandInfoMap.put(
"resetCounts", ethernetNetworkDiagnosticsresetCountsCommandInfo);
// Populate cluster
ClusterInfo ethernetNetworkDiagnosticsClusterInfo =
new ClusterInfo(
(ptr, endpointId) ->
new ChipClusters.EthernetNetworkDiagnosticsCluster(ptr, endpointId),
ethernetNetworkDiagnosticsClusterCommandInfoMap);
clusterMap.put("ethernetNetworkDiagnostics", ethernetNetworkDiagnosticsClusterInfo);
Map<String, CommandInfo> fixedLabelClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo fixedLabelClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.FixedLabelCluster(ptr, endpointId),
fixedLabelClusterCommandInfoMap);
clusterMap.put("fixedLabel", fixedLabelClusterInfo);
Map<String, CommandInfo> flowMeasurementClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo flowMeasurementClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.FlowMeasurementCluster(ptr, endpointId),
flowMeasurementClusterCommandInfoMap);
clusterMap.put("flowMeasurement", flowMeasurementClusterInfo);
Map<String, CommandInfo> generalCommissioningClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> generalCommissioningarmFailSafeCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo generalCommissioningarmFailSafeCommandParameterInfo =
new CommandParameterInfo(
"GeneralCommissioning",
ChipClusters.GeneralCommissioningCluster.ArmFailSafeResponseCallback.class);
CommandParameterInfo generalCommissioningarmFailSafeexpiryLengthSecondsCommandParameterInfo =
new CommandParameterInfo("expiryLengthSeconds", int.class);
generalCommissioningarmFailSafeCommandParams.put(
"expiryLengthSeconds",
generalCommissioningarmFailSafeexpiryLengthSecondsCommandParameterInfo);
CommandParameterInfo generalCommissioningarmFailSafebreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
generalCommissioningarmFailSafeCommandParams.put(
"breadcrumb", generalCommissioningarmFailSafebreadcrumbCommandParameterInfo);
CommandParameterInfo generalCommissioningarmFailSafetimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
generalCommissioningarmFailSafeCommandParams.put(
"timeoutMs", generalCommissioningarmFailSafetimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo generalCommissioningarmFailSafeCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GeneralCommissioningCluster) cluster)
.armFailSafe(
(ChipClusters.GeneralCommissioningCluster.ArmFailSafeResponseCallback)
callback,
(Integer) commandArguments.get("expiryLengthSeconds"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedArmFailSafeResponseCallback(),
generalCommissioningarmFailSafeCommandParams);
generalCommissioningClusterCommandInfoMap.put(
"armFailSafe", generalCommissioningarmFailSafeCommandInfo);
Map<String, CommandParameterInfo> generalCommissioningcommissioningCompleteCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo generalCommissioningcommissioningCompleteCommandParameterInfo =
new CommandParameterInfo(
"GeneralCommissioning",
ChipClusters.GeneralCommissioningCluster.CommissioningCompleteResponseCallback.class);
// Populate commands
CommandInfo generalCommissioningcommissioningCompleteCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GeneralCommissioningCluster) cluster)
.commissioningComplete(
(ChipClusters.GeneralCommissioningCluster
.CommissioningCompleteResponseCallback)
callback);
},
() -> new DelegatedCommissioningCompleteResponseCallback(),
generalCommissioningcommissioningCompleteCommandParams);
generalCommissioningClusterCommandInfoMap.put(
"commissioningComplete", generalCommissioningcommissioningCompleteCommandInfo);
Map<String, CommandParameterInfo> generalCommissioningsetRegulatoryConfigCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo generalCommissioningsetRegulatoryConfigCommandParameterInfo =
new CommandParameterInfo(
"GeneralCommissioning",
ChipClusters.GeneralCommissioningCluster.SetRegulatoryConfigResponseCallback.class);
CommandParameterInfo generalCommissioningsetRegulatoryConfiglocationCommandParameterInfo =
new CommandParameterInfo("location", int.class);
generalCommissioningsetRegulatoryConfigCommandParams.put(
"location", generalCommissioningsetRegulatoryConfiglocationCommandParameterInfo);
CommandParameterInfo generalCommissioningsetRegulatoryConfigcountryCodeCommandParameterInfo =
new CommandParameterInfo("countryCode", String.class);
generalCommissioningsetRegulatoryConfigCommandParams.put(
"countryCode", generalCommissioningsetRegulatoryConfigcountryCodeCommandParameterInfo);
CommandParameterInfo generalCommissioningsetRegulatoryConfigbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
generalCommissioningsetRegulatoryConfigCommandParams.put(
"breadcrumb", generalCommissioningsetRegulatoryConfigbreadcrumbCommandParameterInfo);
CommandParameterInfo generalCommissioningsetRegulatoryConfigtimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
generalCommissioningsetRegulatoryConfigCommandParams.put(
"timeoutMs", generalCommissioningsetRegulatoryConfigtimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo generalCommissioningsetRegulatoryConfigCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GeneralCommissioningCluster) cluster)
.setRegulatoryConfig(
(ChipClusters.GeneralCommissioningCluster.SetRegulatoryConfigResponseCallback)
callback,
(Integer) commandArguments.get("location"),
(String) commandArguments.get("countryCode"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedSetRegulatoryConfigResponseCallback(),
generalCommissioningsetRegulatoryConfigCommandParams);
generalCommissioningClusterCommandInfoMap.put(
"setRegulatoryConfig", generalCommissioningsetRegulatoryConfigCommandInfo);
// Populate cluster
ClusterInfo generalCommissioningClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.GeneralCommissioningCluster(ptr, endpointId),
generalCommissioningClusterCommandInfoMap);
clusterMap.put("generalCommissioning", generalCommissioningClusterInfo);
Map<String, CommandInfo> generalDiagnosticsClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo generalDiagnosticsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.GeneralDiagnosticsCluster(ptr, endpointId),
generalDiagnosticsClusterCommandInfoMap);
clusterMap.put("generalDiagnostics", generalDiagnosticsClusterInfo);
Map<String, CommandInfo> groupKeyManagementClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo groupKeyManagementClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.GroupKeyManagementCluster(ptr, endpointId),
groupKeyManagementClusterCommandInfoMap);
clusterMap.put("groupKeyManagement", groupKeyManagementClusterInfo);
Map<String, CommandInfo> groupsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> groupsaddGroupCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo groupsaddGroupCommandParameterInfo =
new CommandParameterInfo(
"Groups", ChipClusters.GroupsCluster.AddGroupResponseCallback.class);
CommandParameterInfo groupsaddGroupgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
groupsaddGroupCommandParams.put("groupId", groupsaddGroupgroupIdCommandParameterInfo);
CommandParameterInfo groupsaddGroupgroupNameCommandParameterInfo =
new CommandParameterInfo("groupName", String.class);
groupsaddGroupCommandParams.put("groupName", groupsaddGroupgroupNameCommandParameterInfo);
// Populate commands
CommandInfo groupsaddGroupCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GroupsCluster) cluster)
.addGroup(
(ChipClusters.GroupsCluster.AddGroupResponseCallback) callback,
(Integer) commandArguments.get("groupId"),
(String) commandArguments.get("groupName"));
},
() -> new DelegatedAddGroupResponseCallback(),
groupsaddGroupCommandParams);
groupsClusterCommandInfoMap.put("addGroup", groupsaddGroupCommandInfo);
Map<String, CommandParameterInfo> groupsaddGroupIfIdentifyingCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo groupsaddGroupIfIdentifyingCommandParameterInfo =
new CommandParameterInfo("Groups", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo groupsaddGroupIfIdentifyinggroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
groupsaddGroupIfIdentifyingCommandParams.put(
"groupId", groupsaddGroupIfIdentifyinggroupIdCommandParameterInfo);
CommandParameterInfo groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo =
new CommandParameterInfo("groupName", String.class);
groupsaddGroupIfIdentifyingCommandParams.put(
"groupName", groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo);
// Populate commands
CommandInfo groupsaddGroupIfIdentifyingCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GroupsCluster) cluster)
.addGroupIfIdentifying(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("groupId"),
(String) commandArguments.get("groupName"));
},
() -> new DelegatedDefaultClusterCallback(),
groupsaddGroupIfIdentifyingCommandParams);
groupsClusterCommandInfoMap.put(
"addGroupIfIdentifying", groupsaddGroupIfIdentifyingCommandInfo);
Map<String, CommandParameterInfo> groupsgetGroupMembershipCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo groupsgetGroupMembershipCommandParameterInfo =
new CommandParameterInfo(
"Groups", ChipClusters.GroupsCluster.GetGroupMembershipResponseCallback.class);
CommandParameterInfo groupsgetGroupMembershipgroupCountCommandParameterInfo =
new CommandParameterInfo("groupCount", int.class);
groupsgetGroupMembershipCommandParams.put(
"groupCount", groupsgetGroupMembershipgroupCountCommandParameterInfo);
CommandParameterInfo groupsgetGroupMembershipgroupListCommandParameterInfo =
new CommandParameterInfo("groupList", int.class);
groupsgetGroupMembershipCommandParams.put(
"groupList", groupsgetGroupMembershipgroupListCommandParameterInfo);
// Populate commands
CommandInfo groupsgetGroupMembershipCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GroupsCluster) cluster)
.getGroupMembership(
(ChipClusters.GroupsCluster.GetGroupMembershipResponseCallback) callback,
(Integer) commandArguments.get("groupCount"),
(Integer) commandArguments.get("groupList"));
},
() -> new DelegatedGetGroupMembershipResponseCallback(),
groupsgetGroupMembershipCommandParams);
groupsClusterCommandInfoMap.put("getGroupMembership", groupsgetGroupMembershipCommandInfo);
Map<String, CommandParameterInfo> groupsremoveAllGroupsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo groupsremoveAllGroupsCommandParameterInfo =
new CommandParameterInfo("Groups", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo groupsremoveAllGroupsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GroupsCluster) cluster)
.removeAllGroups((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
groupsremoveAllGroupsCommandParams);
groupsClusterCommandInfoMap.put("removeAllGroups", groupsremoveAllGroupsCommandInfo);
Map<String, CommandParameterInfo> groupsremoveGroupCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo groupsremoveGroupCommandParameterInfo =
new CommandParameterInfo(
"Groups", ChipClusters.GroupsCluster.RemoveGroupResponseCallback.class);
CommandParameterInfo groupsremoveGroupgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
groupsremoveGroupCommandParams.put("groupId", groupsremoveGroupgroupIdCommandParameterInfo);
// Populate commands
CommandInfo groupsremoveGroupCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GroupsCluster) cluster)
.removeGroup(
(ChipClusters.GroupsCluster.RemoveGroupResponseCallback) callback,
(Integer) commandArguments.get("groupId"));
},
() -> new DelegatedRemoveGroupResponseCallback(),
groupsremoveGroupCommandParams);
groupsClusterCommandInfoMap.put("removeGroup", groupsremoveGroupCommandInfo);
Map<String, CommandParameterInfo> groupsviewGroupCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo groupsviewGroupCommandParameterInfo =
new CommandParameterInfo(
"Groups", ChipClusters.GroupsCluster.ViewGroupResponseCallback.class);
CommandParameterInfo groupsviewGroupgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
groupsviewGroupCommandParams.put("groupId", groupsviewGroupgroupIdCommandParameterInfo);
// Populate commands
CommandInfo groupsviewGroupCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GroupsCluster) cluster)
.viewGroup(
(ChipClusters.GroupsCluster.ViewGroupResponseCallback) callback,
(Integer) commandArguments.get("groupId"));
},
() -> new DelegatedViewGroupResponseCallback(),
groupsviewGroupCommandParams);
groupsClusterCommandInfoMap.put("viewGroup", groupsviewGroupCommandInfo);
// Populate cluster
ClusterInfo groupsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.GroupsCluster(ptr, endpointId),
groupsClusterCommandInfoMap);
clusterMap.put("groups", groupsClusterInfo);
Map<String, CommandInfo> identifyClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> identifyidentifyCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo identifyidentifyCommandParameterInfo =
new CommandParameterInfo("Identify", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo identifyidentifyidentifyTimeCommandParameterInfo =
new CommandParameterInfo("identifyTime", int.class);
identifyidentifyCommandParams.put(
"identifyTime", identifyidentifyidentifyTimeCommandParameterInfo);
// Populate commands
CommandInfo identifyidentifyCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.IdentifyCluster) cluster)
.identify(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("identifyTime"));
},
() -> new DelegatedDefaultClusterCallback(),
identifyidentifyCommandParams);
identifyClusterCommandInfoMap.put("identify", identifyidentifyCommandInfo);
Map<String, CommandParameterInfo> identifyidentifyQueryCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo identifyidentifyQueryCommandParameterInfo =
new CommandParameterInfo(
"Identify", ChipClusters.IdentifyCluster.IdentifyQueryResponseCallback.class);
// Populate commands
CommandInfo identifyidentifyQueryCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.IdentifyCluster) cluster)
.identifyQuery(
(ChipClusters.IdentifyCluster.IdentifyQueryResponseCallback) callback);
},
() -> new DelegatedIdentifyQueryResponseCallback(),
identifyidentifyQueryCommandParams);
identifyClusterCommandInfoMap.put("identifyQuery", identifyidentifyQueryCommandInfo);
Map<String, CommandParameterInfo> identifytriggerEffectCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo identifytriggerEffectCommandParameterInfo =
new CommandParameterInfo("Identify", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo identifytriggerEffecteffectIdentifierCommandParameterInfo =
new CommandParameterInfo("effectIdentifier", int.class);
identifytriggerEffectCommandParams.put(
"effectIdentifier", identifytriggerEffecteffectIdentifierCommandParameterInfo);
CommandParameterInfo identifytriggerEffecteffectVariantCommandParameterInfo =
new CommandParameterInfo("effectVariant", int.class);
identifytriggerEffectCommandParams.put(
"effectVariant", identifytriggerEffecteffectVariantCommandParameterInfo);
// Populate commands
CommandInfo identifytriggerEffectCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.IdentifyCluster) cluster)
.triggerEffect(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("effectIdentifier"),
(Integer) commandArguments.get("effectVariant"));
},
() -> new DelegatedDefaultClusterCallback(),
identifytriggerEffectCommandParams);
identifyClusterCommandInfoMap.put("triggerEffect", identifytriggerEffectCommandInfo);
// Populate cluster
ClusterInfo identifyClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.IdentifyCluster(ptr, endpointId),
identifyClusterCommandInfoMap);
clusterMap.put("identify", identifyClusterInfo);
Map<String, CommandInfo> illuminanceMeasurementClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo illuminanceMeasurementClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.IlluminanceMeasurementCluster(ptr, endpointId),
illuminanceMeasurementClusterCommandInfoMap);
clusterMap.put("illuminanceMeasurement", illuminanceMeasurementClusterInfo);
Map<String, CommandInfo> keypadInputClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> keypadInputsendKeyCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo keypadInputsendKeyCommandParameterInfo =
new CommandParameterInfo(
"KeypadInput", ChipClusters.KeypadInputCluster.SendKeyResponseCallback.class);
CommandParameterInfo keypadInputsendKeykeyCodeCommandParameterInfo =
new CommandParameterInfo("keyCode", int.class);
keypadInputsendKeyCommandParams.put("keyCode", keypadInputsendKeykeyCodeCommandParameterInfo);
// Populate commands
CommandInfo keypadInputsendKeyCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.KeypadInputCluster) cluster)
.sendKey(
(ChipClusters.KeypadInputCluster.SendKeyResponseCallback) callback,
(Integer) commandArguments.get("keyCode"));
},
() -> new DelegatedSendKeyResponseCallback(),
keypadInputsendKeyCommandParams);
keypadInputClusterCommandInfoMap.put("sendKey", keypadInputsendKeyCommandInfo);
// Populate cluster
ClusterInfo keypadInputClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.KeypadInputCluster(ptr, endpointId),
keypadInputClusterCommandInfoMap);
clusterMap.put("keypadInput", keypadInputClusterInfo);
Map<String, CommandInfo> levelControlClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> levelControlmoveCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlmoveCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlmovemoveModeCommandParameterInfo =
new CommandParameterInfo("moveMode", int.class);
levelControlmoveCommandParams.put("moveMode", levelControlmovemoveModeCommandParameterInfo);
CommandParameterInfo levelControlmoverateCommandParameterInfo =
new CommandParameterInfo("rate", int.class);
levelControlmoveCommandParams.put("rate", levelControlmoverateCommandParameterInfo);
CommandParameterInfo levelControlmoveoptionMaskCommandParameterInfo =
new CommandParameterInfo("optionMask", int.class);
levelControlmoveCommandParams.put("optionMask", levelControlmoveoptionMaskCommandParameterInfo);
CommandParameterInfo levelControlmoveoptionOverrideCommandParameterInfo =
new CommandParameterInfo("optionOverride", int.class);
levelControlmoveCommandParams.put(
"optionOverride", levelControlmoveoptionOverrideCommandParameterInfo);
// Populate commands
CommandInfo levelControlmoveCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.move(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("moveMode"),
(Integer) commandArguments.get("rate"),
(Integer) commandArguments.get("optionMask"),
(Integer) commandArguments.get("optionOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlmoveCommandParams);
levelControlClusterCommandInfoMap.put("move", levelControlmoveCommandInfo);
Map<String, CommandParameterInfo> levelControlmoveToLevelCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlmoveToLevelCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlmoveToLevellevelCommandParameterInfo =
new CommandParameterInfo("level", int.class);
levelControlmoveToLevelCommandParams.put(
"level", levelControlmoveToLevellevelCommandParameterInfo);
CommandParameterInfo levelControlmoveToLeveltransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
levelControlmoveToLevelCommandParams.put(
"transitionTime", levelControlmoveToLeveltransitionTimeCommandParameterInfo);
CommandParameterInfo levelControlmoveToLeveloptionMaskCommandParameterInfo =
new CommandParameterInfo("optionMask", int.class);
levelControlmoveToLevelCommandParams.put(
"optionMask", levelControlmoveToLeveloptionMaskCommandParameterInfo);
CommandParameterInfo levelControlmoveToLeveloptionOverrideCommandParameterInfo =
new CommandParameterInfo("optionOverride", int.class);
levelControlmoveToLevelCommandParams.put(
"optionOverride", levelControlmoveToLeveloptionOverrideCommandParameterInfo);
// Populate commands
CommandInfo levelControlmoveToLevelCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.moveToLevel(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("level"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionMask"),
(Integer) commandArguments.get("optionOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlmoveToLevelCommandParams);
levelControlClusterCommandInfoMap.put("moveToLevel", levelControlmoveToLevelCommandInfo);
Map<String, CommandParameterInfo> levelControlmoveToLevelWithOnOffCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlmoveToLevelWithOnOffCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlmoveToLevelWithOnOfflevelCommandParameterInfo =
new CommandParameterInfo("level", int.class);
levelControlmoveToLevelWithOnOffCommandParams.put(
"level", levelControlmoveToLevelWithOnOfflevelCommandParameterInfo);
CommandParameterInfo levelControlmoveToLevelWithOnOfftransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
levelControlmoveToLevelWithOnOffCommandParams.put(
"transitionTime", levelControlmoveToLevelWithOnOfftransitionTimeCommandParameterInfo);
// Populate commands
CommandInfo levelControlmoveToLevelWithOnOffCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.moveToLevelWithOnOff(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("level"),
(Integer) commandArguments.get("transitionTime"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlmoveToLevelWithOnOffCommandParams);
levelControlClusterCommandInfoMap.put(
"moveToLevelWithOnOff", levelControlmoveToLevelWithOnOffCommandInfo);
Map<String, CommandParameterInfo> levelControlmoveWithOnOffCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlmoveWithOnOffCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlmoveWithOnOffmoveModeCommandParameterInfo =
new CommandParameterInfo("moveMode", int.class);
levelControlmoveWithOnOffCommandParams.put(
"moveMode", levelControlmoveWithOnOffmoveModeCommandParameterInfo);
CommandParameterInfo levelControlmoveWithOnOffrateCommandParameterInfo =
new CommandParameterInfo("rate", int.class);
levelControlmoveWithOnOffCommandParams.put(
"rate", levelControlmoveWithOnOffrateCommandParameterInfo);
// Populate commands
CommandInfo levelControlmoveWithOnOffCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.moveWithOnOff(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("moveMode"),
(Integer) commandArguments.get("rate"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlmoveWithOnOffCommandParams);
levelControlClusterCommandInfoMap.put("moveWithOnOff", levelControlmoveWithOnOffCommandInfo);
Map<String, CommandParameterInfo> levelControlstepCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlstepCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlstepstepModeCommandParameterInfo =
new CommandParameterInfo("stepMode", int.class);
levelControlstepCommandParams.put("stepMode", levelControlstepstepModeCommandParameterInfo);
CommandParameterInfo levelControlstepstepSizeCommandParameterInfo =
new CommandParameterInfo("stepSize", int.class);
levelControlstepCommandParams.put("stepSize", levelControlstepstepSizeCommandParameterInfo);
CommandParameterInfo levelControlsteptransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
levelControlstepCommandParams.put(
"transitionTime", levelControlsteptransitionTimeCommandParameterInfo);
CommandParameterInfo levelControlstepoptionMaskCommandParameterInfo =
new CommandParameterInfo("optionMask", int.class);
levelControlstepCommandParams.put("optionMask", levelControlstepoptionMaskCommandParameterInfo);
CommandParameterInfo levelControlstepoptionOverrideCommandParameterInfo =
new CommandParameterInfo("optionOverride", int.class);
levelControlstepCommandParams.put(
"optionOverride", levelControlstepoptionOverrideCommandParameterInfo);
// Populate commands
CommandInfo levelControlstepCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.step(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepMode"),
(Integer) commandArguments.get("stepSize"),
(Integer) commandArguments.get("transitionTime"),
(Integer) commandArguments.get("optionMask"),
(Integer) commandArguments.get("optionOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlstepCommandParams);
levelControlClusterCommandInfoMap.put("step", levelControlstepCommandInfo);
Map<String, CommandParameterInfo> levelControlstepWithOnOffCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlstepWithOnOffCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlstepWithOnOffstepModeCommandParameterInfo =
new CommandParameterInfo("stepMode", int.class);
levelControlstepWithOnOffCommandParams.put(
"stepMode", levelControlstepWithOnOffstepModeCommandParameterInfo);
CommandParameterInfo levelControlstepWithOnOffstepSizeCommandParameterInfo =
new CommandParameterInfo("stepSize", int.class);
levelControlstepWithOnOffCommandParams.put(
"stepSize", levelControlstepWithOnOffstepSizeCommandParameterInfo);
CommandParameterInfo levelControlstepWithOnOfftransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
levelControlstepWithOnOffCommandParams.put(
"transitionTime", levelControlstepWithOnOfftransitionTimeCommandParameterInfo);
// Populate commands
CommandInfo levelControlstepWithOnOffCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.stepWithOnOff(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("stepMode"),
(Integer) commandArguments.get("stepSize"),
(Integer) commandArguments.get("transitionTime"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlstepWithOnOffCommandParams);
levelControlClusterCommandInfoMap.put("stepWithOnOff", levelControlstepWithOnOffCommandInfo);
Map<String, CommandParameterInfo> levelControlstopCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlstopCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo levelControlstopoptionMaskCommandParameterInfo =
new CommandParameterInfo("optionMask", int.class);
levelControlstopCommandParams.put("optionMask", levelControlstopoptionMaskCommandParameterInfo);
CommandParameterInfo levelControlstopoptionOverrideCommandParameterInfo =
new CommandParameterInfo("optionOverride", int.class);
levelControlstopCommandParams.put(
"optionOverride", levelControlstopoptionOverrideCommandParameterInfo);
// Populate commands
CommandInfo levelControlstopCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.stop(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("optionMask"),
(Integer) commandArguments.get("optionOverride"));
},
() -> new DelegatedDefaultClusterCallback(),
levelControlstopCommandParams);
levelControlClusterCommandInfoMap.put("stop", levelControlstopCommandInfo);
Map<String, CommandParameterInfo> levelControlstopWithOnOffCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo levelControlstopWithOnOffCommandParameterInfo =
new CommandParameterInfo("LevelControl", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo levelControlstopWithOnOffCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LevelControlCluster) cluster)
.stopWithOnOff((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
levelControlstopWithOnOffCommandParams);
levelControlClusterCommandInfoMap.put("stopWithOnOff", levelControlstopWithOnOffCommandInfo);
// Populate cluster
ClusterInfo levelControlClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.LevelControlCluster(ptr, endpointId),
levelControlClusterCommandInfoMap);
clusterMap.put("levelControl", levelControlClusterInfo);
Map<String, CommandInfo> lowPowerClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> lowPowersleepCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo lowPowersleepCommandParameterInfo =
new CommandParameterInfo("LowPower", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo lowPowersleepCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.LowPowerCluster) cluster).sleep((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
lowPowersleepCommandParams);
lowPowerClusterCommandInfoMap.put("sleep", lowPowersleepCommandInfo);
// Populate cluster
ClusterInfo lowPowerClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.LowPowerCluster(ptr, endpointId),
lowPowerClusterCommandInfoMap);
clusterMap.put("lowPower", lowPowerClusterInfo);
Map<String, CommandInfo> mediaInputClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> mediaInputhideInputStatusCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaInputhideInputStatusCommandParameterInfo =
new CommandParameterInfo("MediaInput", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo mediaInputhideInputStatusCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaInputCluster) cluster)
.hideInputStatus((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
mediaInputhideInputStatusCommandParams);
mediaInputClusterCommandInfoMap.put("hideInputStatus", mediaInputhideInputStatusCommandInfo);
Map<String, CommandParameterInfo> mediaInputrenameInputCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaInputrenameInputCommandParameterInfo =
new CommandParameterInfo("MediaInput", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo mediaInputrenameInputindexCommandParameterInfo =
new CommandParameterInfo("index", int.class);
mediaInputrenameInputCommandParams.put("index", mediaInputrenameInputindexCommandParameterInfo);
CommandParameterInfo mediaInputrenameInputnameCommandParameterInfo =
new CommandParameterInfo("name", String.class);
mediaInputrenameInputCommandParams.put("name", mediaInputrenameInputnameCommandParameterInfo);
// Populate commands
CommandInfo mediaInputrenameInputCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaInputCluster) cluster)
.renameInput(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("index"),
(String) commandArguments.get("name"));
},
() -> new DelegatedDefaultClusterCallback(),
mediaInputrenameInputCommandParams);
mediaInputClusterCommandInfoMap.put("renameInput", mediaInputrenameInputCommandInfo);
Map<String, CommandParameterInfo> mediaInputselectInputCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaInputselectInputCommandParameterInfo =
new CommandParameterInfo("MediaInput", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo mediaInputselectInputindexCommandParameterInfo =
new CommandParameterInfo("index", int.class);
mediaInputselectInputCommandParams.put("index", mediaInputselectInputindexCommandParameterInfo);
// Populate commands
CommandInfo mediaInputselectInputCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaInputCluster) cluster)
.selectInput(
(DefaultClusterCallback) callback, (Integer) commandArguments.get("index"));
},
() -> new DelegatedDefaultClusterCallback(),
mediaInputselectInputCommandParams);
mediaInputClusterCommandInfoMap.put("selectInput", mediaInputselectInputCommandInfo);
Map<String, CommandParameterInfo> mediaInputshowInputStatusCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaInputshowInputStatusCommandParameterInfo =
new CommandParameterInfo("MediaInput", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo mediaInputshowInputStatusCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaInputCluster) cluster)
.showInputStatus((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
mediaInputshowInputStatusCommandParams);
mediaInputClusterCommandInfoMap.put("showInputStatus", mediaInputshowInputStatusCommandInfo);
// Populate cluster
ClusterInfo mediaInputClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.MediaInputCluster(ptr, endpointId),
mediaInputClusterCommandInfoMap);
clusterMap.put("mediaInput", mediaInputClusterInfo);
Map<String, CommandInfo> mediaPlaybackClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> mediaPlaybackmediaFastForwardCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaFastForwardCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback",
ChipClusters.MediaPlaybackCluster.MediaFastForwardResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaFastForwardCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaFastForward(
(ChipClusters.MediaPlaybackCluster.MediaFastForwardResponseCallback)
callback);
},
() -> new DelegatedMediaFastForwardResponseCallback(),
mediaPlaybackmediaFastForwardCommandParams);
mediaPlaybackClusterCommandInfoMap.put(
"mediaFastForward", mediaPlaybackmediaFastForwardCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaNextCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaNextCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaNextResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaNextCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaNext(
(ChipClusters.MediaPlaybackCluster.MediaNextResponseCallback) callback);
},
() -> new DelegatedMediaNextResponseCallback(),
mediaPlaybackmediaNextCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaNext", mediaPlaybackmediaNextCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaPauseCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaPauseCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaPauseResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaPauseCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaPause(
(ChipClusters.MediaPlaybackCluster.MediaPauseResponseCallback) callback);
},
() -> new DelegatedMediaPauseResponseCallback(),
mediaPlaybackmediaPauseCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaPause", mediaPlaybackmediaPauseCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaPlayCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaPlayCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaPlayResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaPlayCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaPlay(
(ChipClusters.MediaPlaybackCluster.MediaPlayResponseCallback) callback);
},
() -> new DelegatedMediaPlayResponseCallback(),
mediaPlaybackmediaPlayCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaPlay", mediaPlaybackmediaPlayCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaPreviousCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaPreviousCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaPreviousResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaPreviousCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaPrevious(
(ChipClusters.MediaPlaybackCluster.MediaPreviousResponseCallback) callback);
},
() -> new DelegatedMediaPreviousResponseCallback(),
mediaPlaybackmediaPreviousCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaPrevious", mediaPlaybackmediaPreviousCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaRewindCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaRewindCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaRewindResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaRewindCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaRewind(
(ChipClusters.MediaPlaybackCluster.MediaRewindResponseCallback) callback);
},
() -> new DelegatedMediaRewindResponseCallback(),
mediaPlaybackmediaRewindCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaRewind", mediaPlaybackmediaRewindCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaSeekCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaSeekCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaSeekResponseCallback.class);
CommandParameterInfo mediaPlaybackmediaSeekpositionCommandParameterInfo =
new CommandParameterInfo("position", long.class);
mediaPlaybackmediaSeekCommandParams.put(
"position", mediaPlaybackmediaSeekpositionCommandParameterInfo);
// Populate commands
CommandInfo mediaPlaybackmediaSeekCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaSeek(
(ChipClusters.MediaPlaybackCluster.MediaSeekResponseCallback) callback,
(Long) commandArguments.get("position"));
},
() -> new DelegatedMediaSeekResponseCallback(),
mediaPlaybackmediaSeekCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaSeek", mediaPlaybackmediaSeekCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaSkipBackwardCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaSkipBackwardCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback",
ChipClusters.MediaPlaybackCluster.MediaSkipBackwardResponseCallback.class);
CommandParameterInfo
mediaPlaybackmediaSkipBackwarddeltaPositionMillisecondsCommandParameterInfo =
new CommandParameterInfo("deltaPositionMilliseconds", long.class);
mediaPlaybackmediaSkipBackwardCommandParams.put(
"deltaPositionMilliseconds",
mediaPlaybackmediaSkipBackwarddeltaPositionMillisecondsCommandParameterInfo);
// Populate commands
CommandInfo mediaPlaybackmediaSkipBackwardCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaSkipBackward(
(ChipClusters.MediaPlaybackCluster.MediaSkipBackwardResponseCallback)
callback,
(Long) commandArguments.get("deltaPositionMilliseconds"));
},
() -> new DelegatedMediaSkipBackwardResponseCallback(),
mediaPlaybackmediaSkipBackwardCommandParams);
mediaPlaybackClusterCommandInfoMap.put(
"mediaSkipBackward", mediaPlaybackmediaSkipBackwardCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaSkipForwardCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaSkipForwardCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback",
ChipClusters.MediaPlaybackCluster.MediaSkipForwardResponseCallback.class);
CommandParameterInfo
mediaPlaybackmediaSkipForwarddeltaPositionMillisecondsCommandParameterInfo =
new CommandParameterInfo("deltaPositionMilliseconds", long.class);
mediaPlaybackmediaSkipForwardCommandParams.put(
"deltaPositionMilliseconds",
mediaPlaybackmediaSkipForwarddeltaPositionMillisecondsCommandParameterInfo);
// Populate commands
CommandInfo mediaPlaybackmediaSkipForwardCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaSkipForward(
(ChipClusters.MediaPlaybackCluster.MediaSkipForwardResponseCallback) callback,
(Long) commandArguments.get("deltaPositionMilliseconds"));
},
() -> new DelegatedMediaSkipForwardResponseCallback(),
mediaPlaybackmediaSkipForwardCommandParams);
mediaPlaybackClusterCommandInfoMap.put(
"mediaSkipForward", mediaPlaybackmediaSkipForwardCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaStartOverCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaStartOverCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback",
ChipClusters.MediaPlaybackCluster.MediaStartOverResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaStartOverCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaStartOver(
(ChipClusters.MediaPlaybackCluster.MediaStartOverResponseCallback) callback);
},
() -> new DelegatedMediaStartOverResponseCallback(),
mediaPlaybackmediaStartOverCommandParams);
mediaPlaybackClusterCommandInfoMap.put(
"mediaStartOver", mediaPlaybackmediaStartOverCommandInfo);
Map<String, CommandParameterInfo> mediaPlaybackmediaStopCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo mediaPlaybackmediaStopCommandParameterInfo =
new CommandParameterInfo(
"MediaPlayback", ChipClusters.MediaPlaybackCluster.MediaStopResponseCallback.class);
// Populate commands
CommandInfo mediaPlaybackmediaStopCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.MediaPlaybackCluster) cluster)
.mediaStop(
(ChipClusters.MediaPlaybackCluster.MediaStopResponseCallback) callback);
},
() -> new DelegatedMediaStopResponseCallback(),
mediaPlaybackmediaStopCommandParams);
mediaPlaybackClusterCommandInfoMap.put("mediaStop", mediaPlaybackmediaStopCommandInfo);
// Populate cluster
ClusterInfo mediaPlaybackClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.MediaPlaybackCluster(ptr, endpointId),
mediaPlaybackClusterCommandInfoMap);
clusterMap.put("mediaPlayback", mediaPlaybackClusterInfo);
Map<String, CommandInfo> modeSelectClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> modeSelectchangeToModeCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo modeSelectchangeToModeCommandParameterInfo =
new CommandParameterInfo("ModeSelect", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo modeSelectchangeToModenewModeCommandParameterInfo =
new CommandParameterInfo("newMode", int.class);
modeSelectchangeToModeCommandParams.put(
"newMode", modeSelectchangeToModenewModeCommandParameterInfo);
// Populate commands
CommandInfo modeSelectchangeToModeCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ModeSelectCluster) cluster)
.changeToMode(
(DefaultClusterCallback) callback, (Integer) commandArguments.get("newMode"));
},
() -> new DelegatedDefaultClusterCallback(),
modeSelectchangeToModeCommandParams);
modeSelectClusterCommandInfoMap.put("changeToMode", modeSelectchangeToModeCommandInfo);
// Populate cluster
ClusterInfo modeSelectClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ModeSelectCluster(ptr, endpointId),
modeSelectClusterCommandInfoMap);
clusterMap.put("modeSelect", modeSelectClusterInfo);
Map<String, CommandInfo> networkCommissioningClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> networkCommissioningaddThreadNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningaddThreadNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.AddThreadNetworkResponseCallback.class);
CommandParameterInfo
networkCommissioningaddThreadNetworkoperationalDatasetCommandParameterInfo =
new CommandParameterInfo("operationalDataset", byte[].class);
networkCommissioningaddThreadNetworkCommandParams.put(
"operationalDataset",
networkCommissioningaddThreadNetworkoperationalDatasetCommandParameterInfo);
CommandParameterInfo networkCommissioningaddThreadNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningaddThreadNetworkCommandParams.put(
"breadcrumb", networkCommissioningaddThreadNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningaddThreadNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningaddThreadNetworkCommandParams.put(
"timeoutMs", networkCommissioningaddThreadNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningaddThreadNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.addThreadNetwork(
(ChipClusters.NetworkCommissioningCluster.AddThreadNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("operationalDataset"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedAddThreadNetworkResponseCallback(),
networkCommissioningaddThreadNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"addThreadNetwork", networkCommissioningaddThreadNetworkCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningaddWiFiNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningaddWiFiNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.AddWiFiNetworkResponseCallback.class);
CommandParameterInfo networkCommissioningaddWiFiNetworkssidCommandParameterInfo =
new CommandParameterInfo("ssid", byte[].class);
networkCommissioningaddWiFiNetworkCommandParams.put(
"ssid", networkCommissioningaddWiFiNetworkssidCommandParameterInfo);
CommandParameterInfo networkCommissioningaddWiFiNetworkcredentialsCommandParameterInfo =
new CommandParameterInfo("credentials", byte[].class);
networkCommissioningaddWiFiNetworkCommandParams.put(
"credentials", networkCommissioningaddWiFiNetworkcredentialsCommandParameterInfo);
CommandParameterInfo networkCommissioningaddWiFiNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningaddWiFiNetworkCommandParams.put(
"breadcrumb", networkCommissioningaddWiFiNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningaddWiFiNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningaddWiFiNetworkCommandParams.put(
"timeoutMs", networkCommissioningaddWiFiNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningaddWiFiNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.addWiFiNetwork(
(ChipClusters.NetworkCommissioningCluster.AddWiFiNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("ssid"),
(byte[]) commandArguments.get("credentials"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedAddWiFiNetworkResponseCallback(),
networkCommissioningaddWiFiNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"addWiFiNetwork", networkCommissioningaddWiFiNetworkCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningdisableNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningdisableNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.DisableNetworkResponseCallback.class);
CommandParameterInfo networkCommissioningdisableNetworknetworkIDCommandParameterInfo =
new CommandParameterInfo("networkID", byte[].class);
networkCommissioningdisableNetworkCommandParams.put(
"networkID", networkCommissioningdisableNetworknetworkIDCommandParameterInfo);
CommandParameterInfo networkCommissioningdisableNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningdisableNetworkCommandParams.put(
"breadcrumb", networkCommissioningdisableNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningdisableNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningdisableNetworkCommandParams.put(
"timeoutMs", networkCommissioningdisableNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningdisableNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.disableNetwork(
(ChipClusters.NetworkCommissioningCluster.DisableNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("networkID"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedDisableNetworkResponseCallback(),
networkCommissioningdisableNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"disableNetwork", networkCommissioningdisableNetworkCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningenableNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningenableNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.EnableNetworkResponseCallback.class);
CommandParameterInfo networkCommissioningenableNetworknetworkIDCommandParameterInfo =
new CommandParameterInfo("networkID", byte[].class);
networkCommissioningenableNetworkCommandParams.put(
"networkID", networkCommissioningenableNetworknetworkIDCommandParameterInfo);
CommandParameterInfo networkCommissioningenableNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningenableNetworkCommandParams.put(
"breadcrumb", networkCommissioningenableNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningenableNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningenableNetworkCommandParams.put(
"timeoutMs", networkCommissioningenableNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningenableNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.enableNetwork(
(ChipClusters.NetworkCommissioningCluster.EnableNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("networkID"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedEnableNetworkResponseCallback(),
networkCommissioningenableNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"enableNetwork", networkCommissioningenableNetworkCommandInfo);
Map<String, CommandParameterInfo>
networkCommissioninggetLastNetworkCommissioningResultCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioninggetLastNetworkCommissioningResultCommandParameterInfo =
new CommandParameterInfo("NetworkCommissioning", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
networkCommissioninggetLastNetworkCommissioningResulttimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioninggetLastNetworkCommissioningResultCommandParams.put(
"timeoutMs",
networkCommissioninggetLastNetworkCommissioningResulttimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioninggetLastNetworkCommissioningResultCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.getLastNetworkCommissioningResult(
(DefaultClusterCallback) callback, (Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedDefaultClusterCallback(),
networkCommissioninggetLastNetworkCommissioningResultCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"getLastNetworkCommissioningResult",
networkCommissioninggetLastNetworkCommissioningResultCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningremoveNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningremoveNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.RemoveNetworkResponseCallback.class);
CommandParameterInfo networkCommissioningremoveNetworknetworkIDCommandParameterInfo =
new CommandParameterInfo("networkID", byte[].class);
networkCommissioningremoveNetworkCommandParams.put(
"networkID", networkCommissioningremoveNetworknetworkIDCommandParameterInfo);
CommandParameterInfo networkCommissioningremoveNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningremoveNetworkCommandParams.put(
"breadcrumb", networkCommissioningremoveNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningremoveNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningremoveNetworkCommandParams.put(
"timeoutMs", networkCommissioningremoveNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningremoveNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.removeNetwork(
(ChipClusters.NetworkCommissioningCluster.RemoveNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("networkID"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedRemoveNetworkResponseCallback(),
networkCommissioningremoveNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"removeNetwork", networkCommissioningremoveNetworkCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningscanNetworksCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningscanNetworksCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.ScanNetworksResponseCallback.class);
CommandParameterInfo networkCommissioningscanNetworksssidCommandParameterInfo =
new CommandParameterInfo("ssid", byte[].class);
networkCommissioningscanNetworksCommandParams.put(
"ssid", networkCommissioningscanNetworksssidCommandParameterInfo);
CommandParameterInfo networkCommissioningscanNetworksbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningscanNetworksCommandParams.put(
"breadcrumb", networkCommissioningscanNetworksbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningscanNetworkstimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningscanNetworksCommandParams.put(
"timeoutMs", networkCommissioningscanNetworkstimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningscanNetworksCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.scanNetworks(
(ChipClusters.NetworkCommissioningCluster.ScanNetworksResponseCallback)
callback,
(byte[]) commandArguments.get("ssid"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedScanNetworksResponseCallback(),
networkCommissioningscanNetworksCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"scanNetworks", networkCommissioningscanNetworksCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningupdateThreadNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningupdateThreadNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.UpdateThreadNetworkResponseCallback.class);
CommandParameterInfo
networkCommissioningupdateThreadNetworkoperationalDatasetCommandParameterInfo =
new CommandParameterInfo("operationalDataset", byte[].class);
networkCommissioningupdateThreadNetworkCommandParams.put(
"operationalDataset",
networkCommissioningupdateThreadNetworkoperationalDatasetCommandParameterInfo);
CommandParameterInfo networkCommissioningupdateThreadNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningupdateThreadNetworkCommandParams.put(
"breadcrumb", networkCommissioningupdateThreadNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningupdateThreadNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningupdateThreadNetworkCommandParams.put(
"timeoutMs", networkCommissioningupdateThreadNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningupdateThreadNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.updateThreadNetwork(
(ChipClusters.NetworkCommissioningCluster.UpdateThreadNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("operationalDataset"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedUpdateThreadNetworkResponseCallback(),
networkCommissioningupdateThreadNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"updateThreadNetwork", networkCommissioningupdateThreadNetworkCommandInfo);
Map<String, CommandParameterInfo> networkCommissioningupdateWiFiNetworkCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo networkCommissioningupdateWiFiNetworkCommandParameterInfo =
new CommandParameterInfo(
"NetworkCommissioning",
ChipClusters.NetworkCommissioningCluster.UpdateWiFiNetworkResponseCallback.class);
CommandParameterInfo networkCommissioningupdateWiFiNetworkssidCommandParameterInfo =
new CommandParameterInfo("ssid", byte[].class);
networkCommissioningupdateWiFiNetworkCommandParams.put(
"ssid", networkCommissioningupdateWiFiNetworkssidCommandParameterInfo);
CommandParameterInfo networkCommissioningupdateWiFiNetworkcredentialsCommandParameterInfo =
new CommandParameterInfo("credentials", byte[].class);
networkCommissioningupdateWiFiNetworkCommandParams.put(
"credentials", networkCommissioningupdateWiFiNetworkcredentialsCommandParameterInfo);
CommandParameterInfo networkCommissioningupdateWiFiNetworkbreadcrumbCommandParameterInfo =
new CommandParameterInfo("breadcrumb", long.class);
networkCommissioningupdateWiFiNetworkCommandParams.put(
"breadcrumb", networkCommissioningupdateWiFiNetworkbreadcrumbCommandParameterInfo);
CommandParameterInfo networkCommissioningupdateWiFiNetworktimeoutMsCommandParameterInfo =
new CommandParameterInfo("timeoutMs", long.class);
networkCommissioningupdateWiFiNetworkCommandParams.put(
"timeoutMs", networkCommissioningupdateWiFiNetworktimeoutMsCommandParameterInfo);
// Populate commands
CommandInfo networkCommissioningupdateWiFiNetworkCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.NetworkCommissioningCluster) cluster)
.updateWiFiNetwork(
(ChipClusters.NetworkCommissioningCluster.UpdateWiFiNetworkResponseCallback)
callback,
(byte[]) commandArguments.get("ssid"),
(byte[]) commandArguments.get("credentials"),
(Long) commandArguments.get("breadcrumb"),
(Long) commandArguments.get("timeoutMs"));
},
() -> new DelegatedUpdateWiFiNetworkResponseCallback(),
networkCommissioningupdateWiFiNetworkCommandParams);
networkCommissioningClusterCommandInfoMap.put(
"updateWiFiNetwork", networkCommissioningupdateWiFiNetworkCommandInfo);
// Populate cluster
ClusterInfo networkCommissioningClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.NetworkCommissioningCluster(ptr, endpointId),
networkCommissioningClusterCommandInfoMap);
clusterMap.put("networkCommissioning", networkCommissioningClusterInfo);
Map<String, CommandInfo> otaSoftwareUpdateProviderClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> otaSoftwareUpdateProviderapplyUpdateRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo otaSoftwareUpdateProviderapplyUpdateRequestCommandParameterInfo =
new CommandParameterInfo(
"OtaSoftwareUpdateProvider",
ChipClusters.OtaSoftwareUpdateProviderCluster.ApplyUpdateRequestResponseCallback.class);
CommandParameterInfo
otaSoftwareUpdateProviderapplyUpdateRequestupdateTokenCommandParameterInfo =
new CommandParameterInfo("updateToken", byte[].class);
otaSoftwareUpdateProviderapplyUpdateRequestCommandParams.put(
"updateToken", otaSoftwareUpdateProviderapplyUpdateRequestupdateTokenCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateProviderapplyUpdateRequestnewVersionCommandParameterInfo =
new CommandParameterInfo("newVersion", long.class);
otaSoftwareUpdateProviderapplyUpdateRequestCommandParams.put(
"newVersion", otaSoftwareUpdateProviderapplyUpdateRequestnewVersionCommandParameterInfo);
// Populate commands
CommandInfo otaSoftwareUpdateProviderapplyUpdateRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OtaSoftwareUpdateProviderCluster) cluster)
.applyUpdateRequest(
(ChipClusters.OtaSoftwareUpdateProviderCluster
.ApplyUpdateRequestResponseCallback)
callback,
(byte[]) commandArguments.get("updateToken"),
(Long) commandArguments.get("newVersion"));
},
() -> new DelegatedApplyUpdateRequestResponseCallback(),
otaSoftwareUpdateProviderapplyUpdateRequestCommandParams);
otaSoftwareUpdateProviderClusterCommandInfoMap.put(
"applyUpdateRequest", otaSoftwareUpdateProviderapplyUpdateRequestCommandInfo);
Map<String, CommandParameterInfo> otaSoftwareUpdateProvidernotifyUpdateAppliedCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo otaSoftwareUpdateProvidernotifyUpdateAppliedCommandParameterInfo =
new CommandParameterInfo(
"OtaSoftwareUpdateProvider", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
otaSoftwareUpdateProvidernotifyUpdateAppliedupdateTokenCommandParameterInfo =
new CommandParameterInfo("updateToken", byte[].class);
otaSoftwareUpdateProvidernotifyUpdateAppliedCommandParams.put(
"updateToken", otaSoftwareUpdateProvidernotifyUpdateAppliedupdateTokenCommandParameterInfo);
CommandParameterInfo
otaSoftwareUpdateProvidernotifyUpdateAppliedsoftwareVersionCommandParameterInfo =
new CommandParameterInfo("softwareVersion", long.class);
otaSoftwareUpdateProvidernotifyUpdateAppliedCommandParams.put(
"softwareVersion",
otaSoftwareUpdateProvidernotifyUpdateAppliedsoftwareVersionCommandParameterInfo);
// Populate commands
CommandInfo otaSoftwareUpdateProvidernotifyUpdateAppliedCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OtaSoftwareUpdateProviderCluster) cluster)
.notifyUpdateApplied(
(DefaultClusterCallback) callback,
(byte[]) commandArguments.get("updateToken"),
(Long) commandArguments.get("softwareVersion"));
},
() -> new DelegatedDefaultClusterCallback(),
otaSoftwareUpdateProvidernotifyUpdateAppliedCommandParams);
otaSoftwareUpdateProviderClusterCommandInfoMap.put(
"notifyUpdateApplied", otaSoftwareUpdateProvidernotifyUpdateAppliedCommandInfo);
Map<String, CommandParameterInfo> otaSoftwareUpdateProviderqueryImageCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo otaSoftwareUpdateProviderqueryImageCommandParameterInfo =
new CommandParameterInfo(
"OtaSoftwareUpdateProvider",
ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback.class);
CommandParameterInfo otaSoftwareUpdateProviderqueryImagevendorIdCommandParameterInfo =
new CommandParameterInfo("vendorId", int.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"vendorId", otaSoftwareUpdateProviderqueryImagevendorIdCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateProviderqueryImageproductIdCommandParameterInfo =
new CommandParameterInfo("productId", int.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"productId", otaSoftwareUpdateProviderqueryImageproductIdCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateProviderqueryImagehardwareVersionCommandParameterInfo =
new CommandParameterInfo("hardwareVersion", int.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"hardwareVersion", otaSoftwareUpdateProviderqueryImagehardwareVersionCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateProviderqueryImagesoftwareVersionCommandParameterInfo =
new CommandParameterInfo("softwareVersion", long.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"softwareVersion", otaSoftwareUpdateProviderqueryImagesoftwareVersionCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateProviderqueryImageprotocolsSupportedCommandParameterInfo =
new CommandParameterInfo("protocolsSupported", int.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"protocolsSupported",
otaSoftwareUpdateProviderqueryImageprotocolsSupportedCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateProviderqueryImagelocationCommandParameterInfo =
new CommandParameterInfo("location", String.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"location", otaSoftwareUpdateProviderqueryImagelocationCommandParameterInfo);
CommandParameterInfo
otaSoftwareUpdateProviderqueryImagerequestorCanConsentCommandParameterInfo =
new CommandParameterInfo("requestorCanConsent", boolean.class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"requestorCanConsent",
otaSoftwareUpdateProviderqueryImagerequestorCanConsentCommandParameterInfo);
CommandParameterInfo
otaSoftwareUpdateProviderqueryImagemetadataForProviderCommandParameterInfo =
new CommandParameterInfo("metadataForProvider", byte[].class);
otaSoftwareUpdateProviderqueryImageCommandParams.put(
"metadataForProvider",
otaSoftwareUpdateProviderqueryImagemetadataForProviderCommandParameterInfo);
// Populate commands
CommandInfo otaSoftwareUpdateProviderqueryImageCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OtaSoftwareUpdateProviderCluster) cluster)
.queryImage(
(ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback)
callback,
(Integer) commandArguments.get("vendorId"),
(Integer) commandArguments.get("productId"),
(Integer) commandArguments.get("hardwareVersion"),
(Long) commandArguments.get("softwareVersion"),
(Integer) commandArguments.get("protocolsSupported"),
(String) commandArguments.get("location"),
(Boolean) commandArguments.get("requestorCanConsent"),
(byte[]) commandArguments.get("metadataForProvider"));
},
() -> new DelegatedQueryImageResponseCallback(),
otaSoftwareUpdateProviderqueryImageCommandParams);
otaSoftwareUpdateProviderClusterCommandInfoMap.put(
"queryImage", otaSoftwareUpdateProviderqueryImageCommandInfo);
// Populate cluster
ClusterInfo otaSoftwareUpdateProviderClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.OtaSoftwareUpdateProviderCluster(ptr, endpointId),
otaSoftwareUpdateProviderClusterCommandInfoMap);
clusterMap.put("otaSoftwareUpdateProvider", otaSoftwareUpdateProviderClusterInfo);
Map<String, CommandInfo> otaSoftwareUpdateRequestorClusterCommandInfoMap =
new LinkedHashMap<>();
Map<String, CommandParameterInfo> otaSoftwareUpdateRequestorannounceOtaProviderCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProviderCommandParameterInfo =
new CommandParameterInfo(
"OtaSoftwareUpdateRequestor", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
otaSoftwareUpdateRequestorannounceOtaProviderproviderLocationCommandParameterInfo =
new CommandParameterInfo("providerLocation", long.class);
otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put(
"providerLocation",
otaSoftwareUpdateRequestorannounceOtaProviderproviderLocationCommandParameterInfo);
CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProvidervendorIdCommandParameterInfo =
new CommandParameterInfo("vendorId", int.class);
otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put(
"vendorId", otaSoftwareUpdateRequestorannounceOtaProvidervendorIdCommandParameterInfo);
CommandParameterInfo
otaSoftwareUpdateRequestorannounceOtaProviderannouncementReasonCommandParameterInfo =
new CommandParameterInfo("announcementReason", int.class);
otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put(
"announcementReason",
otaSoftwareUpdateRequestorannounceOtaProviderannouncementReasonCommandParameterInfo);
CommandParameterInfo
otaSoftwareUpdateRequestorannounceOtaProvidermetadataForNodeCommandParameterInfo =
new CommandParameterInfo("metadataForNode", byte[].class);
otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put(
"metadataForNode",
otaSoftwareUpdateRequestorannounceOtaProvidermetadataForNodeCommandParameterInfo);
// Populate commands
CommandInfo otaSoftwareUpdateRequestorannounceOtaProviderCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OtaSoftwareUpdateRequestorCluster) cluster)
.announceOtaProvider(
(DefaultClusterCallback) callback,
(Long) commandArguments.get("providerLocation"),
(Integer) commandArguments.get("vendorId"),
(Integer) commandArguments.get("announcementReason"),
(byte[]) commandArguments.get("metadataForNode"));
},
() -> new DelegatedDefaultClusterCallback(),
otaSoftwareUpdateRequestorannounceOtaProviderCommandParams);
otaSoftwareUpdateRequestorClusterCommandInfoMap.put(
"announceOtaProvider", otaSoftwareUpdateRequestorannounceOtaProviderCommandInfo);
// Populate cluster
ClusterInfo otaSoftwareUpdateRequestorClusterInfo =
new ClusterInfo(
(ptr, endpointId) ->
new ChipClusters.OtaSoftwareUpdateRequestorCluster(ptr, endpointId),
otaSoftwareUpdateRequestorClusterCommandInfoMap);
clusterMap.put("otaSoftwareUpdateRequestor", otaSoftwareUpdateRequestorClusterInfo);
Map<String, CommandInfo> occupancySensingClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo occupancySensingClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.OccupancySensingCluster(ptr, endpointId),
occupancySensingClusterCommandInfoMap);
clusterMap.put("occupancySensing", occupancySensingClusterInfo);
Map<String, CommandInfo> onOffClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> onOffoffCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo onOffoffCommandParameterInfo =
new CommandParameterInfo("OnOff", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo onOffoffCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OnOffCluster) cluster).off((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
onOffoffCommandParams);
onOffClusterCommandInfoMap.put("off", onOffoffCommandInfo);
Map<String, CommandParameterInfo> onOffoffWithEffectCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo onOffoffWithEffectCommandParameterInfo =
new CommandParameterInfo("OnOff", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo onOffoffWithEffecteffectIdCommandParameterInfo =
new CommandParameterInfo("effectId", int.class);
onOffoffWithEffectCommandParams.put("effectId", onOffoffWithEffecteffectIdCommandParameterInfo);
CommandParameterInfo onOffoffWithEffecteffectVariantCommandParameterInfo =
new CommandParameterInfo("effectVariant", int.class);
onOffoffWithEffectCommandParams.put(
"effectVariant", onOffoffWithEffecteffectVariantCommandParameterInfo);
// Populate commands
CommandInfo onOffoffWithEffectCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OnOffCluster) cluster)
.offWithEffect(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("effectId"),
(Integer) commandArguments.get("effectVariant"));
},
() -> new DelegatedDefaultClusterCallback(),
onOffoffWithEffectCommandParams);
onOffClusterCommandInfoMap.put("offWithEffect", onOffoffWithEffectCommandInfo);
Map<String, CommandParameterInfo> onOffonCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo onOffonCommandParameterInfo =
new CommandParameterInfo("OnOff", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo onOffonCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OnOffCluster) cluster).on((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
onOffonCommandParams);
onOffClusterCommandInfoMap.put("on", onOffonCommandInfo);
Map<String, CommandParameterInfo> onOffonWithRecallGlobalSceneCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo onOffonWithRecallGlobalSceneCommandParameterInfo =
new CommandParameterInfo("OnOff", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo onOffonWithRecallGlobalSceneCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OnOffCluster) cluster)
.onWithRecallGlobalScene((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
onOffonWithRecallGlobalSceneCommandParams);
onOffClusterCommandInfoMap.put(
"onWithRecallGlobalScene", onOffonWithRecallGlobalSceneCommandInfo);
Map<String, CommandParameterInfo> onOffonWithTimedOffCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo onOffonWithTimedOffCommandParameterInfo =
new CommandParameterInfo("OnOff", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo onOffonWithTimedOffonOffControlCommandParameterInfo =
new CommandParameterInfo("onOffControl", int.class);
onOffonWithTimedOffCommandParams.put(
"onOffControl", onOffonWithTimedOffonOffControlCommandParameterInfo);
CommandParameterInfo onOffonWithTimedOffonTimeCommandParameterInfo =
new CommandParameterInfo("onTime", int.class);
onOffonWithTimedOffCommandParams.put("onTime", onOffonWithTimedOffonTimeCommandParameterInfo);
CommandParameterInfo onOffonWithTimedOffoffWaitTimeCommandParameterInfo =
new CommandParameterInfo("offWaitTime", int.class);
onOffonWithTimedOffCommandParams.put(
"offWaitTime", onOffonWithTimedOffoffWaitTimeCommandParameterInfo);
// Populate commands
CommandInfo onOffonWithTimedOffCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OnOffCluster) cluster)
.onWithTimedOff(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("onOffControl"),
(Integer) commandArguments.get("onTime"),
(Integer) commandArguments.get("offWaitTime"));
},
() -> new DelegatedDefaultClusterCallback(),
onOffonWithTimedOffCommandParams);
onOffClusterCommandInfoMap.put("onWithTimedOff", onOffonWithTimedOffCommandInfo);
Map<String, CommandParameterInfo> onOfftoggleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo onOfftoggleCommandParameterInfo =
new CommandParameterInfo("OnOff", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo onOfftoggleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OnOffCluster) cluster).toggle((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
onOfftoggleCommandParams);
onOffClusterCommandInfoMap.put("toggle", onOfftoggleCommandInfo);
// Populate cluster
ClusterInfo onOffClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.OnOffCluster(ptr, endpointId),
onOffClusterCommandInfoMap);
clusterMap.put("onOff", onOffClusterInfo);
Map<String, CommandInfo> onOffSwitchConfigurationClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo onOffSwitchConfigurationClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.OnOffSwitchConfigurationCluster(ptr, endpointId),
onOffSwitchConfigurationClusterCommandInfoMap);
clusterMap.put("onOffSwitchConfiguration", onOffSwitchConfigurationClusterInfo);
Map<String, CommandInfo> operationalCredentialsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> operationalCredentialsaddNOCCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsaddNOCCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.NOCResponseCallback.class);
CommandParameterInfo operationalCredentialsaddNOCNOCValueCommandParameterInfo =
new CommandParameterInfo("NOCValue", byte[].class);
operationalCredentialsaddNOCCommandParams.put(
"NOCValue", operationalCredentialsaddNOCNOCValueCommandParameterInfo);
CommandParameterInfo operationalCredentialsaddNOCICACValueCommandParameterInfo =
new CommandParameterInfo("ICACValue", byte[].class);
operationalCredentialsaddNOCCommandParams.put(
"ICACValue", operationalCredentialsaddNOCICACValueCommandParameterInfo);
CommandParameterInfo operationalCredentialsaddNOCIPKValueCommandParameterInfo =
new CommandParameterInfo("IPKValue", byte[].class);
operationalCredentialsaddNOCCommandParams.put(
"IPKValue", operationalCredentialsaddNOCIPKValueCommandParameterInfo);
CommandParameterInfo operationalCredentialsaddNOCcaseAdminNodeCommandParameterInfo =
new CommandParameterInfo("caseAdminNode", long.class);
operationalCredentialsaddNOCCommandParams.put(
"caseAdminNode", operationalCredentialsaddNOCcaseAdminNodeCommandParameterInfo);
CommandParameterInfo operationalCredentialsaddNOCadminVendorIdCommandParameterInfo =
new CommandParameterInfo("adminVendorId", int.class);
operationalCredentialsaddNOCCommandParams.put(
"adminVendorId", operationalCredentialsaddNOCadminVendorIdCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsaddNOCCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.addNOC(
(ChipClusters.OperationalCredentialsCluster.NOCResponseCallback) callback,
(byte[]) commandArguments.get("NOCValue"),
(byte[]) commandArguments.get("ICACValue"),
(byte[]) commandArguments.get("IPKValue"),
(Long) commandArguments.get("caseAdminNode"),
(Integer) commandArguments.get("adminVendorId"));
},
() -> new DelegatedNOCResponseCallback(),
operationalCredentialsaddNOCCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"addNOC", operationalCredentialsaddNOCCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialsaddTrustedRootCertificateCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsaddTrustedRootCertificateCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
operationalCredentialsaddTrustedRootCertificaterootCertificateCommandParameterInfo =
new CommandParameterInfo("rootCertificate", byte[].class);
operationalCredentialsaddTrustedRootCertificateCommandParams.put(
"rootCertificate",
operationalCredentialsaddTrustedRootCertificaterootCertificateCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsaddTrustedRootCertificateCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.addTrustedRootCertificate(
(DefaultClusterCallback) callback,
(byte[]) commandArguments.get("rootCertificate"));
},
() -> new DelegatedDefaultClusterCallback(),
operationalCredentialsaddTrustedRootCertificateCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"addTrustedRootCertificate", operationalCredentialsaddTrustedRootCertificateCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialsattestationRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsattestationRequestCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.AttestationResponseCallback.class);
CommandParameterInfo
operationalCredentialsattestationRequestattestationNonceCommandParameterInfo =
new CommandParameterInfo("attestationNonce", byte[].class);
operationalCredentialsattestationRequestCommandParams.put(
"attestationNonce",
operationalCredentialsattestationRequestattestationNonceCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsattestationRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.attestationRequest(
(ChipClusters.OperationalCredentialsCluster.AttestationResponseCallback)
callback,
(byte[]) commandArguments.get("attestationNonce"));
},
() -> new DelegatedAttestationResponseCallback(),
operationalCredentialsattestationRequestCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"attestationRequest", operationalCredentialsattestationRequestCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialscertificateChainRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialscertificateChainRequestCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.CertificateChainResponseCallback.class);
CommandParameterInfo
operationalCredentialscertificateChainRequestcertificateTypeCommandParameterInfo =
new CommandParameterInfo("certificateType", int.class);
operationalCredentialscertificateChainRequestCommandParams.put(
"certificateType",
operationalCredentialscertificateChainRequestcertificateTypeCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialscertificateChainRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.certificateChainRequest(
(ChipClusters.OperationalCredentialsCluster.CertificateChainResponseCallback)
callback,
(Integer) commandArguments.get("certificateType"));
},
() -> new DelegatedCertificateChainResponseCallback(),
operationalCredentialscertificateChainRequestCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"certificateChainRequest", operationalCredentialscertificateChainRequestCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialsopCSRRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsopCSRRequestCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.OpCSRResponseCallback.class);
CommandParameterInfo operationalCredentialsopCSRRequestCSRNonceCommandParameterInfo =
new CommandParameterInfo("CSRNonce", byte[].class);
operationalCredentialsopCSRRequestCommandParams.put(
"CSRNonce", operationalCredentialsopCSRRequestCSRNonceCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsopCSRRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.opCSRRequest(
(ChipClusters.OperationalCredentialsCluster.OpCSRResponseCallback) callback,
(byte[]) commandArguments.get("CSRNonce"));
},
() -> new DelegatedOpCSRResponseCallback(),
operationalCredentialsopCSRRequestCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"opCSRRequest", operationalCredentialsopCSRRequestCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialsremoveFabricCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsremoveFabricCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.NOCResponseCallback.class);
CommandParameterInfo operationalCredentialsremoveFabricfabricIndexCommandParameterInfo =
new CommandParameterInfo("fabricIndex", int.class);
operationalCredentialsremoveFabricCommandParams.put(
"fabricIndex", operationalCredentialsremoveFabricfabricIndexCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsremoveFabricCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.removeFabric(
(ChipClusters.OperationalCredentialsCluster.NOCResponseCallback) callback,
(Integer) commandArguments.get("fabricIndex"));
},
() -> new DelegatedNOCResponseCallback(),
operationalCredentialsremoveFabricCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"removeFabric", operationalCredentialsremoveFabricCommandInfo);
Map<String, CommandParameterInfo>
operationalCredentialsremoveTrustedRootCertificateCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsremoveTrustedRootCertificateCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
operationalCredentialsremoveTrustedRootCertificatetrustedRootIdentifierCommandParameterInfo =
new CommandParameterInfo("trustedRootIdentifier", byte[].class);
operationalCredentialsremoveTrustedRootCertificateCommandParams.put(
"trustedRootIdentifier",
operationalCredentialsremoveTrustedRootCertificatetrustedRootIdentifierCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsremoveTrustedRootCertificateCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.removeTrustedRootCertificate(
(DefaultClusterCallback) callback,
(byte[]) commandArguments.get("trustedRootIdentifier"));
},
() -> new DelegatedDefaultClusterCallback(),
operationalCredentialsremoveTrustedRootCertificateCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"removeTrustedRootCertificate",
operationalCredentialsremoveTrustedRootCertificateCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialsupdateFabricLabelCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsupdateFabricLabelCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.NOCResponseCallback.class);
CommandParameterInfo operationalCredentialsupdateFabricLabellabelCommandParameterInfo =
new CommandParameterInfo("label", String.class);
operationalCredentialsupdateFabricLabelCommandParams.put(
"label", operationalCredentialsupdateFabricLabellabelCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsupdateFabricLabelCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.updateFabricLabel(
(ChipClusters.OperationalCredentialsCluster.NOCResponseCallback) callback,
(String) commandArguments.get("label"));
},
() -> new DelegatedNOCResponseCallback(),
operationalCredentialsupdateFabricLabelCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"updateFabricLabel", operationalCredentialsupdateFabricLabelCommandInfo);
Map<String, CommandParameterInfo> operationalCredentialsupdateNOCCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo operationalCredentialsupdateNOCCommandParameterInfo =
new CommandParameterInfo(
"OperationalCredentials",
ChipClusters.OperationalCredentialsCluster.NOCResponseCallback.class);
CommandParameterInfo operationalCredentialsupdateNOCNOCValueCommandParameterInfo =
new CommandParameterInfo("NOCValue", byte[].class);
operationalCredentialsupdateNOCCommandParams.put(
"NOCValue", operationalCredentialsupdateNOCNOCValueCommandParameterInfo);
CommandParameterInfo operationalCredentialsupdateNOCICACValueCommandParameterInfo =
new CommandParameterInfo("ICACValue", byte[].class);
operationalCredentialsupdateNOCCommandParams.put(
"ICACValue", operationalCredentialsupdateNOCICACValueCommandParameterInfo);
// Populate commands
CommandInfo operationalCredentialsupdateNOCCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.OperationalCredentialsCluster) cluster)
.updateNOC(
(ChipClusters.OperationalCredentialsCluster.NOCResponseCallback) callback,
(byte[]) commandArguments.get("NOCValue"),
(byte[]) commandArguments.get("ICACValue"));
},
() -> new DelegatedNOCResponseCallback(),
operationalCredentialsupdateNOCCommandParams);
operationalCredentialsClusterCommandInfoMap.put(
"updateNOC", operationalCredentialsupdateNOCCommandInfo);
// Populate cluster
ClusterInfo operationalCredentialsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.OperationalCredentialsCluster(ptr, endpointId),
operationalCredentialsClusterCommandInfoMap);
clusterMap.put("operationalCredentials", operationalCredentialsClusterInfo);
Map<String, CommandInfo> powerSourceClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo powerSourceClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.PowerSourceCluster(ptr, endpointId),
powerSourceClusterCommandInfoMap);
clusterMap.put("powerSource", powerSourceClusterInfo);
Map<String, CommandInfo> pressureMeasurementClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo pressureMeasurementClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.PressureMeasurementCluster(ptr, endpointId),
pressureMeasurementClusterCommandInfoMap);
clusterMap.put("pressureMeasurement", pressureMeasurementClusterInfo);
Map<String, CommandInfo> pumpConfigurationAndControlClusterCommandInfoMap =
new LinkedHashMap<>();
// Populate cluster
ClusterInfo pumpConfigurationAndControlClusterInfo =
new ClusterInfo(
(ptr, endpointId) ->
new ChipClusters.PumpConfigurationAndControlCluster(ptr, endpointId),
pumpConfigurationAndControlClusterCommandInfoMap);
clusterMap.put("pumpConfigurationAndControl", pumpConfigurationAndControlClusterInfo);
Map<String, CommandInfo> relativeHumidityMeasurementClusterCommandInfoMap =
new LinkedHashMap<>();
// Populate cluster
ClusterInfo relativeHumidityMeasurementClusterInfo =
new ClusterInfo(
(ptr, endpointId) ->
new ChipClusters.RelativeHumidityMeasurementCluster(ptr, endpointId),
relativeHumidityMeasurementClusterCommandInfoMap);
clusterMap.put("relativeHumidityMeasurement", relativeHumidityMeasurementClusterInfo);
Map<String, CommandInfo> scenesClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> scenesaddSceneCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesaddSceneCommandParameterInfo =
new CommandParameterInfo(
"Scenes", ChipClusters.ScenesCluster.AddSceneResponseCallback.class);
CommandParameterInfo scenesaddScenegroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesaddSceneCommandParams.put("groupId", scenesaddScenegroupIdCommandParameterInfo);
CommandParameterInfo scenesaddScenesceneIdCommandParameterInfo =
new CommandParameterInfo("sceneId", int.class);
scenesaddSceneCommandParams.put("sceneId", scenesaddScenesceneIdCommandParameterInfo);
CommandParameterInfo scenesaddScenetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
scenesaddSceneCommandParams.put(
"transitionTime", scenesaddScenetransitionTimeCommandParameterInfo);
CommandParameterInfo scenesaddScenesceneNameCommandParameterInfo =
new CommandParameterInfo("sceneName", String.class);
scenesaddSceneCommandParams.put("sceneName", scenesaddScenesceneNameCommandParameterInfo);
CommandParameterInfo scenesaddSceneclusterIdCommandParameterInfo =
new CommandParameterInfo("clusterId", long.class);
scenesaddSceneCommandParams.put("clusterId", scenesaddSceneclusterIdCommandParameterInfo);
CommandParameterInfo scenesaddScenelengthCommandParameterInfo =
new CommandParameterInfo("length", int.class);
scenesaddSceneCommandParams.put("length", scenesaddScenelengthCommandParameterInfo);
CommandParameterInfo scenesaddScenevalueCommandParameterInfo =
new CommandParameterInfo("value", int.class);
scenesaddSceneCommandParams.put("value", scenesaddScenevalueCommandParameterInfo);
// Populate commands
CommandInfo scenesaddSceneCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.addScene(
(ChipClusters.ScenesCluster.AddSceneResponseCallback) callback,
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("sceneId"),
(Integer) commandArguments.get("transitionTime"),
(String) commandArguments.get("sceneName"),
(Long) commandArguments.get("clusterId"),
(Integer) commandArguments.get("length"),
(Integer) commandArguments.get("value"));
},
() -> new DelegatedAddSceneResponseCallback(),
scenesaddSceneCommandParams);
scenesClusterCommandInfoMap.put("addScene", scenesaddSceneCommandInfo);
Map<String, CommandParameterInfo> scenesgetSceneMembershipCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesgetSceneMembershipCommandParameterInfo =
new CommandParameterInfo(
"Scenes", ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback.class);
CommandParameterInfo scenesgetSceneMembershipgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesgetSceneMembershipCommandParams.put(
"groupId", scenesgetSceneMembershipgroupIdCommandParameterInfo);
// Populate commands
CommandInfo scenesgetSceneMembershipCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.getSceneMembership(
(ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback) callback,
(Integer) commandArguments.get("groupId"));
},
() -> new DelegatedGetSceneMembershipResponseCallback(),
scenesgetSceneMembershipCommandParams);
scenesClusterCommandInfoMap.put("getSceneMembership", scenesgetSceneMembershipCommandInfo);
Map<String, CommandParameterInfo> scenesrecallSceneCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesrecallSceneCommandParameterInfo =
new CommandParameterInfo("Scenes", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo scenesrecallScenegroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesrecallSceneCommandParams.put("groupId", scenesrecallScenegroupIdCommandParameterInfo);
CommandParameterInfo scenesrecallScenesceneIdCommandParameterInfo =
new CommandParameterInfo("sceneId", int.class);
scenesrecallSceneCommandParams.put("sceneId", scenesrecallScenesceneIdCommandParameterInfo);
CommandParameterInfo scenesrecallScenetransitionTimeCommandParameterInfo =
new CommandParameterInfo("transitionTime", int.class);
scenesrecallSceneCommandParams.put(
"transitionTime", scenesrecallScenetransitionTimeCommandParameterInfo);
// Populate commands
CommandInfo scenesrecallSceneCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.recallScene(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("sceneId"),
(Integer) commandArguments.get("transitionTime"));
},
() -> new DelegatedDefaultClusterCallback(),
scenesrecallSceneCommandParams);
scenesClusterCommandInfoMap.put("recallScene", scenesrecallSceneCommandInfo);
Map<String, CommandParameterInfo> scenesremoveAllScenesCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesremoveAllScenesCommandParameterInfo =
new CommandParameterInfo(
"Scenes", ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback.class);
CommandParameterInfo scenesremoveAllScenesgroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesremoveAllScenesCommandParams.put(
"groupId", scenesremoveAllScenesgroupIdCommandParameterInfo);
// Populate commands
CommandInfo scenesremoveAllScenesCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.removeAllScenes(
(ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback) callback,
(Integer) commandArguments.get("groupId"));
},
() -> new DelegatedRemoveAllScenesResponseCallback(),
scenesremoveAllScenesCommandParams);
scenesClusterCommandInfoMap.put("removeAllScenes", scenesremoveAllScenesCommandInfo);
Map<String, CommandParameterInfo> scenesremoveSceneCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesremoveSceneCommandParameterInfo =
new CommandParameterInfo(
"Scenes", ChipClusters.ScenesCluster.RemoveSceneResponseCallback.class);
CommandParameterInfo scenesremoveScenegroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesremoveSceneCommandParams.put("groupId", scenesremoveScenegroupIdCommandParameterInfo);
CommandParameterInfo scenesremoveScenesceneIdCommandParameterInfo =
new CommandParameterInfo("sceneId", int.class);
scenesremoveSceneCommandParams.put("sceneId", scenesremoveScenesceneIdCommandParameterInfo);
// Populate commands
CommandInfo scenesremoveSceneCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.removeScene(
(ChipClusters.ScenesCluster.RemoveSceneResponseCallback) callback,
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("sceneId"));
},
() -> new DelegatedRemoveSceneResponseCallback(),
scenesremoveSceneCommandParams);
scenesClusterCommandInfoMap.put("removeScene", scenesremoveSceneCommandInfo);
Map<String, CommandParameterInfo> scenesstoreSceneCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesstoreSceneCommandParameterInfo =
new CommandParameterInfo(
"Scenes", ChipClusters.ScenesCluster.StoreSceneResponseCallback.class);
CommandParameterInfo scenesstoreScenegroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesstoreSceneCommandParams.put("groupId", scenesstoreScenegroupIdCommandParameterInfo);
CommandParameterInfo scenesstoreScenesceneIdCommandParameterInfo =
new CommandParameterInfo("sceneId", int.class);
scenesstoreSceneCommandParams.put("sceneId", scenesstoreScenesceneIdCommandParameterInfo);
// Populate commands
CommandInfo scenesstoreSceneCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.storeScene(
(ChipClusters.ScenesCluster.StoreSceneResponseCallback) callback,
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("sceneId"));
},
() -> new DelegatedStoreSceneResponseCallback(),
scenesstoreSceneCommandParams);
scenesClusterCommandInfoMap.put("storeScene", scenesstoreSceneCommandInfo);
Map<String, CommandParameterInfo> scenesviewSceneCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo scenesviewSceneCommandParameterInfo =
new CommandParameterInfo(
"Scenes", ChipClusters.ScenesCluster.ViewSceneResponseCallback.class);
CommandParameterInfo scenesviewScenegroupIdCommandParameterInfo =
new CommandParameterInfo("groupId", int.class);
scenesviewSceneCommandParams.put("groupId", scenesviewScenegroupIdCommandParameterInfo);
CommandParameterInfo scenesviewScenesceneIdCommandParameterInfo =
new CommandParameterInfo("sceneId", int.class);
scenesviewSceneCommandParams.put("sceneId", scenesviewScenesceneIdCommandParameterInfo);
// Populate commands
CommandInfo scenesviewSceneCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ScenesCluster) cluster)
.viewScene(
(ChipClusters.ScenesCluster.ViewSceneResponseCallback) callback,
(Integer) commandArguments.get("groupId"),
(Integer) commandArguments.get("sceneId"));
},
() -> new DelegatedViewSceneResponseCallback(),
scenesviewSceneCommandParams);
scenesClusterCommandInfoMap.put("viewScene", scenesviewSceneCommandInfo);
// Populate cluster
ClusterInfo scenesClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ScenesCluster(ptr, endpointId),
scenesClusterCommandInfoMap);
clusterMap.put("scenes", scenesClusterInfo);
Map<String, CommandInfo> softwareDiagnosticsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> softwareDiagnosticsresetWatermarksCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo softwareDiagnosticsresetWatermarksCommandParameterInfo =
new CommandParameterInfo("SoftwareDiagnostics", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo softwareDiagnosticsresetWatermarksCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.SoftwareDiagnosticsCluster) cluster)
.resetWatermarks((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
softwareDiagnosticsresetWatermarksCommandParams);
softwareDiagnosticsClusterCommandInfoMap.put(
"resetWatermarks", softwareDiagnosticsresetWatermarksCommandInfo);
// Populate cluster
ClusterInfo softwareDiagnosticsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.SoftwareDiagnosticsCluster(ptr, endpointId),
softwareDiagnosticsClusterCommandInfoMap);
clusterMap.put("softwareDiagnostics", softwareDiagnosticsClusterInfo);
Map<String, CommandInfo> switchClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo switchClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.SwitchCluster(ptr, endpointId),
switchClusterCommandInfoMap);
clusterMap.put("switch", switchClusterInfo);
Map<String, CommandInfo> tvChannelClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> tvChannelchangeChannelCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo tvChannelchangeChannelCommandParameterInfo =
new CommandParameterInfo(
"TvChannel", ChipClusters.TvChannelCluster.ChangeChannelResponseCallback.class);
CommandParameterInfo tvChannelchangeChannelmatchCommandParameterInfo =
new CommandParameterInfo("match", String.class);
tvChannelchangeChannelCommandParams.put(
"match", tvChannelchangeChannelmatchCommandParameterInfo);
// Populate commands
CommandInfo tvChannelchangeChannelCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TvChannelCluster) cluster)
.changeChannel(
(ChipClusters.TvChannelCluster.ChangeChannelResponseCallback) callback,
(String) commandArguments.get("match"));
},
() -> new DelegatedChangeChannelResponseCallback(),
tvChannelchangeChannelCommandParams);
tvChannelClusterCommandInfoMap.put("changeChannel", tvChannelchangeChannelCommandInfo);
Map<String, CommandParameterInfo> tvChannelchangeChannelByNumberCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo tvChannelchangeChannelByNumberCommandParameterInfo =
new CommandParameterInfo("TvChannel", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo tvChannelchangeChannelByNumbermajorNumberCommandParameterInfo =
new CommandParameterInfo("majorNumber", int.class);
tvChannelchangeChannelByNumberCommandParams.put(
"majorNumber", tvChannelchangeChannelByNumbermajorNumberCommandParameterInfo);
CommandParameterInfo tvChannelchangeChannelByNumberminorNumberCommandParameterInfo =
new CommandParameterInfo("minorNumber", int.class);
tvChannelchangeChannelByNumberCommandParams.put(
"minorNumber", tvChannelchangeChannelByNumberminorNumberCommandParameterInfo);
// Populate commands
CommandInfo tvChannelchangeChannelByNumberCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TvChannelCluster) cluster)
.changeChannelByNumber(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("majorNumber"),
(Integer) commandArguments.get("minorNumber"));
},
() -> new DelegatedDefaultClusterCallback(),
tvChannelchangeChannelByNumberCommandParams);
tvChannelClusterCommandInfoMap.put(
"changeChannelByNumber", tvChannelchangeChannelByNumberCommandInfo);
Map<String, CommandParameterInfo> tvChannelskipChannelCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo tvChannelskipChannelCommandParameterInfo =
new CommandParameterInfo("TvChannel", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo tvChannelskipChannelcountCommandParameterInfo =
new CommandParameterInfo("count", int.class);
tvChannelskipChannelCommandParams.put("count", tvChannelskipChannelcountCommandParameterInfo);
// Populate commands
CommandInfo tvChannelskipChannelCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TvChannelCluster) cluster)
.skipChannel(
(DefaultClusterCallback) callback, (Integer) commandArguments.get("count"));
},
() -> new DelegatedDefaultClusterCallback(),
tvChannelskipChannelCommandParams);
tvChannelClusterCommandInfoMap.put("skipChannel", tvChannelskipChannelCommandInfo);
// Populate cluster
ClusterInfo tvChannelClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.TvChannelCluster(ptr, endpointId),
tvChannelClusterCommandInfoMap);
clusterMap.put("tvChannel", tvChannelClusterInfo);
Map<String, CommandInfo> targetNavigatorClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> targetNavigatornavigateTargetCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo targetNavigatornavigateTargetCommandParameterInfo =
new CommandParameterInfo(
"TargetNavigator",
ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback.class);
CommandParameterInfo targetNavigatornavigateTargettargetCommandParameterInfo =
new CommandParameterInfo("target", int.class);
targetNavigatornavigateTargetCommandParams.put(
"target", targetNavigatornavigateTargettargetCommandParameterInfo);
CommandParameterInfo targetNavigatornavigateTargetdataCommandParameterInfo =
new CommandParameterInfo("data", String.class);
targetNavigatornavigateTargetCommandParams.put(
"data", targetNavigatornavigateTargetdataCommandParameterInfo);
// Populate commands
CommandInfo targetNavigatornavigateTargetCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TargetNavigatorCluster) cluster)
.navigateTarget(
(ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback) callback,
(Integer) commandArguments.get("target"),
(String) commandArguments.get("data"));
},
() -> new DelegatedNavigateTargetResponseCallback(),
targetNavigatornavigateTargetCommandParams);
targetNavigatorClusterCommandInfoMap.put(
"navigateTarget", targetNavigatornavigateTargetCommandInfo);
// Populate cluster
ClusterInfo targetNavigatorClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.TargetNavigatorCluster(ptr, endpointId),
targetNavigatorClusterCommandInfoMap);
clusterMap.put("targetNavigator", targetNavigatorClusterInfo);
Map<String, CommandInfo> temperatureMeasurementClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo temperatureMeasurementClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.TemperatureMeasurementCluster(ptr, endpointId),
temperatureMeasurementClusterCommandInfoMap);
clusterMap.put("temperatureMeasurement", temperatureMeasurementClusterInfo);
Map<String, CommandInfo> testClusterClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> testClustertestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestCommandParameterInfo =
new CommandParameterInfo("TestCluster", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo testClustertestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster).test((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
testClustertestCommandParams);
testClusterClusterCommandInfoMap.put("test", testClustertestCommandInfo);
Map<String, CommandParameterInfo> testClustertestAddArgumentsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestAddArgumentsCommandParameterInfo =
new CommandParameterInfo(
"TestCluster", ChipClusters.TestClusterCluster.TestAddArgumentsResponseCallback.class);
CommandParameterInfo testClustertestAddArgumentsarg1CommandParameterInfo =
new CommandParameterInfo("arg1", int.class);
testClustertestAddArgumentsCommandParams.put(
"arg1", testClustertestAddArgumentsarg1CommandParameterInfo);
CommandParameterInfo testClustertestAddArgumentsarg2CommandParameterInfo =
new CommandParameterInfo("arg2", int.class);
testClustertestAddArgumentsCommandParams.put(
"arg2", testClustertestAddArgumentsarg2CommandParameterInfo);
// Populate commands
CommandInfo testClustertestAddArgumentsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testAddArguments(
(ChipClusters.TestClusterCluster.TestAddArgumentsResponseCallback) callback,
(Integer) commandArguments.get("arg1"),
(Integer) commandArguments.get("arg2"));
},
() -> new DelegatedTestAddArgumentsResponseCallback(),
testClustertestAddArgumentsCommandParams);
testClusterClusterCommandInfoMap.put(
"testAddArguments", testClustertestAddArgumentsCommandInfo);
Map<String, CommandParameterInfo> testClustertestEnumsRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestEnumsRequestCommandParameterInfo =
new CommandParameterInfo(
"TestCluster", ChipClusters.TestClusterCluster.TestEnumsResponseCallback.class);
CommandParameterInfo testClustertestEnumsRequestarg1CommandParameterInfo =
new CommandParameterInfo("arg1", int.class);
testClustertestEnumsRequestCommandParams.put(
"arg1", testClustertestEnumsRequestarg1CommandParameterInfo);
CommandParameterInfo testClustertestEnumsRequestarg2CommandParameterInfo =
new CommandParameterInfo("arg2", int.class);
testClustertestEnumsRequestCommandParams.put(
"arg2", testClustertestEnumsRequestarg2CommandParameterInfo);
// Populate commands
CommandInfo testClustertestEnumsRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testEnumsRequest(
(ChipClusters.TestClusterCluster.TestEnumsResponseCallback) callback,
(Integer) commandArguments.get("arg1"),
(Integer) commandArguments.get("arg2"));
},
() -> new DelegatedTestEnumsResponseCallback(),
testClustertestEnumsRequestCommandParams);
testClusterClusterCommandInfoMap.put(
"testEnumsRequest", testClustertestEnumsRequestCommandInfo);
Map<String, CommandParameterInfo> testClustertestListInt8UArgumentRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestListInt8UArgumentRequestCommandParameterInfo =
new CommandParameterInfo("TestCluster", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo testClustertestListInt8UArgumentRequestarg1CommandParameterInfo =
new CommandParameterInfo("arg1", int.class);
testClustertestListInt8UArgumentRequestCommandParams.put(
"arg1", testClustertestListInt8UArgumentRequestarg1CommandParameterInfo);
// Populate commands
CommandInfo testClustertestListInt8UArgumentRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testListInt8UArgumentRequest(
(DefaultClusterCallback) callback, (Integer) commandArguments.get("arg1"));
},
() -> new DelegatedDefaultClusterCallback(),
testClustertestListInt8UArgumentRequestCommandParams);
testClusterClusterCommandInfoMap.put(
"testListInt8UArgumentRequest", testClustertestListInt8UArgumentRequestCommandInfo);
Map<String, CommandParameterInfo> testClustertestListInt8UReverseRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestListInt8UReverseRequestCommandParameterInfo =
new CommandParameterInfo(
"TestCluster",
ChipClusters.TestClusterCluster.TestListInt8UReverseResponseCallback.class);
CommandParameterInfo testClustertestListInt8UReverseRequestarg1CommandParameterInfo =
new CommandParameterInfo("arg1", int.class);
testClustertestListInt8UReverseRequestCommandParams.put(
"arg1", testClustertestListInt8UReverseRequestarg1CommandParameterInfo);
// Populate commands
CommandInfo testClustertestListInt8UReverseRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testListInt8UReverseRequest(
(ChipClusters.TestClusterCluster.TestListInt8UReverseResponseCallback)
callback,
(Integer) commandArguments.get("arg1"));
},
() -> new DelegatedTestListInt8UReverseResponseCallback(),
testClustertestListInt8UReverseRequestCommandParams);
testClusterClusterCommandInfoMap.put(
"testListInt8UReverseRequest", testClustertestListInt8UReverseRequestCommandInfo);
Map<String, CommandParameterInfo> testClustertestListStructArgumentRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestListStructArgumentRequestCommandParameterInfo =
new CommandParameterInfo("TestCluster", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo testClustertestListStructArgumentRequestaCommandParameterInfo =
new CommandParameterInfo("a", int.class);
testClustertestListStructArgumentRequestCommandParams.put(
"a", testClustertestListStructArgumentRequestaCommandParameterInfo);
CommandParameterInfo testClustertestListStructArgumentRequestbCommandParameterInfo =
new CommandParameterInfo("b", boolean.class);
testClustertestListStructArgumentRequestCommandParams.put(
"b", testClustertestListStructArgumentRequestbCommandParameterInfo);
CommandParameterInfo testClustertestListStructArgumentRequestcCommandParameterInfo =
new CommandParameterInfo("c", int.class);
testClustertestListStructArgumentRequestCommandParams.put(
"c", testClustertestListStructArgumentRequestcCommandParameterInfo);
CommandParameterInfo testClustertestListStructArgumentRequestdCommandParameterInfo =
new CommandParameterInfo("d", byte[].class);
testClustertestListStructArgumentRequestCommandParams.put(
"d", testClustertestListStructArgumentRequestdCommandParameterInfo);
CommandParameterInfo testClustertestListStructArgumentRequesteCommandParameterInfo =
new CommandParameterInfo("e", String.class);
testClustertestListStructArgumentRequestCommandParams.put(
"e", testClustertestListStructArgumentRequesteCommandParameterInfo);
CommandParameterInfo testClustertestListStructArgumentRequestfCommandParameterInfo =
new CommandParameterInfo("f", int.class);
testClustertestListStructArgumentRequestCommandParams.put(
"f", testClustertestListStructArgumentRequestfCommandParameterInfo);
// Populate commands
CommandInfo testClustertestListStructArgumentRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testListStructArgumentRequest(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("a"),
(Boolean) commandArguments.get("b"),
(Integer) commandArguments.get("c"),
(byte[]) commandArguments.get("d"),
(String) commandArguments.get("e"),
(Integer) commandArguments.get("f"));
},
() -> new DelegatedDefaultClusterCallback(),
testClustertestListStructArgumentRequestCommandParams);
testClusterClusterCommandInfoMap.put(
"testListStructArgumentRequest", testClustertestListStructArgumentRequestCommandInfo);
Map<String, CommandParameterInfo> testClustertestNotHandledCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestNotHandledCommandParameterInfo =
new CommandParameterInfo("TestCluster", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo testClustertestNotHandledCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testNotHandled((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
testClustertestNotHandledCommandParams);
testClusterClusterCommandInfoMap.put("testNotHandled", testClustertestNotHandledCommandInfo);
Map<String, CommandParameterInfo> testClustertestNullableOptionalRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestNullableOptionalRequestCommandParameterInfo =
new CommandParameterInfo(
"TestCluster",
ChipClusters.TestClusterCluster.TestNullableOptionalResponseCallback.class);
CommandParameterInfo testClustertestNullableOptionalRequestarg1CommandParameterInfo =
new CommandParameterInfo("arg1", int.class);
testClustertestNullableOptionalRequestCommandParams.put(
"arg1", testClustertestNullableOptionalRequestarg1CommandParameterInfo);
// Populate commands
CommandInfo testClustertestNullableOptionalRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testNullableOptionalRequest(
(ChipClusters.TestClusterCluster.TestNullableOptionalResponseCallback)
callback,
(Integer) commandArguments.get("arg1"));
},
() -> new DelegatedTestNullableOptionalResponseCallback(),
testClustertestNullableOptionalRequestCommandParams);
testClusterClusterCommandInfoMap.put(
"testNullableOptionalRequest", testClustertestNullableOptionalRequestCommandInfo);
Map<String, CommandParameterInfo> testClustertestSpecificCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestSpecificCommandParameterInfo =
new CommandParameterInfo(
"TestCluster", ChipClusters.TestClusterCluster.TestSpecificResponseCallback.class);
// Populate commands
CommandInfo testClustertestSpecificCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testSpecific(
(ChipClusters.TestClusterCluster.TestSpecificResponseCallback) callback);
},
() -> new DelegatedTestSpecificResponseCallback(),
testClustertestSpecificCommandParams);
testClusterClusterCommandInfoMap.put("testSpecific", testClustertestSpecificCommandInfo);
Map<String, CommandParameterInfo> testClustertestStructArgumentRequestCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestStructArgumentRequestCommandParameterInfo =
new CommandParameterInfo("TestCluster", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo testClustertestStructArgumentRequestaCommandParameterInfo =
new CommandParameterInfo("a", int.class);
testClustertestStructArgumentRequestCommandParams.put(
"a", testClustertestStructArgumentRequestaCommandParameterInfo);
CommandParameterInfo testClustertestStructArgumentRequestbCommandParameterInfo =
new CommandParameterInfo("b", boolean.class);
testClustertestStructArgumentRequestCommandParams.put(
"b", testClustertestStructArgumentRequestbCommandParameterInfo);
CommandParameterInfo testClustertestStructArgumentRequestcCommandParameterInfo =
new CommandParameterInfo("c", int.class);
testClustertestStructArgumentRequestCommandParams.put(
"c", testClustertestStructArgumentRequestcCommandParameterInfo);
CommandParameterInfo testClustertestStructArgumentRequestdCommandParameterInfo =
new CommandParameterInfo("d", byte[].class);
testClustertestStructArgumentRequestCommandParams.put(
"d", testClustertestStructArgumentRequestdCommandParameterInfo);
CommandParameterInfo testClustertestStructArgumentRequesteCommandParameterInfo =
new CommandParameterInfo("e", String.class);
testClustertestStructArgumentRequestCommandParams.put(
"e", testClustertestStructArgumentRequesteCommandParameterInfo);
CommandParameterInfo testClustertestStructArgumentRequestfCommandParameterInfo =
new CommandParameterInfo("f", int.class);
testClustertestStructArgumentRequestCommandParams.put(
"f", testClustertestStructArgumentRequestfCommandParameterInfo);
// Populate commands
CommandInfo testClustertestStructArgumentRequestCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testStructArgumentRequest(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("a"),
(Boolean) commandArguments.get("b"),
(Integer) commandArguments.get("c"),
(byte[]) commandArguments.get("d"),
(String) commandArguments.get("e"),
(Integer) commandArguments.get("f"));
},
() -> new DelegatedDefaultClusterCallback(),
testClustertestStructArgumentRequestCommandParams);
testClusterClusterCommandInfoMap.put(
"testStructArgumentRequest", testClustertestStructArgumentRequestCommandInfo);
Map<String, CommandParameterInfo> testClustertestUnknownCommandCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo testClustertestUnknownCommandCommandParameterInfo =
new CommandParameterInfo("TestCluster", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo testClustertestUnknownCommandCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TestClusterCluster) cluster)
.testUnknownCommand((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
testClustertestUnknownCommandCommandParams);
testClusterClusterCommandInfoMap.put(
"testUnknownCommand", testClustertestUnknownCommandCommandInfo);
// Populate cluster
ClusterInfo testClusterClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.TestClusterCluster(ptr, endpointId),
testClusterClusterCommandInfoMap);
clusterMap.put("testCluster", testClusterClusterInfo);
Map<String, CommandInfo> thermostatClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> thermostatclearWeeklyScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo thermostatclearWeeklyScheduleCommandParameterInfo =
new CommandParameterInfo("Thermostat", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo thermostatclearWeeklyScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ThermostatCluster) cluster)
.clearWeeklySchedule((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
thermostatclearWeeklyScheduleCommandParams);
thermostatClusterCommandInfoMap.put(
"clearWeeklySchedule", thermostatclearWeeklyScheduleCommandInfo);
Map<String, CommandParameterInfo> thermostatgetRelayStatusLogCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo thermostatgetRelayStatusLogCommandParameterInfo =
new CommandParameterInfo("Thermostat", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo thermostatgetRelayStatusLogCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ThermostatCluster) cluster)
.getRelayStatusLog((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
thermostatgetRelayStatusLogCommandParams);
thermostatClusterCommandInfoMap.put(
"getRelayStatusLog", thermostatgetRelayStatusLogCommandInfo);
Map<String, CommandParameterInfo> thermostatgetWeeklyScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo thermostatgetWeeklyScheduleCommandParameterInfo =
new CommandParameterInfo("Thermostat", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo thermostatgetWeeklyScheduledaysToReturnCommandParameterInfo =
new CommandParameterInfo("daysToReturn", int.class);
thermostatgetWeeklyScheduleCommandParams.put(
"daysToReturn", thermostatgetWeeklyScheduledaysToReturnCommandParameterInfo);
CommandParameterInfo thermostatgetWeeklySchedulemodeToReturnCommandParameterInfo =
new CommandParameterInfo("modeToReturn", int.class);
thermostatgetWeeklyScheduleCommandParams.put(
"modeToReturn", thermostatgetWeeklySchedulemodeToReturnCommandParameterInfo);
// Populate commands
CommandInfo thermostatgetWeeklyScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ThermostatCluster) cluster)
.getWeeklySchedule(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("daysToReturn"),
(Integer) commandArguments.get("modeToReturn"));
},
() -> new DelegatedDefaultClusterCallback(),
thermostatgetWeeklyScheduleCommandParams);
thermostatClusterCommandInfoMap.put(
"getWeeklySchedule", thermostatgetWeeklyScheduleCommandInfo);
Map<String, CommandParameterInfo> thermostatsetWeeklyScheduleCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo thermostatsetWeeklyScheduleCommandParameterInfo =
new CommandParameterInfo("Thermostat", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo
thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo =
new CommandParameterInfo("numberOfTransitionsForSequence", int.class);
thermostatsetWeeklyScheduleCommandParams.put(
"numberOfTransitionsForSequence",
thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo);
CommandParameterInfo thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo =
new CommandParameterInfo("dayOfWeekForSequence", int.class);
thermostatsetWeeklyScheduleCommandParams.put(
"dayOfWeekForSequence",
thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo);
CommandParameterInfo thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo =
new CommandParameterInfo("modeForSequence", int.class);
thermostatsetWeeklyScheduleCommandParams.put(
"modeForSequence", thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo);
CommandParameterInfo thermostatsetWeeklySchedulepayloadCommandParameterInfo =
new CommandParameterInfo("payload", int.class);
thermostatsetWeeklyScheduleCommandParams.put(
"payload", thermostatsetWeeklySchedulepayloadCommandParameterInfo);
// Populate commands
CommandInfo thermostatsetWeeklyScheduleCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ThermostatCluster) cluster)
.setWeeklySchedule(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("numberOfTransitionsForSequence"),
(Integer) commandArguments.get("dayOfWeekForSequence"),
(Integer) commandArguments.get("modeForSequence"),
(Integer) commandArguments.get("payload"));
},
() -> new DelegatedDefaultClusterCallback(),
thermostatsetWeeklyScheduleCommandParams);
thermostatClusterCommandInfoMap.put(
"setWeeklySchedule", thermostatsetWeeklyScheduleCommandInfo);
Map<String, CommandParameterInfo> thermostatsetpointRaiseLowerCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo thermostatsetpointRaiseLowerCommandParameterInfo =
new CommandParameterInfo("Thermostat", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo thermostatsetpointRaiseLowermodeCommandParameterInfo =
new CommandParameterInfo("mode", int.class);
thermostatsetpointRaiseLowerCommandParams.put(
"mode", thermostatsetpointRaiseLowermodeCommandParameterInfo);
CommandParameterInfo thermostatsetpointRaiseLoweramountCommandParameterInfo =
new CommandParameterInfo("amount", int.class);
thermostatsetpointRaiseLowerCommandParams.put(
"amount", thermostatsetpointRaiseLoweramountCommandParameterInfo);
// Populate commands
CommandInfo thermostatsetpointRaiseLowerCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ThermostatCluster) cluster)
.setpointRaiseLower(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("mode"),
(Integer) commandArguments.get("amount"));
},
() -> new DelegatedDefaultClusterCallback(),
thermostatsetpointRaiseLowerCommandParams);
thermostatClusterCommandInfoMap.put(
"setpointRaiseLower", thermostatsetpointRaiseLowerCommandInfo);
// Populate cluster
ClusterInfo thermostatClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ThermostatCluster(ptr, endpointId),
thermostatClusterCommandInfoMap);
clusterMap.put("thermostat", thermostatClusterInfo);
Map<String, CommandInfo> thermostatUserInterfaceConfigurationClusterCommandInfoMap =
new LinkedHashMap<>();
// Populate cluster
ClusterInfo thermostatUserInterfaceConfigurationClusterInfo =
new ClusterInfo(
(ptr, endpointId) ->
new ChipClusters.ThermostatUserInterfaceConfigurationCluster(ptr, endpointId),
thermostatUserInterfaceConfigurationClusterCommandInfoMap);
clusterMap.put(
"thermostatUserInterfaceConfiguration", thermostatUserInterfaceConfigurationClusterInfo);
Map<String, CommandInfo> threadNetworkDiagnosticsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> threadNetworkDiagnosticsresetCountsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo threadNetworkDiagnosticsresetCountsCommandParameterInfo =
new CommandParameterInfo(
"ThreadNetworkDiagnostics", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo threadNetworkDiagnosticsresetCountsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ThreadNetworkDiagnosticsCluster) cluster)
.resetCounts((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
threadNetworkDiagnosticsresetCountsCommandParams);
threadNetworkDiagnosticsClusterCommandInfoMap.put(
"resetCounts", threadNetworkDiagnosticsresetCountsCommandInfo);
// Populate cluster
ClusterInfo threadNetworkDiagnosticsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ThreadNetworkDiagnosticsCluster(ptr, endpointId),
threadNetworkDiagnosticsClusterCommandInfoMap);
clusterMap.put("threadNetworkDiagnostics", threadNetworkDiagnosticsClusterInfo);
Map<String, CommandInfo> wakeOnLanClusterCommandInfoMap = new LinkedHashMap<>();
// Populate cluster
ClusterInfo wakeOnLanClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.WakeOnLanCluster(ptr, endpointId),
wakeOnLanClusterCommandInfoMap);
clusterMap.put("wakeOnLan", wakeOnLanClusterInfo);
Map<String, CommandInfo> wiFiNetworkDiagnosticsClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> wiFiNetworkDiagnosticsresetCountsCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo wiFiNetworkDiagnosticsresetCountsCommandParameterInfo =
new CommandParameterInfo(
"WiFiNetworkDiagnostics", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo wiFiNetworkDiagnosticsresetCountsCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WiFiNetworkDiagnosticsCluster) cluster)
.resetCounts((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
wiFiNetworkDiagnosticsresetCountsCommandParams);
wiFiNetworkDiagnosticsClusterCommandInfoMap.put(
"resetCounts", wiFiNetworkDiagnosticsresetCountsCommandInfo);
// Populate cluster
ClusterInfo wiFiNetworkDiagnosticsClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.WiFiNetworkDiagnosticsCluster(ptr, endpointId),
wiFiNetworkDiagnosticsClusterCommandInfoMap);
clusterMap.put("wiFiNetworkDiagnostics", wiFiNetworkDiagnosticsClusterInfo);
Map<String, CommandInfo> windowCoveringClusterCommandInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> windowCoveringdownOrCloseCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringdownOrCloseCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo windowCoveringdownOrCloseCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.downOrClose((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringdownOrCloseCommandParams);
windowCoveringClusterCommandInfoMap.put("downOrClose", windowCoveringdownOrCloseCommandInfo);
Map<String, CommandParameterInfo> windowCoveringgoToLiftPercentageCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringgoToLiftPercentageCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo windowCoveringgoToLiftPercentageliftPercentageValueCommandParameterInfo =
new CommandParameterInfo("liftPercentageValue", int.class);
windowCoveringgoToLiftPercentageCommandParams.put(
"liftPercentageValue",
windowCoveringgoToLiftPercentageliftPercentageValueCommandParameterInfo);
CommandParameterInfo
windowCoveringgoToLiftPercentageliftPercent100thsValueCommandParameterInfo =
new CommandParameterInfo("liftPercent100thsValue", int.class);
windowCoveringgoToLiftPercentageCommandParams.put(
"liftPercent100thsValue",
windowCoveringgoToLiftPercentageliftPercent100thsValueCommandParameterInfo);
// Populate commands
CommandInfo windowCoveringgoToLiftPercentageCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.goToLiftPercentage(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("liftPercentageValue"),
(Integer) commandArguments.get("liftPercent100thsValue"));
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringgoToLiftPercentageCommandParams);
windowCoveringClusterCommandInfoMap.put(
"goToLiftPercentage", windowCoveringgoToLiftPercentageCommandInfo);
Map<String, CommandParameterInfo> windowCoveringgoToLiftValueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringgoToLiftValueCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo windowCoveringgoToLiftValueliftValueCommandParameterInfo =
new CommandParameterInfo("liftValue", int.class);
windowCoveringgoToLiftValueCommandParams.put(
"liftValue", windowCoveringgoToLiftValueliftValueCommandParameterInfo);
// Populate commands
CommandInfo windowCoveringgoToLiftValueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.goToLiftValue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("liftValue"));
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringgoToLiftValueCommandParams);
windowCoveringClusterCommandInfoMap.put(
"goToLiftValue", windowCoveringgoToLiftValueCommandInfo);
Map<String, CommandParameterInfo> windowCoveringgoToTiltPercentageCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringgoToTiltPercentageCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo windowCoveringgoToTiltPercentagetiltPercentageValueCommandParameterInfo =
new CommandParameterInfo("tiltPercentageValue", int.class);
windowCoveringgoToTiltPercentageCommandParams.put(
"tiltPercentageValue",
windowCoveringgoToTiltPercentagetiltPercentageValueCommandParameterInfo);
CommandParameterInfo
windowCoveringgoToTiltPercentagetiltPercent100thsValueCommandParameterInfo =
new CommandParameterInfo("tiltPercent100thsValue", int.class);
windowCoveringgoToTiltPercentageCommandParams.put(
"tiltPercent100thsValue",
windowCoveringgoToTiltPercentagetiltPercent100thsValueCommandParameterInfo);
// Populate commands
CommandInfo windowCoveringgoToTiltPercentageCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.goToTiltPercentage(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("tiltPercentageValue"),
(Integer) commandArguments.get("tiltPercent100thsValue"));
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringgoToTiltPercentageCommandParams);
windowCoveringClusterCommandInfoMap.put(
"goToTiltPercentage", windowCoveringgoToTiltPercentageCommandInfo);
Map<String, CommandParameterInfo> windowCoveringgoToTiltValueCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringgoToTiltValueCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
CommandParameterInfo windowCoveringgoToTiltValuetiltValueCommandParameterInfo =
new CommandParameterInfo("tiltValue", int.class);
windowCoveringgoToTiltValueCommandParams.put(
"tiltValue", windowCoveringgoToTiltValuetiltValueCommandParameterInfo);
// Populate commands
CommandInfo windowCoveringgoToTiltValueCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.goToTiltValue(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("tiltValue"));
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringgoToTiltValueCommandParams);
windowCoveringClusterCommandInfoMap.put(
"goToTiltValue", windowCoveringgoToTiltValueCommandInfo);
Map<String, CommandParameterInfo> windowCoveringstopMotionCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringstopMotionCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo windowCoveringstopMotionCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.stopMotion((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringstopMotionCommandParams);
windowCoveringClusterCommandInfoMap.put("stopMotion", windowCoveringstopMotionCommandInfo);
Map<String, CommandParameterInfo> windowCoveringupOrOpenCommandParams =
new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo windowCoveringupOrOpenCommandParameterInfo =
new CommandParameterInfo("WindowCovering", ChipClusters.DefaultClusterCallback.class);
// Populate commands
CommandInfo windowCoveringupOrOpenCommandInfo =
new CommandInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.WindowCoveringCluster) cluster)
.upOrOpen((DefaultClusterCallback) callback);
},
() -> new DelegatedDefaultClusterCallback(),
windowCoveringupOrOpenCommandParams);
windowCoveringClusterCommandInfoMap.put("upOrOpen", windowCoveringupOrOpenCommandInfo);
// Populate cluster
ClusterInfo windowCoveringClusterInfo =
new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.WindowCoveringCluster(ptr, endpointId),
windowCoveringClusterCommandInfoMap);
clusterMap.put("windowCovering", windowCoveringClusterInfo);
return clusterMap;
}
}
| [
"[email protected]"
] | |
1e62f5087bf66f9502341b82df0f7e9381ee07e2 | f389f0a6d3fd9bb3dff1f348fc15ed693bfb7e1d | /src/main/java/mk/ukim/finki/ampleapi/domain/exceptions/InvalidPasswordException.java | 5367d6454ba30097c03b4f012691964c3ab0c127 | [] | no_license | atodorovska/ample-api | 651a1d59635f517505025658ce4480eb2a4a5ef1 | bad7ca49e2eede1a4a8851763d11129b166e5ce0 | refs/heads/master | 2022-12-09T07:38:03.503289 | 2020-09-04T11:46:56 | 2020-09-04T11:46:56 | 284,299,389 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package mk.ukim.finki.ampleapi.domain.exceptions;
public class InvalidPasswordException extends Exception{
public InvalidPasswordException(String message) {
super(message);
}
public InvalidPasswordException() {}
}
| [
"[email protected]"
] | |
b4d8ef2d0264d435881b194863b44278b0a6732d | 5978399b0d8eb18049dccf040cd6cc9264fa79af | /src/main/java/dao/ServiceDAO.java | 891466fda90ee74ede97ac79a07cf87457e734b2 | [] | no_license | artezious/OSMD | 967fb5215c1eb0a5fc660f542a5b00d84bb7eea4 | 27652ec63c432cd98eb45ace216d49ba6f666218 | refs/heads/master | 2020-06-18T01:27:19.229131 | 2016-11-28T10:40:34 | 2016-11-28T10:40:34 | 74,960,976 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | package dao;
import model.ServiceEntity;
import javax.persistence.EntityManager;
import java.util.List;
import static dao.Singleton.ENTITY_MANAGER;
/**
* Created by WEO on 9/12/16.
*/
public class ServiceDAO {
EntityManager entityManager = ENTITY_MANAGER.getEntityManager();
public List<ServiceEntity> getService() {
return entityManager.createQuery("Select Service from ServiceEntity service").getResultList();
}
public void saveService(ServiceEntity entity) {
entityManager.getTransaction().begin();
entityManager.merge(entity);
entityManager.getTransaction().commit();
}
}
| [
"[email protected]"
] | |
36663279911a74d2643136f64c0eda69eeba06cf | b11d56e8c20e80b8221e99606d5d8ed32b30ddb3 | /bundles/model/src/main/java/org/karaf/winecellar/model/EntityWithId.java | 5dba1bb31ca0ab598ed2295bd2f3718be28d753a | [] | no_license | boodoopl/karaf-wine-cellar | f42fc88d2fdd19c275722bcf1fc00bc5b521e87e | 7bdc95e3f8904ee2fdec04cb27ecdff869f0bd09 | refs/heads/master | 2016-08-11T20:09:53.162611 | 2015-10-10T20:23:20 | 2015-10-10T20:23:20 | 44,023,437 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | package org.karaf.winecellar.model;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
@MappedSuperclass
public class EntityWithId {
@Id
@GeneratedValue
protected long id;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
}
| [
"[email protected]"
] | |
c08c1dca87f64853c75372ebe534ecd074f4b627 | 737f75f2d6936f4901f29412a041ee3039e24643 | /Hedgehog Photo/plugins/Search/JPopupPreview.java | 730b4f8d17ece71617f9d2740ed70ac6abf01268 | [] | no_license | S-Vortex/Hedgehog-Photo | b4acef82d9465882b5a21f9caab468fb9dce8dd8 | c706f26736450f2a93d698d7bde9ecbdf777b1cd | refs/heads/master | 2020-12-25T00:27:54.476543 | 2012-05-23T04:51:36 | 2012-05-23T04:51:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,177 | java | import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.util.List;
import java.util.Observable;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JSeparator;
import javax.swing.JTextField;
import se.cth.hedgehogphoto.database.PictureObject;
/**
* @author Barnabas Sapan
*/
@SuppressWarnings("serial")
public class JPopupPreview extends JPopupMenu implements PreviewI {
/** Better to add everything to a JPanel first
* instead of adding directly to a JPopup to prevent some rendering issues. */
private JPanel panel;
private JTextField textField;
private SearchModel model;
private final NotificationListItem messageItem = new NotificationListItem();
private final JPopupListItem [] listItems;
private static final int MAX_LIST_ITEMS = 5;
public JPopupPreview(){
this.listItems = new JPopupListItem[JPopupPreview.MAX_LIST_ITEMS];
for (int index = 0; index < JPopupPreview.MAX_LIST_ITEMS; index++) {
this.listItems[index] = new JPopupListItem();
}
this.panel = new JPanel();
this.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));
add(this.panel);
setFocusable(false);
}
/**
* Adds the same listener to all the PopupPreview's
* items.
* @param listener the PopupItem-listener
*/
@Override
public void addMouseListener(MouseAdapter listener) {
this.messageItem.addMouseListener(listener);
for (JPopupListItem item : listItems) {
item.addMouseListener(listener);
}
}
@Override
public void setTextField(JTextField textField){
this.textField = textField;
}
public void setListItems(List<PictureObject> pictures) {
this.messageItem.setPictures(pictures);
for (int index = 0; index < JPopupPreview.MAX_LIST_ITEMS; index++) {
if (pictures.size() > index){
this.listItems[index].setPicture(pictures.get(index));
}
else{
this.listItems[index].setPicture(null);
}
}
}
@Override
public void setModel(SearchModel model) {
this.model = model;
}
@Override
public JPopupMenu getPopupView() {
return this;
}
@Override
public void update(Observable o, Object arg) {
if (arg instanceof SearchModel) {
this.model = (SearchModel) arg;
}
/**-50 to count for the offset of the textbox*/
show(this.textField, -50, this.textField.getHeight());
List<PictureObject> pictures = this.model.getPictures();
this.setListItems(pictures);
this.panel.removeAll();
/**Adds the search results to the popup, if result resulted in no matches, add
a no result label.*/
if (!pictures.isEmpty()) {
if (pictures.size() > 2) {
this.messageItem.setMessage(SearchConstants.SEE_MORE);
this.panel.add(this.messageItem);
this.panel.add(new JSeparator());
}
int nbrOfItems = 0;
for (JPopupListItem item : listItems) {
if (item.hasPicture()) {
this.panel.add(item);
nbrOfItems++;
}
}
setPopupSize(250, (nbrOfItems * 70));
} else {
this.messageItem.setBackground(Color.GRAY);
this.messageItem.setMessage(SearchConstants.NO_ITEMS);
this.panel.add(this.messageItem);
setPopupSize(250, 40);
}
this.panel.revalidate();
}
}
| [
"[email protected]"
] | |
39bd992849390728fc08d30c1a002be639ff03e0 | 6859fffb898bdbfb4f9ee6fba96a19ac27cde13a | /ch13/src/com/manning/hsia/dvdstore/TestRegex.java | 8bbdde7c89999756eb11788774c12271a859b15d | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | zutjmx/hibernate-search-in-action | cae3bdd7d85f2598f8122e9f0b3ff8769b37e32a | 9d3b61b29dd703989f323ea2f137cfa96c2b7869 | refs/heads/main | 2023-06-18T02:36:05.689172 | 2021-07-04T21:09:56 | 2021-07-04T21:09:56 | 382,948,690 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,167 | java | package com.manning.hsia.dvdstore;
import com.manning.hsia.test.ch13.SearchTestCase;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.regex.JakartaRegexpCapabilities;
import org.apache.lucene.search.regex.RegexQuery;
import org.apache.lucene.search.regex.SpanRegexQuery;
import org.apache.lucene.search.spans.SpanNearQuery;
import org.apache.lucene.search.spans.SpanQuery;
import org.hibernate.Transaction;
import org.hibernate.search.FullTextSession;
import org.hibernate.search.Search;
import org.testng.annotations.Test;
import java.util.List;
public class TestRegex extends SearchTestCase {
private FullTextSession s;
private Transaction tx;
String texts[] = {
"Keanu Reeves is completely wooden in this romantic misfired flick",
"Reeves plays a traveling salesman and agrees to help a woman",
"Jamie Lee Curtis finds out that he's not really a salesman"
};
@Test(groups="ch13")
public void testRegex1() throws Exception {
try {
buildIndex();
assert regexHitCount( "sa.[aeiou]s.*" ) == 2;
cleanup();
}
finally {
s.close();
}
}
@Test(groups="ch13")
public void testRegex2() throws Exception {
try {
buildIndex();
assert regexHitCount( "sa[aeiou]s.*" ) == 0;
cleanup();
}
finally {
s.close();
}
}
@Test(groups="ch13")
public void testSpanRegex1() throws Exception {
try {
buildIndex();
assert spanRegexHitCount( "sa.[aeiou]s", "woman", 5, true ) == 1;
cleanup();
}
finally {
s.close();
}
}
@Test(groups="ch13")
public void testSpanRegex2() throws Exception {
try {
buildIndex();
assert spanRegexHitCount( "sa.[aeiou]s", "woman", 1, true ) == 0;
cleanup();
}
finally {
s.close();
}
}
private int regexHitCount( String regex ) throws Exception {
RegexQuery query = new RegexQuery( newTerm( regex ) );
query.setRegexImplementation( new JakartaRegexpCapabilities() );
org.hibernate.search.FullTextQuery hibQuery = s.createFullTextQuery( query, Dvd.class );
List results = hibQuery.list();
return results.size();
}
private int spanRegexHitCount( String regex1, String regex2, int slop, boolean ordered )
throws Exception {
SpanRegexQuery q1 = new SpanRegexQuery( newTerm( regex1 ) );
SpanRegexQuery q2 = new SpanRegexQuery( newTerm( regex2 ) );
SpanNearQuery query = new SpanNearQuery( new SpanQuery[]{q1, q2}, slop, ordered );
org.hibernate.search.FullTextQuery hibQuery = s.createFullTextQuery( query, Dvd.class );
List results = hibQuery.list();
return results.size();
}
private Term newTerm( String value ) {
return new Term( "description", value );
}
private void buildIndex() {
s = Search.getFullTextSession( openSession() );
tx = s.beginTransaction();
for (int x = 0; x < texts.length; x++) {
Dvd dvd = new Dvd();
dvd.setId( x );
dvd.setDescription( texts[x] );
s.save( dvd );
}
tx.commit();
s.clear();
}
private void cleanup() {
tx = s.beginTransaction();
for (Object element : s.createQuery( "from " + Dvd.class.getName() ).list()) {
s.delete( element );
}
tx.commit();
}
protected Class[] getMappings() {
return new Class[]{
Dvd.class
};
}
}
| [
"[email protected]"
] | |
846e91afbaab561f7d4784e06ef89898b83b3177 | 26b7f30c6640b8017a06786e4a2414ad8a4d71dd | /src/number_of_direct_superinterfaces/i1484.java | e025ce791eb2cd291091c1ccfd357fc3c0010d5d | [] | no_license | vincentclee/jvm-limits | b72a2f2dcc18caa458f1e77924221d585f23316b | 2fd1c26d1f7984ea8163bc103ad14b6d72282281 | refs/heads/master | 2020-05-18T11:18:41.711400 | 2014-09-14T04:25:18 | 2014-09-14T04:25:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 68 | java | package number_of_direct_superinterfaces;
public interface i1484 {} | [
"[email protected]"
] | |
f0b39f3ec33bbeea579091036b030733ab7d74b2 | 5ecd15baa833422572480fad3946e0e16a389000 | /framework/MCS-Open/subsystems/eclipse-ab/main/api/java/com/volantis/mcs/eclipse/ab/editors/xml/XMLDocumentProvider.java | 2f49a2d576109fa7ea6214a14e9f32e5dc703da1 | [] | no_license | jabley/volmobserverce | 4c5db36ef72c3bb7ef20fb81855e18e9b53823b9 | 6d760f27ac5917533eca6708f389ed9347c7016d | refs/heads/master | 2021-01-01T05:31:21.902535 | 2009-02-04T02:29:06 | 2009-02-04T02:29:06 | 38,675,289 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,222 | java | /*
This file is part of Volantis Mobility Server.
Volantis Mobility Server is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Volantis Mobility Server is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Volantis Mobility Server. If not, see <http://www.gnu.org/licenses/>.
*/
/* ----------------------------------------------------------------------------
* (c) Volantis Systems Ltd 2003.
* ----------------------------------------------------------------------------
*/
package com.volantis.mcs.eclipse.ab.editors.xml;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.rules.DefaultPartitioner;
import org.eclipse.ui.editors.text.FileDocumentProvider;
import java.io.InputStream;
/**
* A document provided for XML documents.
*
* DISCLAIMER: This class and its associated classes are a quick fix built to
* provide the ability to edit themes and layouts without the Design
* parts. As such there are more likely to be bugs, bits missing and
* bits that could be better designed.
*/
public class XMLDocumentProvider extends FileDocumentProvider {
// javadoc inherited
protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
if (document != null) {
establishPartitioner(document);
}
return document;
}
/**
* Establish document partitioner for this document provider.
* @param document The document for the partitioner. Must not be null.
* @throws IllegalArgumentException If document is null.
*/
private void establishPartitioner(IDocument document) {
if (document == null) {
throw new IllegalArgumentException("Cannot be null: document"); //$NON-NLS-1$
}
IDocumentPartitioner partitioner =
new DefaultPartitioner(
new XMLPartitionScanner(),
new String[]{
XMLPartitionScanner.XML_TAG,
XMLPartitionScanner.XML_COMMENT});
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}
/**
* Set the document content.
* @param element The element (e.g. IEditorInput) associciated with the
* document.
* @param contentStream The InputStream from which to derive the
* content. The content is expected to be well-formed xml.
* @throws CoreException If the contentStream cannot be read.
*/
public void setDocumentContent(Object element, InputStream contentStream,
boolean isDirty)
throws CoreException {
setDocumentContent(getDocument(element), contentStream,
getEncoding(element));
FileInfo info = (FileInfo) getElementInfo(element);
if (info != null) {
if (isDirty != info.fCanBeSaved && info.fCanBeSaved) {
// This means that the document from which this content
// has been set has been saved making it non dirty.
// Because it has been saved the resource is now out
// of sync with this document provided and an attempt
// to save will therefore bring up a dialog asking the
// user if they wish to override the changes. To avoid
// this dialog we synchronize here.
synchronize(element);
} else {
fireElementContentAboutToBeReplaced(element);
info.fDocument.set(getDocument(element).get());
if (info.fCanBeSaved && !isDirty) {
addUnchangedElementListeners(element, info);
}
fireElementContentReplaced(element);
if (isDirty != info.fCanBeSaved) {
info.fCanBeSaved = isDirty;
fireElementDirtyStateChanged(element, isDirty);
}
}
}
}
}
/*
===========================================================================
Change History
===========================================================================
$Log$
08-Dec-04 6416/3 ianw VBM:2004120703 New Build
08-Dec-04 6416/1 ianw VBM:2004120703 New Build
03-Feb-04 2820/1 doug VBM:2004013002 Used the eclipse 'externalize strings wizard' to identify language specific resources
06-Jan-04 2412/2 allan VBM:2004010407 Fixed dirty status handling when switching editor page.
04-Jan-04 2309/2 allan VBM:2003122202 Provide an MCS source editor for multi-page and stand-alone policy editing.
===========================================================================
*/
| [
"iwilloug@b642a0b7-b348-0410-9912-e4a34d632523"
] | iwilloug@b642a0b7-b348-0410-9912-e4a34d632523 |
a0bbf52fd0448192a772e2ad7a3c4e0039a4960c | 72af6c44bf819dd8b1db8a3fd30b138c74ba52a8 | /src/MatchSimulation/Bat.java | 4a5f4d5d37fba79a2e92f095054e175af45f5e76 | [] | no_license | PRATIK-BOTHRA/cricket-game- | d28108a97895b648066dba13de754fb857a10b15 | 77deebfbf2204dea8abec92f8e7c02b6092298e8 | refs/heads/main | 2023-04-30T21:18:44.230100 | 2021-05-16T09:42:38 | 2021-05-16T09:42:38 | 367,838,775 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 670 | java | package MatchSimulation;
import javafx.scene.image.Image;
public class Bat extends Moveable implements Game.CricketGame {
private int downFactor=0;
Image rect=new Image("Images/bat.png",50,10,true,false);
public Bat(){
super.setImage(rect);
}
public void move(int x){
super.setVelocity(x,0);
super.update(10);
if(super.getPositionX()<-10 || super.getPositionX()>=520){
super.setVelocity(-x,0);
super.update(10);
}
}
public int getDownFactor() {
return downFactor;
}
public void setDownFactor(int downFactor) {
this.downFactor = downFactor;
}
} | [
"[email protected]"
] | |
0b8320986a8504cc260d71a3b673673b006e5a05 | 24e94e79466b6761e26e838ba6cb393cb464115b | /src/main/java/com/kylin/electricassistsys/entity/facility/ZyxlEntity.java | f1c41a55e39ba7f3c35b18c5f2852d2703660d76 | [
"Apache-2.0"
] | permissive | radtek/oldDlxt | da5d065bbd9972c76e823968145d0e8c837a8f21 | 7fc8cbf0db983fc8f04fa704995b4efd8e9e5255 | refs/heads/master | 2020-05-27T14:51:17.131055 | 2018-07-01T03:41:15 | 2018-07-01T03:41:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,341 | java | package com.kylin.electricassistsys.entity.facility;
/**
* 设备-中压线路
*/
public class ZyxlEntity
{
/**
* 主键jgNf
*/
private String glid;
/**
* open3000设备编号
*/
private String opensbid;
/**
* open3000设备名称
*/
private String opensbname;
/**
* open3000厂站编号
*/
private String id;
/**
* 设备类型 变压器,变电站 ,交流线路 , 中压线路
*/
private String sbtype;
/**
* 关联设备
*/
private String mysbid;
/**
* 关联设备
*/
private String xlmc;
/**
* 关联日期
*/
private String sbgltime;
/**
* 关联类型 手动,自动
*/
private String gltype;
/**
* 备注
*/
private String remark;
public String getGlid()
{
return glid;
}
public void setGlid(String glid)
{
this.glid = glid;
}
public String getOpensbid()
{
return opensbid;
}
public void setOpensbid(String opensbid)
{
this.opensbid = opensbid;
}
public String getOpensbname()
{
return opensbname;
}
public void setOpensbname(String opensbname)
{
this.opensbname = opensbname;
}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public String getSbtype()
{
return sbtype;
}
public void setSbtype(String sbtype)
{
this.sbtype = sbtype;
}
public String getMysbid()
{
return mysbid;
}
public void setMysbid(String mysbid)
{
this.mysbid = mysbid;
}
public String getXlmc()
{
return xlmc;
}
public void setXlmc(String xlmc)
{
this.xlmc = xlmc;
}
public String getSbgltime()
{
return sbgltime;
}
public void setSbgltime(String sbgltime)
{
this.sbgltime = sbgltime;
}
public String getGltype()
{
return gltype;
}
public void setGltype(String gltype)
{
this.gltype = gltype;
}
public String getRemark()
{
return remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
}
| [
"[email protected]"
] | |
ebf3c07ddfc6c875688a613b3e996b20cc126d1f | ac759cb40142e92cb52d102bf09f4780c4973e97 | /user-registration-server-ws/enroll-mgmt/src/main/java/com/google/cloud/healthcare/fdamystudies/util/TokenUtil.java | 2a2e3503485d31a93db1b5ac277f0392a6ec3590 | [
"MIT"
] | permissive | ashokr8142/phanitest | b128f5f21043ad68858e57c4183aa23a992d04a5 | 04ca2cd502fd953e64971292480fd2261dd0be17 | refs/heads/master | 2023-03-03T06:31:10.344379 | 2021-01-13T07:42:28 | 2021-01-13T07:42:28 | 340,147,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 703 | java | /*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package com.google.cloud.healthcare.fdamystudies.util;
import java.security.SecureRandom;
public class TokenUtil {
private static final String SOURCE = "0123456789ABCDEFGHIJKLMNOPQRSWXYZ";
private static SecureRandom secureRnd = new SecureRandom();
private TokenUtil() {}
public static String randomString(int length) {
StringBuilder sb = new StringBuilder(length);
for (int i = 0; i < length; i++) sb.append(SOURCE.charAt(secureRnd.nextInt(SOURCE.length())));
return sb.toString();
}
}
| [
"[email protected]"
] | |
dd9d9b2f86dcab7648e3dda23699cf9f8d854146 | f0547e0454012f424fdb77c9fe6e2b87e876cda3 | /src/main/utils/Utils.java | 917fb094bd594d1ab399b62c32647bce5982e411 | [] | no_license | zollder/ADS | e04b7c3782e2486ad4401229a11d61cfec51ef56 | b1c1ffcd0eb9d2936532f60a741d188b0b452e39 | refs/heads/master | 2021-01-17T07:28:23.101956 | 2017-03-09T00:27:41 | 2017-03-09T00:27:41 | 83,709,908 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,433 | java | package main.utils;
import java.util.Random;
public class Utils {
public static <E> void printArray(E[] array) {
for (E element : array) {
System.out.printf("%s ", element);
}
System.out.println();
}
public static void printArray(int[] array) {
for (int i = 0; i < array.length; i++) {
if (i == array.length - 1) {
System.out.println(array[i]);
} else {
System.out.print(array[i] + " ");
}
}
System.out.print("\n");
}
public static void printArray(char[] array) {
for (int i = 0; i < array.length; i++) {
if (i == array.length - 1) {
System.out.println(array[i]);
} else {
System.out.print(array[i] + " ");
}
}
System.out.print("\n");
}
public static void printArray(boolean[][] array) {
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array.length; j++) {
System.out.print(array[i][j] + " ");
}
System.out.print("\n");
}
System.out.print("\n");
}
public static int getRandomInt(int min, int max) {
Random random = new Random();
return random.nextInt(max - min + 1) + min;
}
public static void printMatrix(long[][] matrix, String comment) {
if (comment != null && comment.length() > 0) {
System.out.println(comment);
}
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix.length; j++) {
System.out.print(matrix[i][j] + " ");
}
System.out.println("");
}
System.out.println("");
}
} | [
"[email protected]"
] | |
7a7e4c716be63e3caecf8da2b11d0566b5f18e20 | 624a7008337317592650f6e423c8f82158ed52dd | /Whatie-Demo-With-Tuya/app/src/main/java/com/whatie/ati/androiddemo/views/SetNewPasswordActivity.java | b4b00a78afc09d2a03cbd86f2d110b1b8adf1650 | [
"MIT"
] | permissive | ATI-Wuhan/WhatieSDKDemo_Android_with_Tuya | fd97d9b234baad648d5613f178fe844a62dbd42f | fcef101057cdf68b7666a7b9cbc00f5deb316b96 | refs/heads/master | 2020-03-21T02:45:34.113287 | 2018-11-20T12:08:13 | 2018-11-20T12:08:13 | 138,016,962 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,307 | java | package com.whatie.ati.androiddemo.views;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.whatie.ati.androiddemo.R;
import com.d9lab.ati.whatiesdk.bean.BaseResponse;
import com.d9lab.ati.whatiesdk.callback.BaseCallback;
import com.d9lab.ati.whatiesdk.ehome.EHomeInterface;
import com.d9lab.ati.whatiesdk.util.LogUtil;
import com.lzy.okgo.model.Response;
import butterknife.BindView;
import butterknife.OnClick;
/**
* Created by 神火 on 2018/6/8.
*
* 这里的重置密码我没找到应该用哪个接口,所以先没写
*
*
*/
public class SetNewPasswordActivity extends BaseActivity {
private static final String TAG = "SetNewPasswordActivity";
@BindView(R.id.et_new_password)
EditText etNewPassword;
@BindView(R.id.et_new_password_confirm)
EditText etNewPasswordConfirm;
@BindView(R.id.iv_recover_pwd_back)
ImageView ivRecoverPwdBack;
@BindView(R.id.tv_set_new_password)
TextView tvSetNewPassword;
private String email;
@Override
protected int getContentViewId() {
return R.layout.act_reset_password;
}
@Override
protected void initViews() {
email = getIntent().getStringExtra("email");
}
@Override
protected void initEvents() {
}
@Override
protected void initDatas() {
}
public void setNewPassword(final String password) {
EHomeInterface.getINSTANCE().resetPasswordByEmail(mContext, email, password, new BaseCallback() {
@Override
public void onSuccess(Response<BaseResponse> response) {
Toast.makeText(mContext, getString(R.string.set_new_psw_success), Toast.LENGTH_SHORT).show();
finish();
}
@Override
public void onError(Response<BaseResponse> response) {
super.onError(response);
Toast.makeText(mContext, getString(R.string.set_new_psw_fail), Toast.LENGTH_SHORT).show();
}
});
}
public void login(){
}
@OnClick({R.id.iv_recover_pwd_back, R.id.tv_set_new_password})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.iv_recover_pwd_back:
finish();
break;
case R.id.tv_set_new_password:
String password1 = etNewPassword.getText().toString().trim();
String Password2 = etNewPasswordConfirm.getText().toString().trim();
if (password1.equals("") || Password2.equals("")){
LogUtil.log(TAG, "new pwd"+password1 +" confirm:"+Password2);
Toast.makeText(SetNewPasswordActivity.this,getString(R.string.change_password_tip),
Toast.LENGTH_SHORT).show();
} else{
if (!password1.equals(Password2)) {
Toast.makeText(SetNewPasswordActivity.this,getString(R.string.change_password_match),
Toast.LENGTH_SHORT).show();
}
else{
setNewPassword(password1);
}
}
break;
}
}
}
| [
"[email protected]"
] | |
8466e8ab9ca639e43826a2864aeb827e9ee99684 | e6c9f28cdb6fcc99a4c84a1661d68fce463d4a1a | /app/src/test/java/com/example/gamegoroda/UITests/Pages/PageNewGameCountries.java | 405c47b2034833b84150e3bdec0626c00619bcbc | [] | no_license | Telelichko/testing_mobile_application | d58c5f08de8a472c7f7dbff93dd2e37aff5e991c | 66f658710378317a6d4cc813e4d50343e62a5fd7 | refs/heads/master | 2022-12-31T16:01:14.720902 | 2020-10-25T16:44:29 | 2020-10-25T16:44:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,449 | java | package com.example.gamegoroda.UITests.Pages;
import com.example.gamegoroda.UITests.CommonMethods;
import com.example.gamegoroda.UITests.Constants;
import com.example.gamegoroda.UITests.DomHelper;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebElement;
public class PageNewGameCountries {
@Before
public void setUp(){
CommonMethods.setUp();
}
@Test
public void test_new_game_countries_page_filling_country() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
String country = Constants.default_country;
String input_last_char = country.substring(country.length() - 1);
WebElement inputs_in_start_game = CommonMethods.wait_element(DomHelper.input_in_start_game);
inputs_in_start_game.sendKeys(country);
WebElement button_send = CommonMethods.wait_element(DomHelper.button_send);
button_send.click();
WebElement label_info_new_game = CommonMethods.wait_element(DomHelper.label_info_new_game);
String output_first_char = label_info_new_game.getText().substring(0, 1).toLowerCase();
Assert.assertEquals("Start page. Expected text \"" + input_last_char +
"\" does not match actual text \"" + output_first_char + "\".",
input_last_char, output_first_char);
}
@Test
public void test_new_game_countries_page_label_info_exist() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement label_info = CommonMethods.wait_element(DomHelper.label_info_new_game);
Assert.assertNotNull("New game page. There isn't button \""+ label_info.getText() +"\" on it.",
label_info);
}
@Test
public void test_new_game_countries_page_label_info_name() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
String expected_text = Constants.enter_word;
String label_info_text = CommonMethods.wait_element(DomHelper.get_label_by_index(0)).getText();
Assert.assertEquals("Game page. Expected button text " + expected_text +
" does not match actual text" + label_info_text + ".",
expected_text, label_info_text);
}
@Test
public void test_new_game_countries_page_label_warning_exist() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement label_warning = CommonMethods.wait_element(DomHelper.label_warning_new_game);
Assert.assertNotNull("New game page. There isn't button \""+ label_warning.getText() +"\" on it.",
label_warning);
}
@Test
public void test_new_game_countries_page_label_warning_name_before_mistake() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
String expected_text = "";
String label_warning_text = CommonMethods.wait_element(DomHelper.get_label_by_index(1)).getText();
Assert.assertEquals("Game page. Expected button text " + expected_text +
" does not match actual text" + label_warning_text + ".",
expected_text, label_warning_text);
}
@Test
public void test_new_game_countries_page_label_warning_name_after_mistake() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
String expected_text = Constants.warning_text;
WebElement inputs_in_start_game = CommonMethods.wait_element(DomHelper.input_in_start_game);
inputs_in_start_game.sendKeys(Constants.country_to_get_warning);
WebElement button_send = CommonMethods.wait_element(DomHelper.button_send);
button_send.click();
String label_warning_text = CommonMethods.wait_element(DomHelper.get_label_by_index(1)).getText();
Assert.assertEquals("Game page. Expected button text " + expected_text +
" does not match actual text" + label_warning_text + ".",
expected_text, label_warning_text);
}
@Test
public void test_new_game_countries_page_input_words_exist() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement input_words = CommonMethods.wait_element(DomHelper.input_in_start_game);
Assert.assertNotNull("New game page. There isn't input on it.", input_words);
}
@Test
public void test_new_game_countries_page_button_send_exist() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement button_send = CommonMethods.wait_element(DomHelper.button_send);
Assert.assertNotNull("New game page. There isn't button \""+ button_send.getText() +"\" on it.",
button_send);
}
@Test
public void test_new_game_countries_page_button_send_clickable() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement button_send = CommonMethods.wait_element(DomHelper.button_send);
String button_send_clickable_str = button_send.getAttribute("clickable");
Assert.assertEquals("Game page. Button \"" + button_send.getText() + "\" isn't clickable.",
"true", button_send_clickable_str);
}
@Test
public void test_new_game_countries_page_button_send_name() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
String expected_text = Constants.send;
String button_send_text = CommonMethods.wait_element(DomHelper.get_button_by_index(3)).getText();
Assert.assertEquals("Game page. Expected button text " + expected_text +
" does not match actual text" + button_send_text + ".",
expected_text, button_send_text);
}
@Test
public void test_new_game_countries_page_button_surrender_exist() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement button_surrender = CommonMethods.wait_element(DomHelper.button_surrender);
Assert.assertNotNull("New game page. There isn't button \""+ button_surrender.getText() +"\" on it.",
button_surrender);
}
@Test
public void test_new_game_countries_page_button_surrender_clickable() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
WebElement button_surrender = CommonMethods.wait_element(DomHelper.button_surrender);
String button_surrender_clickable_str = button_surrender.getAttribute("clickable");
Assert.assertEquals("Game page. Button \"" + button_surrender.getText() + "\" isn't clickable.",
"true", button_surrender_clickable_str);
}
@Test
public void test_new_game_countries_page_button_surrender_name() throws Exception {
CommonMethods.go_to_new_game_page(Constants.countries);
String expected_text = Constants.surrender;
String button_surrender_text = CommonMethods.wait_element(DomHelper.get_button_by_index(4)).getText();
Assert.assertEquals("Game page. Expected button text " + expected_text +
" does not match actual text" + button_surrender_text + ".",
expected_text, button_surrender_text);
}
@After
public void End() {
CommonMethods.End();
}
}
| [
"[email protected]"
] | |
ad664c35c7f46cba5b21f2902928c11aad215713 | 5be64d018ff74811cecda17c0f95327a39388376 | /DesignPatterns/Visitor/src/main/java/org/practice/visitor/monitors/StateTaxMonitor.java | 6e0745444d0fa11f083f0f6779499b5de366549d | [] | no_license | sarkershantonu/java-novice-to-advance | 3767f0c772f28ef2f94514cda45d92acd2c21dbe | d8ccae2cb3c2574e296f0c847eb27e410070c83d | refs/heads/master | 2021-08-14T21:22:09.546356 | 2021-08-10T18:07:56 | 2021-08-10T18:07:56 | 181,795,654 | 2 | 4 | null | 2021-08-10T18:06:02 | 2019-04-17T01:38:55 | Java | UTF-8 | Java | false | false | 632 | java | package org.practice.visitor.monitors;
import org.practice.visitor.products.Chocolate;
import org.practice.visitor.products.Fruit;
import org.practice.visitor.products.SoftDrink;
public class StateTaxMonitor implements TaxMonitor {
public double addTax(Chocolate aChocolate) {
System.out.println("State Tax Added with a Chocolate");
return aChocolate.getPrice()*1.005;
}
public double addTax(SoftDrink aDrink) {
System.out.println("State Tax Added with a Drink");
return aDrink.getPrice()*1.005;
}
public double addTax(Fruit aFruit) {
System.out.println("No State Tax fora Fruit");
return aFruit.getPrice();
}
}
| [
"[email protected]"
] | |
ba6a201650e7230c172e0a8b02d8c1c1eee767fa | 136344baac16df8fbcef2e758739b338682f9bca | /Array1/src/newhomeworkonCoreJava/DistributionSweets.java | 6d6e533d96a57813ae8cf52e1536d6510d6a3726 | [] | no_license | tanusgit/HomeworkJava | 4551b7319a18100febf3b89130878dd41d400f40 | 63dac005f961d8e1cc9799cc23fbee913c4e899c | refs/heads/master | 2021-01-06T18:48:51.514203 | 2020-05-22T20:50:19 | 2020-05-22T20:50:19 | 241,447,432 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 880 | java | package newhomeworkonCoreJava;
/*
* Input1: No of people
Input2: No of distribution
Input3 : position Number from which the distribution starts
Output:
The position number who receives the last chocolate
*/
public class DistributionSweets {
public static void main(String[] args) {
int people = 100;
int sweets = 250;
int position = 27;
int pos = distribute2(people, sweets, position);
System.out.println(pos);
}
private static int distribute(int people, int sweet, int position) {
// TODO Auto-generated method stub
int res = ((position + sweet)-1)% people;
return res;
}
private static int distribute2(int people, int sweet, int position) {
// TODO Auto-generated method stub
int person = position;
for(int i =1 ; i < sweet; i ++) {
if(person == people) {
person = 1;
} else {
person = person +1;
}
}
return person;
}
}
| [
"[email protected]"
] | |
a1a2177420013c5b6299d7983af6a3683834fc70 | b12bfdb5983a82e837569d166ad2a9dc9d0063e3 | /app/src/main/java/com/example/calculator/MainActivity.java | 5a3ad7aa0d7883bdb64ff3c6f79c76d2e70ab412 | [] | no_license | Manasbekoff/Calculator | 4f1b3d222eaa2c7fa484644a3915660b23dc1d2e | 48f88f1223b0950424b71c181f5a27e92c81e854 | refs/heads/master | 2022-11-20T16:57:50.986831 | 2020-07-13T16:15:36 | 2020-07-13T16:15:36 | 273,230,877 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,469 | java | package com.example.calculator;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
public static final String RESULT_KEY = "result_key";
private CalculatorModel calculator;
public static String savedResult = "";
private TextView text;
@Override
public void onSaveInstanceState(@NonNull Bundle outState, @NonNull PersistableBundle outPersistentState) {
super.onSaveInstanceState(outState, outPersistentState);
outState.putSerializable("calc", calculator);
}
@Override
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
calculator = (CalculatorModel) savedInstanceState.getSerializable("calc");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final Button saveBtn = findViewById(R.id.saveBtn);
saveBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (savedResult != null) {
Intent intent = getIntent();
intent.putExtra(MainActivity.RESULT_KEY, savedResult);
setResult(RESULT_OK, intent);
finish();
}
}
});
int[] numberIds = new int[]{
R.id.zero,
R.id.one,
R.id.two,
R.id.three,
R.id.four,
R.id.five,
R.id.six,
R.id.seven,
R.id.eight,
R.id.nine,
};
int[] actionsIds = new int[]{
R.id.plus,
R.id.minus,
R.id.multiply,
R.id.divide,
R.id.equal
};
text = findViewById(R.id.text);
calculator = new CalculatorModel();
View.OnClickListener numberButtonClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
calculator.onNumPressed(view.getId());
text.setText(calculator.getText());
}
};
View.OnClickListener actionButtonOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
calculator.onActionPressed(view.getId());
text.setText(calculator.getText());
}
};
for (int i = 0; i < numberIds.length; i++) {
findViewById(numberIds[i]).setOnClickListener(numberButtonClickListener);
}
for (int i = 0; i < actionsIds.length; i++) {
findViewById(actionsIds[i]).setOnClickListener(actionButtonOnClickListener);
}
findViewById(R.id.clean).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
calculator.clean();
text.setText(calculator.getText());
}
});
}
}
| [
"[email protected]"
] | |
cb27934f4a0d5df0b10b8d1a2c86c9241cb35814 | 42601eac40ddeed525346b6f7b3fa1fa90ee9661 | /src/main/java/com/appsdevelopersblog/app/ws/security/AuthenticationFilter.java | 37ac7e83d5c4bb71f022d2e538a764ac27072344 | [] | no_license | gitvineeth/KukuSergey | dac7f52ee440023924dcafe16120aed3fad74a20 | 88a9ba4028bca3af5c453aaefdb620ac5c823d34 | refs/heads/master | 2023-08-03T10:18:00.642030 | 2021-09-07T05:43:31 | 2021-09-07T05:43:31 | 403,852,916 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,287 | java | package com.appsdevelopersblog.app.ws.security;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import com.appsdevelopersblog.app.ws.SpringApplicationContext;
import com.appsdevelopersblog.app.ws.service.UserService;
import com.appsdevelopersblog.app.ws.shared.dto.UserDto;
import com.appsdevelopersblog.app.ws.ui.request.UserLoginRequestModel;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.springframework.security.core.userdetails.*;
public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter {
private final AuthenticationManager authenticationManager;
public AuthenticationFilter(AuthenticationManager authenticationManager) {
super();
this.authenticationManager = authenticationManager;
}
@Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
throws AuthenticationException {
// below code populates UserLoginRequestModel
try {
UserLoginRequestModel creds = new ObjectMapper().readValue(request.getInputStream(), UserLoginRequestModel.class);
//db lookup loadUserByemail etc happen here internally
return authenticationManager.authenticate(
new UsernamePasswordAuthenticationToken(creds.getEmail(), creds.getPassword(),new ArrayList<>())
);
} catch (IOException e) {
// TODO Auto-generated catch block
throw new RuntimeException(e);
}
}
@Override
protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,
Authentication authResult) throws IOException, ServletException {
// We use JWT to give a token to the user who are authenticated so that he can use it in the subsequent requests
// need to use this in the request header
String userName = ((User) authResult.getPrincipal()).getUsername();
String token = Jwts.builder()
.setSubject(userName)
.setExpiration(new Date(System.currentTimeMillis()+SecurityConstants.EXPIRATION_TIME))
.signWith(SignatureAlgorithm.HS512, SecurityConstants.getTokenSecret())
.compact();
UserService userservice = (UserService) SpringApplicationContext.getBean("userServiceImpl");
UserDto userDto = userservice.getUser(userName);
response.addHeader(SecurityConstants.HEADER_STRING, SecurityConstants.TOKEN_PREFIX+token);
response.addHeader("Public User ID", userDto.getUserId());
// above is used to set a header field and value and send along with response
//next time add this value to the request header
}
}
| [
"[email protected]"
] | |
2be4007ec734622c180c3d76bca323d4d56c79d2 | 1f19aec2ecfd756934898cf0ad2758ee18d9eca2 | /u-1/u-11/u-11-111/u-11-111-1112/u-11-111-1112-11113/u-11-111-1112-11113-f6264.java | c822d6ebcfef48d002fb4521eb4c51e78486dfb5 | [] | no_license | apertureatf/perftest | f6c6e69efad59265197f43af5072aa7af8393a34 | 584257a0c1ada22e5486052c11395858a87b20d5 | refs/heads/master | 2020-06-07T17:52:51.172890 | 2019-06-21T18:53:01 | 2019-06-21T18:53:01 | 193,039,805 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 105 | java | mastercard 5555555555554444 4012888888881881 4222222222222 378282246310005 6011111111111117
164173735407 | [
"[email protected]"
] | |
32085344c03876effb94a25ec00ccdea3de51907 | 3735f3caf04bc5ddc5f974139c83fed709ef6b9d | /src/main/java/com/softmetrix/service/impl/OpenDoorServiceImpl.java | f328811cc0ae00dd97dace6ac58a84ef3481cb8f | [] | no_license | mukyz/gradebook | 2337e96af93e8d7f6e56f632b890735d92d455b2 | 16396856f8d902bfb2eeb9df627278ba3dfa1af3 | refs/heads/master | 2020-09-24T05:03:46.171487 | 2019-12-03T17:04:18 | 2019-12-03T17:04:18 | 225,669,227 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,429 | java | package com.softmetrix.service.impl;
import com.softmetrix.model.DTO.OpenDoorDTO;
import com.softmetrix.model.OpenDoor;
import com.softmetrix.model.Role;
import com.softmetrix.model.User;
import com.softmetrix.repository.OpenDoorRepository;
import com.softmetrix.service.OpenDoorService;
import com.softmetrix.service.UserService;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class OpenDoorServiceImpl implements OpenDoorService{
@Autowired OpenDoorRepository openDoorRepository;
@Autowired UserService userService;
@Override
public List<OpenDoor> getOpenDoorRequest(User user) {
if(user.getRole().getRoleName().equals(Role.TEACHER))
return openDoorRepository.findByTeacher(user);
if(user.getRole().getRoleName().equals(Role.PARENT))
return openDoorRepository.findByParent(user);
return null;
}
@Override
public void setStatus(Integer id, String status) {
OpenDoor od = openDoorRepository.findById(id).orElse(null);
if(od != null){
if(status.equals("accept")){
od.setIsAccepted(Boolean.TRUE);
} else if(status.equals("reject")){
od.setIsAccepted(Boolean.FALSE);
}
openDoorRepository.save(od);
}
}
@Override
public void save(OpenDoorDTO openDoorDTO) {
User parent = userService.findById(openDoorDTO.getParentId()).orElse(null);
if (parent == null) return;
User teacher = userService.findById(openDoorDTO.getTeacherId()).orElse(null);
if (teacher == null) return;
OpenDoor od = new OpenDoor();
od.setParent(parent);
od.setTeacher(teacher);
od.setDate(openDoorDTO.getDate());
openDoorRepository.save(od);
}
@Override
public OpenDoor getNextApointment(User user) {
if(user.getRole().getRoleName().equals(Role.PARENT))
return openDoorRepository.findTopByParentAndDateAfterAndIsAcceptedOrderByDateAsc(user, new Date(), Boolean.TRUE);
if(user.getRole().getRoleName().equals(Role.TEACHER))
return openDoorRepository.findTopByTeacherAndDateAfterAndIsAcceptedOrderByDateAsc(user, new Date(), Boolean.TRUE);
return null;
}
}
| [
"[email protected]"
] | |
e6deb2b70e7c5c9de388778c359a6d95a788bae8 | 7e8b6fa53e2885d11ae030d2bddf2963f034a937 | /src/com/patteren/factory/Circle.java | 973747b783c3bc615131adedbb5aed22ba8cc13c | [] | no_license | koritalaashok2/DesignPattrens | 9f1c29e28c157252df28058f112b8f8b12af4d89 | 0989e8dee093b68eb7dc14f0c3665ae18f3db411 | refs/heads/master | 2020-04-12T10:29:47.345121 | 2018-12-19T13:30:40 | 2018-12-19T13:30:40 | 162,431,479 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 171 | java | package com.patteren.factory;
public class Circle implements Shape {
@Override
public void draw() {
System.out.println(" Circle created ....!!");
}
}
| [
"[email protected]"
] | |
d8f89ce67dc264d86c9dc4a1b946101404b0f0e1 | 6493557dc38baa34293cf9a1500246a568cc8d99 | /src/main/java/sunny/util/CharArrayCompares.java | dd2df7ce0d2b9b83a2a5dd8d360000fe9b291688 | [] | no_license | stlin100/jarraypool | 5236409ecba1bc87d175b1ac12a99a03695ac7ba | bd5473c52c837b6b7794ac83174ad19256024982 | refs/heads/master | 2021-09-14T16:38:45.820040 | 2018-04-09T12:35:11 | 2018-04-09T12:35:11 | 103,514,333 | 0 | 0 | null | 2018-05-16T07:29:35 | 2017-09-14T09:34:56 | Java | UTF-8 | Java | false | false | 1,653 | java | package sunny.util;
import sunny.arraylist.CharArray;
/**
* Created by lzx on 17/9/18.
*/
public class CharArrayCompares {
public static int compare(char[] chars1, int len1, char[] chars2, int len2)
{
int lim = Math.min(len1, len2);
int k = 0;
while (k < lim) {
char c1 = chars1[k];
char c2 = chars2[k];
if (c1 != c2) {
return c1 - c2;
}
k++;
}
return len1 - len2;
}
public static int compare(CharArray chars1, int len1, char[] chars2, int len2)
{
int lim = Math.min(len1, len2);
int k = 0;
while (k < lim) {
char c1 = chars1.get(k);
char c2 = chars2[k];
if (c1 != c2) {
return c1 - c2;
}
k++;
}
return len1 - len2;
}
public static int compare(char[] chars1, int len1, CharArray chars2, int len2)
{
int lim = Math.min(len1, len2);
int k = 0;
while (k < lim) {
char c1 = chars1[k];
char c2 = chars2.get(k);
if (c1 != c2) {
return c1 - c2;
}
k++;
}
return len1 - len2;
}
public static int compare(CharArray chars1, int len1, CharArray chars2, int len2)
{
int lim = Math.min(len1, len2);
int k = 0;
while (k < lim) {
char c1 = chars1.get(k);
char c2 = chars2.get(k);
if (c1 != c2) {
return c1 - c2;
}
k++;
}
return len1 - len2;
}
}
| [
"[email protected]"
] | |
525332d609a959adb8860c56342b0cbcfd20a37c | 287d1065ec24669e5deae3b2a9e91febd4bcc5a1 | /Practice/src/practice11/PTra11_03.java | 95eeb0876561223c04672b6cd3e6116237d30e14 | [] | no_license | KentoTajima/JavaBasic | 308a0404b3a8c2d3dd53ee87a3356cd86042b444 | 456f3b0e91f75094d19fd57dc485e4a2f7524199 | refs/heads/master | 2020-03-12T12:47:20.980435 | 2018-07-04T09:03:46 | 2018-07-04T09:03:46 | 130,626,568 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,052 | java | package practice11;
/*
* PTra11_03.java
* 作成 LIKEIT 2017
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra11_03 {
/*
* ★ PTra11_03クラスに、クラスフィールドでint型のnumberを定義してください
*/
int number;
/*
* ★ PTra11_03クラスのコンストラクタを引数なしで定義してください
* ★ 処理は、クラスフィールドnumberに1を加算してください
*/
PTra11_03(){
this.number+=1;
}
public static void main(String[] args) {
// ★ sumメソッドを呼び出してください
PTra11_03 ptr=new PTra11_03();
ptr.sum(7,5);
}
public void sum(int x, int y) {
System.out.println("sumメソッドを呼び出しました。" + x + "+" + y + "=" + (x + y));
System.out.println("クラスフィールドnumber:"+this.number );
}
}/* + ★ クラスフィールドnumberの出力をしてください */
| [
"[email protected]"
] | |
e607ec794d3d6eb4e499e562437c02202ed9cbd5 | a1cb037a4e538148664ffa30c9618d3222fd8aa5 | /stable/src/main/java/com/stable/utils/RedisUtil.java | 29b555ca1a34d5ee514e11be368305789378b415 | [] | no_license | ChengquanPeng/test | a5ebb9fa8c04552cba57a4cb305bbecae43002c8 | 36476c81464260d25bb27bb1664c701f36a0901e | refs/heads/master | 2023-07-28T05:39:07.647457 | 2023-07-25T14:09:11 | 2023-07-25T14:09:11 | 86,578,960 | 6 | 0 | null | 2022-06-17T02:18:27 | 2017-03-29T12:23:29 | Java | UTF-8 | Java | false | false | 30,999 | java | package com.stable.utils;
import java.time.Duration;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.DataType;
import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.ScanOptions;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ZSetOperations.TypedTuple;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.stable.constant.RedisConstant;
@Component
public class RedisUtil {
@Autowired
private StringRedisTemplate redisTemplate;
/*
* @param key
*
* @return
*/
public byte[] dump(String key) {
return redisTemplate.dump(key);
}
/**
* 是否存在key
*
* @param key
* @return
*/
public Boolean hasKey(String key) {
return redisTemplate.hasKey(key);
}
/**
* 设置过期时间
*
* @param key
* @param timeout
* @param unit
* @return
*/
public Boolean expire(String key, long timeout, TimeUnit unit) {
return redisTemplate.expire(key, timeout, unit);
}
/**
* 设置过期时间
*
* @param key
* @param date
* @return
*/
public Boolean expireAt(String key, Date date) {
return redisTemplate.expireAt(key, date);
}
/**
* 查找匹配的key
*
* @param pattern
* @return
*/
public Set<String> keys(String pattern) {
return redisTemplate.keys(pattern);
}
/**
* 将当前数据库的 key 移动到给定的数据库 db 当中
*
* @param key
* @param dbIndex
* @return
*/
public Boolean move(String key, int dbIndex) {
return redisTemplate.move(key, dbIndex);
}
/**
* 移除 key 的过期时间,key 将持久保持
*
* @param key
* @return
*/
public Boolean persist(String key) {
return redisTemplate.persist(key);
}
/**
* 返回 key 的剩余的过期时间
*
* @param key
* @param unit
* @return
*/
public Long getExpire(String key, TimeUnit unit) {
return redisTemplate.getExpire(key, unit);
}
/**
* 返回 key 的剩余的过期时间
*
* @param key
* @return
*/
public Long getExpire(String key) {
return redisTemplate.getExpire(key);
}
/**
* 从当前数据库中随机返回一个 key
*
* @return
*/
public String randomKey() {
return redisTemplate.randomKey();
}
/**
* 修改 key 的名称
*
* @param oldKey
* @param newKey
*/
public void rename(String oldKey, String newKey) {
redisTemplate.rename(oldKey, newKey);
}
/**
* 仅当 newkey 不存在时,将 oldKey 改名为 newkey
*
* @param oldKey
* @param newKey
* @return
*/
public Boolean renameIfAbsent(String oldKey, String newKey) {
return redisTemplate.renameIfAbsent(oldKey, newKey);
}
/**
* 返回 key 所储存的值的类型
*
* @param key
* @return
*/
public DataType type(String key) {
return redisTemplate.type(key);
}
/** -------------------string相关操作--------------------- */
/**
* 设置指定 key 的值
*
* @param key
* @param value
*/
public void set(String key, String value) {
if (key.startsWith(RedisConstant.RDS_DIVIDEND_LAST_DAY_)) {// 前复权
redisTemplate.opsForValue().set(key, value);
} else {
redisTemplate.opsForValue().set(key, value, Duration.ofDays(30));// 默认30天
}
}
public void set(String key, Object value) {
this.set(key, getjsonstirng(value));
}
public void set(String key, Object value, Duration timeout) {
this.set(key, getjsonstirng(value), timeout);
}
public void set(String key, String value, Duration timeout) {
redisTemplate.opsForValue().set(key, value, timeout);
}
public String getjsonstirng(Object value) {
return JSON.toJSONString(value, SerializerFeature.WriteDateUseDateFormat);
}
public void del(String key) {
redisTemplate.delete(key);
}
/**
* 获取指定 key 的值
*
* @param key
* @return
*/
public String get(String key) {
return redisTemplate.opsForValue().get(key);
}
public String get(String key, String def) {
String value = redisTemplate.opsForValue().get(key);
if (StringUtils.isBlank(value)) {
return def;
}
return value;
}
public int get(String key, int def) {
String value = redisTemplate.opsForValue().get(key);
if (StringUtils.isBlank(value)) {
return def;
}
return Integer.valueOf(value);
}
public double get(String key, double def) {
String value = redisTemplate.opsForValue().get(key);
if (StringUtils.isBlank(value)) {
return def;
}
return Double.valueOf(value);
}
/**
* 返回 key 中字符串值的子字符
*
* @param key
* @param start
* @param end
* @return
*/
public String getRange(String key, long start, long end) {
return redisTemplate.opsForValue().get(key, start, end);
}
/**
* 将给定 key 的值设为 value ,并返回 key 的旧值(old value)
*
* @param key
* @param value
* @return
*/
public String getAndSet(String key, String value) {
return redisTemplate.opsForValue().getAndSet(key, value);
}
/**
* 对 key 所储存的字符串值,获取指定偏移量上的位(bit)
*
* @param key
* @param offset
* @return
*/
public Boolean getBit(String key, long offset) {
return redisTemplate.opsForValue().getBit(key, offset);
}
/**
* 批量获取
*
* @param keys
* @return
*/
public List<String> multiGet(Collection<String> keys) {
return redisTemplate.opsForValue().multiGet(keys);
}
/**
* 设置ASCII码, 字符串'a'的ASCII码是97, 转为二进制是'01100001', 此方法是将二进制第offset位值变为value
*
* @param key
* @param postion 位置
* @param value 值,true为1, false为0
* @return
*/
public boolean setBit(String key, long offset, boolean value) {
return redisTemplate.opsForValue().setBit(key, offset, value);
}
/**
* 将值 value 关联到 key ,并将 key 的过期时间设为 timeout
*
* @param key
* @param value
* @param timeout 过期时间
* @param unit 时间单位, 天:TimeUnit.DAYS 小时:TimeUnit.HOURS 分钟:TimeUnit.MINUTES
* 秒:TimeUnit.SECONDS 毫秒:TimeUnit.MILLISECONDS
*/
public void setEx(String key, String value, long timeout, TimeUnit unit) {
redisTemplate.opsForValue().set(key, value, timeout, unit);
}
public void setEx(String key, Object value, long timeout, TimeUnit unit) {
this.setEx(key, getjsonstirng(value), timeout, unit);
}
/**
* 只有在 key 不存在时设置 key 的值
*
* @param key
* @param value
* @return 之前已经存在返回false,不存在返回true
*/
public boolean setIfAbsent(String key, String value) {
return redisTemplate.opsForValue().setIfAbsent(key, value);
}
/**
* 用 value 参数覆写给定 key 所储存的字符串值,从偏移量 offset 开始
*
* @param key
* @param value
* @param offset 从指定位置开始覆写
*/
public void setRange(String key, String value, long offset) {
redisTemplate.opsForValue().set(key, value, offset);
}
/**
* 获取字符串的长度
*
* @param key
* @return
*/
public Long size(String key) {
return redisTemplate.opsForValue().size(key);
}
/**
* 批量添加
*
* @param maps
*/
public void multiSet(Map<String, String> maps) {
redisTemplate.opsForValue().multiSet(maps);
}
/**
* 同时设置一个或多个 key-value 对,当且仅当所有给定 key 都不存在
*
* @param maps
* @return 之前已经存在返回false,不存在返回true
*/
public boolean multiSetIfAbsent(Map<String, String> maps) {
return redisTemplate.opsForValue().multiSetIfAbsent(maps);
}
/**
* 增加(自增长), 负数则为自减
*
* @param key
* @param value
* @return
*/
public Long incrBy(String key, long increment) {
return redisTemplate.opsForValue().increment(key, increment);
}
/**
*
* @param key
* @param value
* @return
*/
public Double incrByFloat(String key, double increment) {
return redisTemplate.opsForValue().increment(key, increment);
}
/**
* 追加到末尾
*
* @param key
* @param value
* @return
*/
public Integer append(String key, String value) {
return redisTemplate.opsForValue().append(key, value);
}
/** -------------------hash相关操作------------------------- */
/**
* 获取存储在哈希表中指定字段的值
*
* @param key
* @param field
* @return
*/
public Object hGet(String key, String field) {
return redisTemplate.opsForHash().get(key, field);
}
/**
* 获取所有给定字段的值
*
* @param key
* @return
*/
public Map<Object, Object> hGetAll(String key) {
return redisTemplate.opsForHash().entries(key);
}
/**
* 获取所有给定字段的值
*
* @param key
* @param fields
* @return
*/
public List<Object> hMultiGet(String key, Collection<Object> fields) {
return redisTemplate.opsForHash().multiGet(key, fields);
}
public void hPut(String key, String hashKey, String value) {
redisTemplate.opsForHash().put(key, hashKey, value);
}
public void hPutAll(String key, Map<String, String> maps) {
redisTemplate.opsForHash().putAll(key, maps);
}
/**
* 仅当hashKey不存在时才设置
*
* @param key
* @param hashKey
* @param value
* @return
*/
public Boolean hPutIfAbsent(String key, String hashKey, String value) {
return redisTemplate.opsForHash().putIfAbsent(key, hashKey, value);
}
/**
* 删除一个或多个哈希表字段
*
* @param key
* @param fields
* @return
*/
public Long hDelete(String key, Object... fields) {
return redisTemplate.opsForHash().delete(key, fields);
}
/**
* 查看哈希表 key 中,指定的字段是否存在
*
* @param key
* @param field
* @return
*/
public boolean hExists(String key, String field) {
return redisTemplate.opsForHash().hasKey(key, field);
}
/**
* 为哈希表 key 中的指定字段的整数值加上增量 increment
*
* @param key
* @param field
* @param increment
* @return
*/
public Long hIncrBy(String key, Object field, long increment) {
return redisTemplate.opsForHash().increment(key, field, increment);
}
/**
* 为哈希表 key 中的指定字段的整数值加上增量 increment
*
* @param key
* @param field
* @param delta
* @return
*/
public Double hIncrByFloat(String key, Object field, double delta) {
return redisTemplate.opsForHash().increment(key, field, delta);
}
/**
* 获取所有哈希表中的字段
*
* @param key
* @return
*/
public Set<Object> hKeys(String key) {
return redisTemplate.opsForHash().keys(key);
}
/**
* 获取哈希表中字段的数量
*
* @param key
* @return
*/
public Long hSize(String key) {
return redisTemplate.opsForHash().size(key);
}
/**
* 获取哈希表中所有值
*
* @param key
* @return
*/
public List<Object> hValues(String key) {
return redisTemplate.opsForHash().values(key);
}
/**
* 迭代哈希表中的键值对
*
* @param key
* @param options
* @return
*/
public Cursor<Entry<Object, Object>> hScan(String key, ScanOptions options) {
return redisTemplate.opsForHash().scan(key, options);
}
/** ------------------------list相关操作---------------------------- */
/**
* 通过索引获取列表中的元素
*
* @param key
* @param index
* @return
*/
public String lIndex(String key, long index) {
return redisTemplate.opsForList().index(key, index);
}
/**
* 获取列表指定范围内的元素
*
* @param key
* @param start 开始位置, 0是开始位置
* @param end 结束位置, -1返回所有
* @return
*/
public List<String> lRange(String key, long start, long end) {
return redisTemplate.opsForList().range(key, start, end);
}
/**
* 存储在list头部
*
* @param key
* @param value
* @return
*/
public Long lLeftPush(String key, String value) {
return redisTemplate.opsForList().leftPush(key, value);
}
/**
*
* @param key
* @param value
* @return
*/
public Long lLeftPushAll(String key, String... value) {
return redisTemplate.opsForList().leftPushAll(key, value);
}
/**
*
* @param key
* @param value
* @return
*/
public Long lLeftPushAll(String key, Collection<String> value) {
return redisTemplate.opsForList().leftPushAll(key, value);
}
/**
* 当list存在的时候才加入
*
* @param key
* @param value
* @return
*/
public Long lLeftPushIfPresent(String key, String value) {
return redisTemplate.opsForList().leftPushIfPresent(key, value);
}
/**
* 如果pivot存在,再pivot前面添加
*
* @param key
* @param pivot
* @param value
* @return
*/
public Long lLeftPush(String key, String pivot, String value) {
return redisTemplate.opsForList().leftPush(key, pivot, value);
}
/**
*
* @param key
* @param value
* @return
*/
public Long lRightPush(String key, String value) {
return redisTemplate.opsForList().rightPush(key, value);
}
/**
*
* @param key
* @param value
* @return
*/
public Long lRightPushAll(String key, String... value) {
return redisTemplate.opsForList().rightPushAll(key, value);
}
/**
*
* @param key
* @param value
* @return
*/
public Long lRightPushAll(String key, Collection<String> value) {
return redisTemplate.opsForList().rightPushAll(key, value);
}
/**
* 为已存在的列表添加值
*
* @param key
* @param value
* @return
*/
public Long lRightPushIfPresent(String key, String value) {
return redisTemplate.opsForList().rightPushIfPresent(key, value);
}
/**
* 在pivot元素的右边添加值
*
* @param key
* @param pivot
* @param value
* @return
*/
public Long lRightPush(String key, String pivot, String value) {
return redisTemplate.opsForList().rightPush(key, pivot, value);
}
/**
* 通过索引设置列表元素的值
*
* @param key
* @param index 位置
* @param value
*/
public void lSet(String key, long index, String value) {
redisTemplate.opsForList().set(key, index, value);
}
/**
* 移出并获取列表的第一个元素
*
* @param key
* @return 删除的元素
*/
public String lLeftPop(String key) {
return redisTemplate.opsForList().leftPop(key);
}
/**
* 移出并获取列表的第一个元素, 如果列表没有元素会阻塞列表直到等待超时或发现可弹出元素为止
*
* @param key
* @param timeout 等待时间
* @param unit 时间单位
* @return
*/
public String lBLeftPop(String key, long timeout, TimeUnit unit) {
return redisTemplate.opsForList().leftPop(key, timeout, unit);
}
/**
* 移除并获取列表最后一个元素
*
* @param key
* @return 删除的元素
*/
public String lRightPop(String key) {
return redisTemplate.opsForList().rightPop(key);
}
/**
* 移出并获取列表的最后一个元素, 如果列表没有元素会阻塞列表直到等待超时或发现可弹出元素为止
*
* @param key
* @param timeout 等待时间
* @param unit 时间单位
* @return
*/
public String lBRightPop(String key, long timeout, TimeUnit unit) {
return redisTemplate.opsForList().rightPop(key, timeout, unit);
}
/**
* 移除列表的最后一个元素,并将该元素添加到另一个列表并返回
*
* @param sourceKey
* @param destinationKey
* @return
*/
public String lRightPopAndLeftPush(String sourceKey, String destinationKey) {
return redisTemplate.opsForList().rightPopAndLeftPush(sourceKey, destinationKey);
}
/**
* 从列表中弹出一个值,将弹出的元素插入到另外一个列表中并返回它; 如果列表没有元素会阻塞列表直到等待超时或发现可弹出元素为止
*
* @param sourceKey
* @param destinationKey
* @param timeout
* @param unit
* @return
*/
public String lBRightPopAndLeftPush(String sourceKey, String destinationKey, long timeout, TimeUnit unit) {
return redisTemplate.opsForList().rightPopAndLeftPush(sourceKey, destinationKey, timeout, unit);
}
/**
* 删除集合中值等于value得元素
*
* @param key
* @param index index=0, 删除所有值等于value的元素; index>0, 从头部开始删除第一个值等于value的元素;
* index<0, 从尾部开始删除第一个值等于value的元素;
* @param value
* @return
*/
public Long lRemove(String key, long index, String value) {
return redisTemplate.opsForList().remove(key, index, value);
}
/**
* 裁剪list
*
* @param key
* @param start
* @param end
*/
public void lTrim(String key, long start, long end) {
redisTemplate.opsForList().trim(key, start, end);
}
/**
* 获取列表长度
*
* @param key
* @return
*/
public Long lLen(String key) {
return redisTemplate.opsForList().size(key);
}
/** --------------------set相关操作-------------------------- */
/**
* set添加元素
*
* @param key
* @param values
* @return
*/
public Long sAdd(String key, String... values) {
return redisTemplate.opsForSet().add(key, values);
}
/**
* set移除元素
*
* @param key
* @param values
* @return
*/
public Long sRemove(String key, Object... values) {
return redisTemplate.opsForSet().remove(key, values);
}
/**
* 移除并返回集合的一个随机元素
*
* @param key
* @return
*/
public String sPop(String key) {
return redisTemplate.opsForSet().pop(key);
}
/**
* 将元素value从一个集合移到另一个集合
*
* @param key
* @param value
* @param destKey
* @return
*/
public Boolean sMove(String key, String value, String destKey) {
return redisTemplate.opsForSet().move(key, value, destKey);
}
/**
* 获取集合的大小
*
* @param key
* @return
*/
public Long sSize(String key) {
return redisTemplate.opsForSet().size(key);
}
/**
* 判断集合是否包含value
*
* @param key
* @param value
* @return
*/
public Boolean sIsMember(String key, Object value) {
return redisTemplate.opsForSet().isMember(key, value);
}
/**
* 获取两个集合的交集
*
* @param key
* @param otherKey
* @return
*/
public Set<String> sIntersect(String key, String otherKey) {
return redisTemplate.opsForSet().intersect(key, otherKey);
}
/**
* 获取key集合与多个集合的交集
*
* @param key
* @param otherKeys
* @return
*/
public Set<String> sIntersect(String key, Collection<String> otherKeys) {
return redisTemplate.opsForSet().intersect(key, otherKeys);
}
/**
* key集合与otherKey集合的交集存储到destKey集合中
*
* @param key
* @param otherKey
* @param destKey
* @return
*/
public Long sIntersectAndStore(String key, String otherKey, String destKey) {
return redisTemplate.opsForSet().intersectAndStore(key, otherKey, destKey);
}
/**
* key集合与多个集合的交集存储到destKey集合中
*
* @param key
* @param otherKeys
* @param destKey
* @return
*/
public Long sIntersectAndStore(String key, Collection<String> otherKeys, String destKey) {
return redisTemplate.opsForSet().intersectAndStore(key, otherKeys, destKey);
}
/**
* 获取两个集合的并集
*
* @param key
* @param otherKeys
* @return
*/
public Set<String> sUnion(String key, String otherKeys) {
return redisTemplate.opsForSet().union(key, otherKeys);
}
/**
* 获取key集合与多个集合的并集
*
* @param key
* @param otherKeys
* @return
*/
public Set<String> sUnion(String key, Collection<String> otherKeys) {
return redisTemplate.opsForSet().union(key, otherKeys);
}
/**
* key集合与otherKey集合的并集存储到destKey中
*
* @param key
* @param otherKey
* @param destKey
* @return
*/
public Long sUnionAndStore(String key, String otherKey, String destKey) {
return redisTemplate.opsForSet().unionAndStore(key, otherKey, destKey);
}
/**
* key集合与多个集合的并集存储到destKey中
*
* @param key
* @param otherKeys
* @param destKey
* @return
*/
public Long sUnionAndStore(String key, Collection<String> otherKeys, String destKey) {
return redisTemplate.opsForSet().unionAndStore(key, otherKeys, destKey);
}
/**
* 获取两个集合的差集
*
* @param key
* @param otherKey
* @return
*/
public Set<String> sDifference(String key, String otherKey) {
return redisTemplate.opsForSet().difference(key, otherKey);
}
/**
* 获取key集合与多个集合的差集
*
* @param key
* @param otherKeys
* @return
*/
public Set<String> sDifference(String key, Collection<String> otherKeys) {
return redisTemplate.opsForSet().difference(key, otherKeys);
}
/**
* key集合与otherKey集合的差集存储到destKey中
*
* @param key
* @param otherKey
* @param destKey
* @return
*/
public Long sDifference(String key, String otherKey, String destKey) {
return redisTemplate.opsForSet().differenceAndStore(key, otherKey, destKey);
}
/**
* key集合与多个集合的差集存储到destKey中
*
* @param key
* @param otherKeys
* @param destKey
* @return
*/
public Long sDifference(String key, Collection<String> otherKeys, String destKey) {
return redisTemplate.opsForSet().differenceAndStore(key, otherKeys, destKey);
}
/**
* 获取集合所有元素
*
* @param key
* @param otherKeys
* @param destKey
* @return
*/
public Set<String> setMembers(String key) {
return redisTemplate.opsForSet().members(key);
}
/**
* 随机获取集合中的一个元素
*
* @param key
* @return
*/
public String sRandomMember(String key) {
return redisTemplate.opsForSet().randomMember(key);
}
/**
* 随机获取集合中count个元素
*
* @param key
* @param count
* @return
*/
public List<String> sRandomMembers(String key, long count) {
return redisTemplate.opsForSet().randomMembers(key, count);
}
/**
* 随机获取集合中count个元素并且去除重复的
*
* @param key
* @param count
* @return
*/
public Set<String> sDistinctRandomMembers(String key, long count) {
return redisTemplate.opsForSet().distinctRandomMembers(key, count);
}
/**
*
* @param key
* @param options
* @return
*/
public Cursor<String> sScan(String key, ScanOptions options) {
return redisTemplate.opsForSet().scan(key, options);
}
/** ------------------zSet相关操作-------------------------------- */
/**
* 添加元素,有序集合是按照元素的score值由小到大排列
*
* @param key
* @param value
* @param score
* @return
*/
public Boolean zAdd(String key, String value, double score) {
return redisTemplate.opsForZSet().add(key, value, score);
}
/**
*
* @param key
* @param values
* @return
*/
public Long zAdd(String key, Set<TypedTuple<String>> values) {
return redisTemplate.opsForZSet().add(key, values);
}
/**
*
* @param key
* @param values
* @return
*/
public Long zRemove(String key, Object... values) {
return redisTemplate.opsForZSet().remove(key, values);
}
/**
* 增加元素的score值,并返回增加后的值
*
* @param key
* @param value
* @param delta
* @return
*/
public Double zIncrementScore(String key, String value, double delta) {
return redisTemplate.opsForZSet().incrementScore(key, value, delta);
}
/**
* 返回元素在集合的排名,有序集合是按照元素的score值由小到大排列
*
* @param key
* @param value
* @return 0表示第一位
*/
public Long zRank(String key, Object value) {
return redisTemplate.opsForZSet().rank(key, value);
}
/**
* 返回元素在集合的排名,按元素的score值由大到小排列
*
* @param key
* @param value
* @return
*/
public Long zReverseRank(String key, Object value) {
return redisTemplate.opsForZSet().reverseRank(key, value);
}
/**
* 获取集合的元素, 从小到大排序
*
* @param key
* @param start 开始位置
* @param end 结束位置, -1查询所有
* @return
*/
public Set<String> zRange(String key, long start, long end) {
return redisTemplate.opsForZSet().range(key, start, end);
}
/**
* 获取集合元素, 并且把score值也获取
*
* @param key
* @param start
* @param end
* @return
*/
public Set<TypedTuple<String>> zRangeWithScores(String key, long start, long end) {
return redisTemplate.opsForZSet().rangeWithScores(key, start, end);
}
/**
* 根据Score值查询集合元素
*
* @param key
* @param min 最小值
* @param max 最大值
* @return
*/
public Set<String> zRangeByScore(String key, double min, double max) {
return redisTemplate.opsForZSet().rangeByScore(key, min, max);
}
/**
* 根据Score值查询集合元素, 从小到大排序
*
* @param key
* @param min 最小值
* @param max 最大值
* @return
*/
public Set<TypedTuple<String>> zRangeByScoreWithScores(String key, double min, double max) {
return redisTemplate.opsForZSet().rangeByScoreWithScores(key, min, max);
}
/**
*
* @param key
* @param min
* @param max
* @param start
* @param end
* @return
*/
public Set<TypedTuple<String>> zRangeByScoreWithScores(String key, double min, double max, long start, long end) {
return redisTemplate.opsForZSet().rangeByScoreWithScores(key, min, max, start, end);
}
/**
* 获取集合的元素, 从大到小排序
*
* @param key
* @param start
* @param end
* @return
*/
public Set<String> zReverseRange(String key, long start, long end) {
return redisTemplate.opsForZSet().reverseRange(key, start, end);
}
/**
* 获取集合的元素, 从大到小排序, 并返回score值
*
* @param key
* @param start
* @param end
* @return
*/
public Set<TypedTuple<String>> zReverseRangeWithScores(String key, long start, long end) {
return redisTemplate.opsForZSet().reverseRangeWithScores(key, start, end);
}
/**
* 根据Score值查询集合元素, 从大到小排序
*
* @param key
* @param min
* @param max
* @return
*/
public Set<String> zReverseRangeByScore(String key, double min, double max) {
return redisTemplate.opsForZSet().reverseRangeByScore(key, min, max);
}
/**
* 根据Score值查询集合元素, 从大到小排序
*
* @param key
* @param min
* @param max
* @return
*/
public Set<TypedTuple<String>> zReverseRangeByScoreWithScores(String key, double min, double max) {
return redisTemplate.opsForZSet().reverseRangeByScoreWithScores(key, min, max);
}
/**
*
* @param key
* @param min
* @param max
* @param start
* @param end
* @return
*/
public Set<String> zReverseRangeByScore(String key, double min, double max, long start, long end) {
return redisTemplate.opsForZSet().reverseRangeByScore(key, min, max, start, end);
}
/**
* 根据score值获取集合元素数量
*
* @param key
* @param min
* @param max
* @return
*/
public Long zCount(String key, double min, double max) {
return redisTemplate.opsForZSet().count(key, min, max);
}
/**
* 获取集合大小
*
* @param key
* @return
*/
public Long zSize(String key) {
return redisTemplate.opsForZSet().size(key);
}
/**
* 获取集合大小
*
* @param key
* @return
*/
public Long zZCard(String key) {
return redisTemplate.opsForZSet().zCard(key);
}
/**
* 获取集合中value元素的score值
*
* @param key
* @param value
* @return
*/
public Double zScore(String key, Object value) {
return redisTemplate.opsForZSet().score(key, value);
}
/**
* 移除指定索引位置的成员
*
* @param key
* @param start
* @param end
* @return
*/
public Long zRemoveRange(String key, long start, long end) {
return redisTemplate.opsForZSet().removeRange(key, start, end);
}
/**
* 根据指定的score值的范围来移除成员
*
* @param key
* @param min
* @param max
* @return
*/
public Long zRemoveRangeByScore(String key, double min, double max) {
return redisTemplate.opsForZSet().removeRangeByScore(key, min, max);
}
/**
* 获取key和otherKey的并集并存储在destKey中
*
* @param key
* @param otherKey
* @param destKey
* @return
*/
public Long zUnionAndStore(String key, String otherKey, String destKey) {
return redisTemplate.opsForZSet().unionAndStore(key, otherKey, destKey);
}
/**
*
* @param key
* @param otherKeys
* @param destKey
* @return
*/
public Long zUnionAndStore(String key, Collection<String> otherKeys, String destKey) {
return redisTemplate.opsForZSet().unionAndStore(key, otherKeys, destKey);
}
/**
* 交集
*
* @param key
* @param otherKey
* @param destKey
* @return
*/
public Long zIntersectAndStore(String key, String otherKey, String destKey) {
return redisTemplate.opsForZSet().intersectAndStore(key, otherKey, destKey);
}
/**
* 交集
*
* @param key
* @param otherKeys
* @param destKey
* @return
*/
public Long zIntersectAndStore(String key, Collection<String> otherKeys, String destKey) {
return redisTemplate.opsForZSet().intersectAndStore(key, otherKeys, destKey);
}
/**
*
* @param key
* @param options
* @return
*/
public Cursor<TypedTuple<String>> zScan(String key, ScanOptions options) {
return redisTemplate.opsForZSet().scan(key, options);
}
}
| [
"[email protected]"
] | |
c8b404786b3e9cbbd06884ed0e0ffaeaa73115f8 | 1d00e12ce9581d6ae7409eae371acb109ecc8589 | /src/main/java/com/app/pas/dao/impl/ProjectDaoImpl.java | d320785a8584871c0aac597be549c45d5d765ff2 | [] | no_license | yjy1987/PASProject | 9ee8aa38fe49181f6a50594501e4a3d478f65d9a | 761e1c687b06b7000fcc5ec33eff8a21f5ba523b | refs/heads/master | 2021-04-15T04:04:18.963629 | 2018-03-22T07:08:03 | 2018-03-22T07:08:03 | 126,294,122 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,494 | java | package com.app.pas.dao.impl;
import java.sql.SQLException;
import java.util.List;
import com.app.pas.dao.ProjectDao;
import com.app.pas.dto.MemPositionViewVo;
import com.app.pas.dto.MemberVo;
import com.app.pas.dto.ProjectJoinVo;
import com.app.pas.dto.ProjectVo;
import com.ibatis.sqlmap.client.SqlMapClient;
public class ProjectDaoImpl implements ProjectDao {
private SqlMapClient client;
public void setClient(SqlMapClient client) {
this.client = client;
}
@Override
public List<ProjectVo> selectProjectList() throws SQLException {
List<ProjectVo> list = client.queryForList("selectProjectList");
return list;
}
@Override
public ProjectVo selectProject(int proj_Num) throws SQLException {
ProjectVo projectVo = (ProjectVo) client.queryForObject(
"selectProject", proj_Num);
return projectVo;
}
@Override
public void insertProject(ProjectVo projectVo) throws SQLException {
client.insert("insertProject", projectVo);
}
@Override
public void updateProject(ProjectVo projectVo) throws SQLException {
client.update("updateProject", projectVo);
}
@Override
public void deleteProject(int proj_Num) throws SQLException {
client.update("deleteProject", proj_Num);
}
@Override
public List<MemPositionViewVo> selectMemPositionViewListByProjNum(
int proj_Num) throws SQLException {
List<MemPositionViewVo> list = client.queryForList(
"selectMemPositionViewListByProjNum", proj_Num);
return list;
}
//내가 참여한 프로젝트 검색리스트
@Override
public List<ProjectVo> selectMyProjectListById(ProjectVo projectVo)throws SQLException {
List<ProjectVo> list = client.queryForList("selectMyProjectListById",projectVo);
return list;
}
//외부프로젝트 --------------------------------------------------------------------
@Override
public List<ProjectVo> selectOtherProjectListById(ProjectVo projectVo)
throws SQLException {
List<ProjectVo> list = client.queryForList(
"selectOtherProjectListById", projectVo);
return list;
}
@Override
public ProjectVo selectLastInsertProject(String mem_Email)
throws SQLException {
ProjectVo projectVo = (ProjectVo) client.queryForObject(
"selectLastInsertProject", mem_Email);
return projectVo;
}
@Override
public void updateProjectImg(ProjectVo projectVo) throws SQLException {
client.update("updateProjectImg", projectVo);
}
@Override
public void updateProjectColor(ProjectVo projectVo) throws SQLException {
client.update("updateProjectColor", projectVo);
}
@Override
public List<Integer> selectInviteProjNumByMemEmail(String mem_Email)
throws SQLException {
List<Integer> list =client.queryForList("selectInviteProjNumByMemEmail", mem_Email);
return list;
}
@Override
public int selectProjectTotalCount() throws SQLException {
int totalCount = (Integer) client.queryForObject("selectProjectTotalCount");
return totalCount;
}
@Override
public List<ProjectVo> selectProjectList2(String proj_Name) throws SQLException {
List<ProjectVo> list = client.queryForList("selectProjectList2",proj_Name);
return list;
}
@Override
public List<ProjectJoinVo> selectMemberToProjNum(int proj_Num) throws SQLException {
List<ProjectJoinVo> list = client.queryForList("selectMemberToProjNum",proj_Num);
return list;
}
@Override
public List<ProjectVo> selectProjCreateToday() throws SQLException {
List<ProjectVo> projCreateList = client.queryForList("selectProjCreateToday");
return projCreateList;
}
}
| [
"[email protected]"
] | |
ae1e8cce1ab1b903e8d9f02b4abff3aa5673150f | f4af5553d97b0b5c9b93263418356a88fe654d4d | /src/Models/FactoryProvider.java | e1ecba63ff852deab6ecfc249d40fdd97329440e | [] | no_license | asmaaramadan99/Fruit-Ninga | ba1b94090fcec755a3d59419193581ee7f03b979 | 06a36d8f8e53cda0ee26ceffa0af003b6e11dbca | refs/heads/master | 2022-12-10T02:18:50.370328 | 2020-07-29T22:43:56 | 2020-07-29T22:43:56 | 294,745,889 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | package Models;
public class FactoryProvider {
public static GameObjectfactory create(String object) {
if (object.equalsIgnoreCase("Fruit"))
return new FruitFactory();
else if (object.equalsIgnoreCase("Bomb"))
return new BombFactory();
return null;
}
}
| [
"[email protected]"
] | |
0fc63a29853a985218884f8b198f17e83d67a217 | ab7687c36b9587c3460f3aad4ae8c7b31f9b0eff | /src/main/java/mum/asd/patterns/FactoryMethod/WinterHolidayPromotion.java | b0cff8ade0b6254d34cb1cff956b37be2514c1d0 | [] | no_license | thonguyen1302/ProjectASD_Design_pattern | ebbd5164b7429bed4de0c3c410e9a0c12ef5a5e5 | 4f813ca1592d0a64b40cda799a549627472e79a5 | refs/heads/master | 2020-03-17T01:38:51.094405 | 2018-05-21T03:48:18 | 2018-05-21T03:48:18 | 133,161,296 | 0 | 0 | null | 2018-05-19T19:31:17 | 2018-05-12T16:01:27 | Java | UTF-8 | Java | false | false | 493 | java | package mum.asd.patterns.FactoryMethod;
import mum.asd.patterns.Command.PromotionCommandInterface;
public class WinterHolidayPromotion extends HolidayPromotion implements PromotionCommandInterface {
public WinterHolidayPromotion(){
// super("WinterHoliday",5,5);
this.setDiscount(5);
this.setPercent(5);
this.setName("WinterHoliday");
}
@Override
public int executeGetDiscout() {
return new ComputeDiscount().getDiscount(this);
}
}
| [
"[email protected]"
] | |
2d98617d8561a096455e32ce98e968e406f7a48e | 54483b23a46153e9d52f1575632bd2a86f4f3146 | /screenshotlib/src/main/java/com/junie/screenshot/allscreen/ScreenShotActivity.java | 24bad8b9ff2ad05b37bbc7f48b30bbd8df17b3e9 | [] | no_license | junie233/screenshot | a3ba7253ca66964ec9d317f8894cf777fb8b4cd7 | e15646b9a2144e458c91d9112fd52b24edd6da32 | refs/heads/master | 2021-05-11T18:15:13.694452 | 2018-01-18T12:40:35 | 2018-01-18T12:40:35 | 117,815,677 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,225 | java | package com.junie.screenshot.allscreen;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.media.projection.MediaProjectionManager;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.Window;
import com.junie.screenshot.listener.ShotListener;
/**
* Created by niejun on 2018/1/18.
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class ScreenShotActivity extends Activity{
private static String TAG = ScreenShotActivity.class.getSimpleName();
public static final int REQUEST_MEDIA_PROJECTION = 10001;
private ScreenShotManager shotManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
getWindow().setDimAmount(0f);
requestScreenShot();
}
public void requestScreenShot() {
Log.d(TAG,"请求权限");
startActivityForResult(
((MediaProjectionManager) getSystemService(MEDIA_PROJECTION_SERVICE)).createScreenCaptureIntent(),
REQUEST_MEDIA_PROJECTION
);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case REQUEST_MEDIA_PROJECTION: {
if (resultCode == -1 && data != null) {
shotManager = new ScreenShotManager(ScreenShotActivity.this,data,new ShotListener() {
@Override
public void onShotFinish() {
}
});
shotManager.startScreenShot();
}
}
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if(shotManager != null) {
shotManager.release();
shotManager = null;
}
}
}
| [
"[email protected]"
] | |
c6f9e7ecc412a28c9fb3432af7e87048416d3b84 | 216a2141fcb7ae1698543bb196489767c3fce96a | /algorithms/java/347_top_k_frequent_elements/TopK.java | 890085158af513fc71afd27b265cc7ff9a4d633b | [] | no_license | zhangzz2015/code | 87aedb9c5ceb7279903b42036431891b2338a39d | 28d0d6fd8fb154644bb09a43b932a8a1d9d2593f | refs/heads/master | 2023-06-19T22:22:39.739097 | 2021-07-18T21:28:21 | 2021-07-18T21:28:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,168 | java | class TopK {
public int[] topKFrequent(int[] nums, int k) {
if (nums == null || nums.length == 0 || k <= 0) return nums;
Map<Integer, Integer> freqMap = buildMap(nums);
PriorityQueue<Map.Entry<Integer, Integer>> minHeap = new PriorityQueue<>(new MyComparator());
for (Map.Entry<Integer, Integer> entry : freqMap.entrySet()) {
minHeap.offer(entry);
if (minHeap.size() > k) {
minHeap.poll();
}
}
int[] res = new int[k];
int i = 0;
while (!minHeap.isEmpty()) {
res[i++] = minHeap.poll().getKey();
}
return res;
}
static class MyComparator implements Comparator<Map.Entry<Integer, Integer>> {
@Override
public int compare(Map.Entry<Integer, Integer> e1, Map.Entry<Integer, Integer> e2) {
return Integer.compare(e1.getValue(), e2.getValue());
}
}
private Map<Integer, Integer> buildMap(int[] nums) {
Map<Integer, Integer> map = new HashMap<>();
for (int i : nums) {
map.put(i, map.getOrDefault(i, 0) + 1);
}
return map;
}
} | [
"[email protected]"
] | |
b694a5eca89c4cec883ef500d686c2c73f8e0a41 | d2286fa79ed37b90ed3a49a7d15996664244ccec | /src/test/java/io/nats/client/NatsServerProtocolMock.java | d7e72b544423704710a29edda271321a080becb4 | [
"Apache-2.0"
] | permissive | altmind/java-nats | ed2dfa62d9428df3865b6e8b747741e97c99ee10 | 5f291048fd30192ba39b3fe2925ecd60aaad6b48 | refs/heads/master | 2020-05-09T11:35:59.709158 | 2019-04-09T20:42:08 | 2019-04-09T20:42:08 | 181,086,695 | 0 | 0 | Apache-2.0 | 2019-04-12T21:37:43 | 2019-04-12T21:37:43 | null | UTF-8 | Java | false | false | 8,896 | java | // Copyright 2015-2018 The NATS Authors
// 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 io.nats.client;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.CompletableFuture;
/**
* Handles the begining of the connect sequence, all hard coded, but
* is configurable to fail at specific points to allow client testing.
*/
public class NatsServerProtocolMock implements Closeable{
// Default is to exit after pong
public enum ExitAt {
SLEEP_BEFORE_INFO,
EXIT_BEFORE_INFO,
EXIT_AFTER_INFO,
EXIT_AFTER_CONNECT,
EXIT_AFTER_PING,
EXIT_AFTER_CUSTOM,
NO_EXIT
}
public enum Progress {
NO_CLIENT,
CLIENT_CONNECTED,
SENT_INFO,
GOT_CONNECT,
GOT_PING,
SENT_PONG,
STARTED_CUSTOM_CODE,
COMPLETED_CUSTOM_CODE,
}
public interface Customizer {
public void customizeTest(NatsServerProtocolMock ts, BufferedReader reader, PrintWriter writer);
}
private int port;
private ExitAt exitAt;
private Progress progress;
private boolean protocolFailure;
private CompletableFuture<Boolean> waitForIt;
private Customizer customizer;
private String customInfo;
private String separator = " ";
private boolean customInfoIsFullInfo = false;
public NatsServerProtocolMock(ExitAt exitAt) {
this(NatsTestServer.nextPort(), exitAt);
}
public NatsServerProtocolMock(int port, ExitAt exitAt) {
this.port = port;
this.exitAt = exitAt;
start();
}
public NatsServerProtocolMock(Customizer custom) {
this.port = NatsTestServer.nextPort();
this.exitAt = ExitAt.NO_EXIT;
this.customizer = custom;
start();
}
public NatsServerProtocolMock(Customizer custom, int port, boolean exitAfterCustom) {
this.port = port;
if (exitAfterCustom) {
this.exitAt = ExitAt.EXIT_AFTER_CUSTOM;
} else {
this.exitAt = ExitAt.NO_EXIT;
}
this.customizer = custom;
start();
}
// CustomInfo is just the JSON string, not the full protocol string
// or the \r\n.
public NatsServerProtocolMock(Customizer custom, String customInfo) {
this.port = NatsTestServer.nextPort();
this.exitAt = ExitAt.NO_EXIT;
this.customizer = custom;
this.customInfo = customInfo;
start();
}
private void start() {
this.progress = Progress.NO_CLIENT;
this.waitForIt = new CompletableFuture<>();
Thread t = new Thread(() -> {accept();});
t.start();
try {
Thread.sleep(100);
} catch (Exception exp) {
//Give the server time to get going
}
}
public void useTabs() {
this.separator = "\t";
}
public void useCustomInfoAsFullInfo() {
customInfoIsFullInfo = true;
}
public int getPort() {
return port;
}
public String getURI() {
return "nats://localhost:" + this.getPort();
}
public Progress getProgress() {
return this.progress;
}
// True if the failure was not intentional
public boolean wasProtocolFailure() {
return protocolFailure;
}
public void close() {
waitForIt.complete(Boolean.TRUE);
}
public void accept() {
ServerSocket serverSocket = null;
Socket socket = null;
PrintWriter writer = null;
BufferedReader reader = null;
try {
serverSocket = new ServerSocket(this.port);
serverSocket.setSoTimeout(5000);
System.out.println("*** Mock Server @" + this.port + " started...");
socket = serverSocket.accept();
this.progress = Progress.CLIENT_CONNECTED;
System.out.println("*** Mock Server @" + this.port + " got client...");
writer = new PrintWriter(socket.getOutputStream());
reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
if (exitAt == ExitAt.EXIT_BEFORE_INFO) {
throw new Exception("exit");
}
if (exitAt == ExitAt.SLEEP_BEFORE_INFO) {
try {
Thread.sleep(3000);
} catch ( InterruptedException e) {
// ignore
}
}
if (this.customInfo != null) {
if (customInfoIsFullInfo) {
writer.write(customInfo);
} else {
writer.write("INFO" + this.separator + customInfo + "\r\n");
}
} else {
writer.write("INFO" + this.separator + "{\"server_id\":\"test\"}\r\n");
}
writer.flush();
this.progress = Progress.SENT_INFO;
System.out.println("*** Mock Server @" + this.port + " sent info...");
if (exitAt == ExitAt.EXIT_AFTER_INFO) {
throw new Exception("exit");
}
String connect = reader.readLine();
if (connect != null && connect.startsWith("CONNECT")) {
this.progress = Progress.GOT_CONNECT;
System.out.println("*** Mock Server @" + this.port + " got connect...");
} else {
throw new IOException("First message wasn't CONNECT");
}
if (exitAt == ExitAt.EXIT_AFTER_CONNECT) {
throw new Exception("exit");
}
String ping = reader.readLine();
if (ping.startsWith("PING")) {
this.progress = Progress.GOT_PING;
System.out.println("*** Mock Server @" + this.port + " got ping...");
} else {
throw new IOException("Second message wasn't PING");
}
if (exitAt == ExitAt.EXIT_AFTER_PING) {
throw new Exception("exit");
}
writer.write("PONG\r\n");
writer.flush();
this.progress = Progress.SENT_PONG;
System.out.println("*** Mock Server @" + this.port + " sent pong...");
if (this.customizer != null) {
this.progress = Progress.STARTED_CUSTOM_CODE;
System.out.println("*** Mock Server @" + this.port + " starting custom code...");
this.customizer.customizeTest(this, reader, writer);
this.progress = Progress.COMPLETED_CUSTOM_CODE;
}
if (exitAt == ExitAt.EXIT_AFTER_CUSTOM) {
throw new Exception("exit");
}
waitForIt.get(); // Wait for the test to cancel us
} catch (IOException io) {
protocolFailure = true;
System.out.println("\n*** Mock Server @" + this.port + " got exception "+io.getMessage());
io.printStackTrace();
} catch (Exception ex) {
System.out.println("\n*** Mock Server @" + this.port + " got exception "+ex.getMessage());
if (!"exit".equals(ex.getMessage())) {
ex.printStackTrace();
}
}
finally {
if (serverSocket != null) {
try {
serverSocket.close();
} catch (IOException ex) {
System.out.println("\n*** Mock Server @" + this.port + " got exception "+ex.getMessage());
}
}
if (socket != null) {
try {
writer.close();
reader.close();
socket.close();
} catch (IOException ex) {
System.out.println("\n*** Mock Server @" + this.port + " got exception "+ex.getMessage());
}
}
}
System.out.println("*** Mock Server @" + this.port + " completed...");
}
} | [
"[email protected]"
] | |
39c90e7719f1caccf32a7ec854c145f367efd58b | 83a4e2fc957f9812dbc574eb0fe4ff6ba2f5b1b3 | /logistics/src/main/java/com/cl/logistics/service/IGoodsBillService.java | bd2944814892dc0bf6922fea950cdbec2416331e | [] | no_license | TANGWO/code | 8c82eaa55712d904f25caf4bdd92f0cedf0071f5 | 2dccc788e5e1b5a9ca4e1432d299bad2b91b3441 | refs/heads/master | 2020-04-15T02:29:27.086977 | 2019-01-04T09:33:16 | 2019-01-04T09:33:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,135 | java | package com.cl.logistics.service;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.cl.logistics.bean.CargoReceiptDetail;
import com.cl.logistics.bean.GoodsBill;
import com.cl.logistics.bean.GoodsBillEvent;
public interface IGoodsBillService {
public Map<?, ?> save(GoodsBill goodsBill);
public boolean saveGoods(String goodsBillDetailId, CargoReceiptDetail cargoReceiptDetail);
public Page<GoodsBillEvent> selectAllGoogsBillByPage(Pageable pageable);
public Page<GoodsBillEvent> selectGoodsBillByEvent(String eventName, Pageable pageable);
public GoodsBill selectByGoodsBillCode(String goodsBillCode);
public boolean update(GoodsBill goodsBill);
public boolean delete(String goodsBillCode);
public List<GoodsBill> findDriverIdIsNull();
public List<GoodsBill> findWaitReceive(String customerCode);
public Page<GoodsBill> findInformGet(String type, Pageable pageable);
public Page<GoodsBill> findOldInform(String type, Pageable pageable);
public Page<GoodsBill> findAllGot(Pageable pageable);
} | [
"[email protected]"
] | |
37d5530fd2f892501e50636724ea5030e2a414be | f13df3be13e9192134a4a2d1accaa469844266e9 | /src/LBJ2/nlp/coref/ForcePronounLink.java | ff5d3a72a178832f8ba889ac8c39a1eed42506c8 | [] | no_license | cos/evaluation-coref | 4e5eb6c1429419c03c642a1944b807c0a3864956 | e1e39477d4efc3e7e253c25c89ebed253f834d86 | refs/heads/master | 2021-01-19T07:49:42.654540 | 2012-06-15T16:28:44 | 2012-06-15T17:06:37 | 4,754,886 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,378 | java | // Modifying this comment will cause the next execution of LBJ2 to overwrite this file.
// F1B88000000000000000592914B43C040158FFAC4B7AD5A526FC985F2D22A011A0E5DBC29C447262BB2BBB1B2A8FFDD9963D4B01F0D093406FD7F66ED033583B12A734632CDB3F50EECB3BEA3B939D775B57547D22B25A68F10972C237A011E3C3E729BE2C31B84C5006D0617F71482D91C9CD94F4D0E21ABB6A9C0A27E1494762E7A556CFBB582390C83AD20384195C284A7F046D742BE309D6FDEF1DE37FE15470F4D2E915FF2A3FE56A953B5F5136FFCA869053BB8A205342C9D132A499F766557E145F84F4A86C9549CE325C495E0D285FF505D742983F086A45A398E277B74FB1318B604A92CCFD07E0F2730751A4DE41630635D40E3C5DC6892991DF4167A5666E7EA16D777E5DE0BC804FD28DC25859008F5CBDC03E3A9618CE8DDA16B62A9D83F859ABC36AD912FAAD5E92C9E34C88EB3CB8370E30AE569310EFEF002761B7D738300000
package LBJ2.nlp.coref;
import LBJ2.classify.*;
import LBJ2.infer.*;
import LBJ2.learn.*;
import LBJ2.parse.*;
import java.util.*;
public class ForcePronounLink extends ParameterizedConstraint
{
private static final DataCoref __DataCoref = new DataCoref();
public ForcePronounLink() { super("LBJ2.nlp.coref.ForcePronounLink"); }
public String getInputType() { return "LBJ2.nlp.coref.Document"; }
public String discreteValue(Object __example)
{
if (!(__example instanceof Document))
{
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Constraint 'ForcePronounLink(Document)' defined on line 56 of dataCoref.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
Document d = (Document) __example;
LinkedList previousMentions = new LinkedList();
Document.Mention previous = null;
for (int i = 0; i < d.sentences(); ++i)
{
for (int j = 0; j < d.mentionsInSentence(i); ++j)
{
Document.Mention current = d.getMention(i, j);
if (previous != null)
{
previousMentions = (LinkedList) previousMentions.clone();
previousMentions.add(previous);
}
{
boolean LBJ2$constraint$result$0;
{
boolean LBJ2$constraint$result$1;
{
boolean LBJ2$constraint$result$2;
{
boolean LBJ2$constraint$result$3;
{
boolean LBJ2$constraint$result$4;
{
boolean LBJ2$constraint$result$5;
{
boolean LBJ2$constraint$result$6;
{
boolean LBJ2$constraint$result$7;
{
boolean LBJ2$constraint$result$8;
LBJ2$constraint$result$8 = ("" + (current.getHead().toLowerCase())).equals("" + ("he"));
if (!LBJ2$constraint$result$8)
LBJ2$constraint$result$7 = ("" + (current.getHead().toLowerCase())).equals("" + ("him"));
else LBJ2$constraint$result$7 = true;
}
if (!LBJ2$constraint$result$7)
LBJ2$constraint$result$6 = ("" + (current.getHead().toLowerCase())).equals("" + ("himself"));
else LBJ2$constraint$result$6 = true;
}
if (!LBJ2$constraint$result$6)
LBJ2$constraint$result$5 = ("" + (current.getHead().toLowerCase())).equals("" + ("his"));
else LBJ2$constraint$result$5 = true;
}
if (!LBJ2$constraint$result$5)
LBJ2$constraint$result$4 = ("" + (current.getHead().toLowerCase())).equals("" + ("she"));
else LBJ2$constraint$result$4 = true;
}
if (!LBJ2$constraint$result$4)
LBJ2$constraint$result$3 = ("" + (current.getHead().toLowerCase())).equals("" + ("her"));
else LBJ2$constraint$result$3 = true;
}
if (!LBJ2$constraint$result$3)
LBJ2$constraint$result$2 = ("" + (current.getHead().toLowerCase())).equals("" + ("herself"));
else LBJ2$constraint$result$2 = true;
}
if (!LBJ2$constraint$result$2)
LBJ2$constraint$result$1 = ("" + (current.getHead().toLowerCase())).equals("" + ("hers"));
else LBJ2$constraint$result$1 = true;
}
if (LBJ2$constraint$result$1)
{
boolean LBJ2$constraint$result$9;
LBJ2$constraint$result$9 = !("" + (previousMentions.size())).equals("" + (0));
if (LBJ2$constraint$result$9)
{
LBJ2$constraint$result$0 = false;
for (java.util.Iterator __I0 = (previousMentions).iterator(); __I0.hasNext() && !LBJ2$constraint$result$0; )
{
Document.Mention m = (Document.Mention) __I0.next();
LBJ2$constraint$result$0 = ("" + (__DataCoref.discreteValue((Object) d.getMentionPair(m, current)))).equals("" + (true));
}
}
else LBJ2$constraint$result$0 = true;
}
else LBJ2$constraint$result$0 = true;
}
if (!LBJ2$constraint$result$0) return "false";
}
previous = current;
}
}
return "true";
}
public FeatureVector[] classify(Object[] examples)
{
for (int i = 0; i < examples.length; ++i)
if (!(examples[i] instanceof Document))
{
System.err.println("Classifier 'ForcePronounLink(Document)' defined on line 56 of dataCoref.lbj received '" + examples[i].getClass().getName() + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
return super.classify(examples);
}
public int hashCode() { return "ForcePronounLink".hashCode(); }
public boolean equals(Object o) { return o instanceof ForcePronounLink; }
public FirstOrderConstraint makeConstraint(Object __example)
{
if (!(__example instanceof Document))
{
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Constraint 'ForcePronounLink(Document)' defined on line 56 of dataCoref.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
Document d = (Document) __example;
FirstOrderConstraint __result = new FirstOrderConstant(true);
LinkedList previousMentions = new LinkedList();
Document.Mention previous = null;
for (int i = 0; i < d.sentences(); ++i)
{
for (int j = 0; j < d.mentionsInSentence(i); ++j)
{
Document.Mention current = d.getMention(i, j);
if (previous != null)
{
previousMentions = (LinkedList) previousMentions.clone();
previousMentions.add(previous);
}
{
Object[] LBJ$constraint$context = new Object[3];
LBJ$constraint$context[0] = d;
LBJ$constraint$context[1] = current;
LBJ$constraint$context[2] = previousMentions;
FirstOrderConstraint LBJ2$constraint$result$0 = null;
{
FirstOrderConstraint LBJ2$constraint$result$1 = null;
{
FirstOrderConstraint LBJ2$constraint$result$2 = null;
{
FirstOrderConstraint LBJ2$constraint$result$3 = null;
{
FirstOrderConstraint LBJ2$constraint$result$4 = null;
{
FirstOrderConstraint LBJ2$constraint$result$5 = null;
{
FirstOrderConstraint LBJ2$constraint$result$6 = null;
{
FirstOrderConstraint LBJ2$constraint$result$7 = null;
{
FirstOrderConstraint LBJ2$constraint$result$8 = null;
LBJ2$constraint$result$8 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("he")));
FirstOrderConstraint LBJ2$constraint$result$9 = null;
LBJ2$constraint$result$9 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("him")));
LBJ2$constraint$result$7 = new FirstOrderDisjunction(LBJ2$constraint$result$8, LBJ2$constraint$result$9);
}
FirstOrderConstraint LBJ2$constraint$result$10 = null;
LBJ2$constraint$result$10 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("himself")));
LBJ2$constraint$result$6 = new FirstOrderDisjunction(LBJ2$constraint$result$7, LBJ2$constraint$result$10);
}
FirstOrderConstraint LBJ2$constraint$result$11 = null;
LBJ2$constraint$result$11 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("his")));
LBJ2$constraint$result$5 = new FirstOrderDisjunction(LBJ2$constraint$result$6, LBJ2$constraint$result$11);
}
FirstOrderConstraint LBJ2$constraint$result$12 = null;
LBJ2$constraint$result$12 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("she")));
LBJ2$constraint$result$4 = new FirstOrderDisjunction(LBJ2$constraint$result$5, LBJ2$constraint$result$12);
}
FirstOrderConstraint LBJ2$constraint$result$13 = null;
LBJ2$constraint$result$13 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("her")));
LBJ2$constraint$result$3 = new FirstOrderDisjunction(LBJ2$constraint$result$4, LBJ2$constraint$result$13);
}
FirstOrderConstraint LBJ2$constraint$result$14 = null;
LBJ2$constraint$result$14 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("herself")));
LBJ2$constraint$result$2 = new FirstOrderDisjunction(LBJ2$constraint$result$3, LBJ2$constraint$result$14);
}
FirstOrderConstraint LBJ2$constraint$result$15 = null;
LBJ2$constraint$result$15 = new FirstOrderConstant(("" + (current.getHead().toLowerCase())).equals("" + ("hers")));
LBJ2$constraint$result$1 = new FirstOrderDisjunction(LBJ2$constraint$result$2, LBJ2$constraint$result$15);
}
FirstOrderConstraint LBJ2$constraint$result$16 = null;
{
FirstOrderConstraint LBJ2$constraint$result$17 = null;
LBJ2$constraint$result$17 = new FirstOrderConstant(!("" + (previousMentions.size())).equals("" + (0)));
FirstOrderConstraint LBJ2$constraint$result$18 = null;
{
FirstOrderConstraint LBJ2$constraint$result$19 = null;
{
EqualityArgumentReplacer LBJ$EAR =
new EqualityArgumentReplacer(LBJ$constraint$context, true)
{
public Object getLeftObject()
{
Document d = (Document) context[0];
Document.Mention current = (Document.Mention) context[1];
Document.Mention m = (Document.Mention) quantificationVariables.get(0);
return d.getMentionPair(m, current);
}
};
LBJ2$constraint$result$19 = new FirstOrderEqualityWithValue(true, new FirstOrderVariable(__DataCoref, null), "" + (true), LBJ$EAR);
}
LBJ2$constraint$result$18 = new ExistentialQuantifier("m", previousMentions, LBJ2$constraint$result$19);
}
LBJ2$constraint$result$16 = new FirstOrderImplication(LBJ2$constraint$result$17, LBJ2$constraint$result$18);
}
LBJ2$constraint$result$0 = new FirstOrderImplication(LBJ2$constraint$result$1, LBJ2$constraint$result$16);
}
__result = new FirstOrderConjunction(__result, LBJ2$constraint$result$0);
}
previous = current;
}
}
return __result;
}
}
| [
"[email protected]"
] | |
4d9bfa6a4d1e2d89f8c8b259f9c96a948e82e255 | 59e465493e16822e697236f26ca156f4b7c99dae | /cobra2D-engine/src/main/java/de/schuette/cobra2D/ressource/Animation.java | f6773272c01f104775ec05c6273e88b0eb3586ac | [] | no_license | schuettec/2d-engine | c735132a7f65091c570790fdf57813c3df75ded8 | 6975c046d2be2b0a71dd9254b3bb94d6cc00a0b7 | refs/heads/master | 2022-12-20T15:44:09.499454 | 2022-12-07T12:55:00 | 2022-12-07T12:55:00 | 151,825,266 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,928 | java | package de.schuette.cobra2D.ressource;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.RGBImageFilter;
import java.awt.image.VolatileImage;
import de.schuette.cobra2D.rendering.RenderToolkit;
public class Animation {
private final int width, height;
private final int cols, rows;
private transient VolatileImage image;
private Rectangle rect;
private int currentIndex = 0;
protected RGBImageFilter filter;
public Animation(final VolatileImage image, final int width,
final int height) {
this.width = width;
this.height = height;
this.image = image;
this.rect = new Rectangle(new Dimension(width, height));
this.cols = (int) Math.round((image.getWidth() / (double) width));
this.rows = (int) Math.round((image.getHeight() / (double) height));
}
private void setIndex(final int index) throws IllegalArgumentException {
if (index < 0 || index >= (this.getPictureCount())) {
throw new IllegalArgumentException(
"Picture-Index out of bounds. \n Min-Index: 0 \n Max-Index: "
+ (this.getPictureCount() - 1) + "\n"
+ "Requested Index: " + index);
}
this.rect = this.calculateRect(index);
this.currentIndex = index;
}
protected Rectangle calculateRect(final int index) {
final int x = (index % this.cols) * this.width;
final int y = (index / this.cols) * this.height;
return new Rectangle(x, y, this.width, this.height);
}
public int getIndex() {
return this.currentIndex;
}
public int getPictureCount() {
return (this.cols * this.rows);
}
/**
* Returns the current image drawn on a new created backbuffer image.
*
* @param index
* The index of the requested frame of the animation.
* @return Returns a new VolatileImage with the requested frame.
*/
public VolatileImage getImage(final int index) {
this.setIndex(index);
final VolatileImage tmpImage = RenderToolkit.createVolatileImage(
this.width, this.height);
final Graphics2D g = (Graphics2D) tmpImage.getGraphics();
g.drawImage(this.image, 0, 0, this.width, this.height, this.rect.x,
this.rect.y, this.rect.x + this.width, this.rect.y
+ this.height, null);
if (this.filter != null) {
return RenderToolkit.convertSpriteToTransparentSprite(tmpImage,
this.filter);
}
return tmpImage;
}
public RGBImageFilter getFilter() {
return this.filter;
}
public void setFilter(final RGBImageFilter filter) {
this.filter = filter;
}
public int getWidth() {
return this.width;
}
public int getHeight() {
return this.height;
}
public int getCols() {
return this.cols;
}
public int getRows() {
return this.rows;
}
public Rectangle getRect() {
return this.rect;
}
public int getCurrentIndex() {
return this.currentIndex;
}
}
| [
"[email protected]"
] | |
208cb5addff1ac29329d06e3a3fc9d74f7f5d1ef | 20174f41be533ddb2fd26b24f5fa50e8a0cc5f40 | /authentication/authentication-repository/src/main/java/org/deschutter/authentication/user/UserRepository.java | e9b5d4f2581bc012dc412e6b19a53eb57eb54d07 | [] | no_license | kovpey/Larp | 159fc5d6f1782a0ca4410f0dc8d2df4eea4e905e | 19ae7a6c23295c969d4d10be1742f1678d091d6b | refs/heads/master | 2021-05-26T22:32:58.346045 | 2014-03-05T14:03:52 | 2014-03-05T14:03:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 159 | java | package org.deschutter.authentication.user;
public interface UserRepository {
public User findByUsernameAndPassword(String username, String password);
}
| [
"Berten"
] | Berten |
a11b291ec0c1ffddcdf0e22f418dee143c02827d | 3013a056f27c6b844c02ec53f3572e43953596cc | /cashMachine/src/main/java/controller/command/highCashier/CancelCheck.java | 4576d434aa3803bd8cbf76f2fb71c5f9d1a88ab5 | [] | no_license | potOfMyCode/finalProject | f551f79da8c6af9998c69aaf1a9c27fe9487ba15 | 21599c482c7dae92b1b6bdce196595c19e1d6f97 | refs/heads/master | 2020-05-16T07:16:22.438990 | 2019-04-23T06:49:20 | 2019-04-23T06:49:20 | 182,806,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 953 | java | package controller.command.highCashier;
import controller.command.Command;
import model.service.highCashierService.HighCashierService;
import org.apache.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
public class CancelCheck implements Command {
private final static Logger LOGGER = Logger.getLogger(CancelCheck.class.getSimpleName());
private HighCashierService highCashierService;
public CancelCheck(HighCashierService highCashierService) {
this.highCashierService = highCashierService;
}
@Override
public String execute(HttpServletRequest request) {
String id = request.getParameter("idCheck");
highCashierService.cancelCheck(Integer.valueOf(id));
LOGGER.info("Check with id: " + id + " successfully deleted!");
request.getServletContext().setAttribute("checks", highCashierService.getAllChecks());
return "/WEB-INF/highCashier/highCashierBase.jsp";
}
}
| [
"[email protected]"
] | |
5295403a1d98130a9141c525e969990995ae3779 | e7bc73cdfaef9307790c59f5fbefa5669cd665fe | /hw3/hw3sol/SortedComparableListLauncher.java | e417123d8ada11cdc89e35f49c33d70b69aa93cb | [] | no_license | amyncarol/CS61B | e39e378f5d2e9f2ada3ae4e5e5ba774338b484b9 | b4397304b28d4f432a827244c5468db664794293 | refs/heads/master | 2020-03-09T23:09:09.813750 | 2015-05-04T07:33:05 | 2015-05-04T07:33:05 | 129,052,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 283 | java | public class SortedComparableListLauncher{
public static void main(String[] args){
SortedComparableList L = new SortedComparableList();
L.insert(-1);
L.insert(2);
L.insert(3);
L.insert(3);
L.insert(-1);
L.insert(1.5);
System.out.println(L.toString());
}
} | [
"[email protected]"
] | |
fb45717cb5b2ef0b6cd66e8146165c143ce9c707 | 6ee714a678762d4562bc481586c5953e61b34cb0 | /src/main/java/com/sjsu/cmpe/sstreet/webserver/utils/SensorDataByClusterQuery.java | 1b6dd9f6ee3b34ca154ce34ce854ddcafbf973ce | [] | no_license | aliaksei-matsarski/web-server | b38c6d5a8ce37636e45b72e656f92757a53789b7 | f7b47a9caf092b7afd4911486933143d64c9fedc | refs/heads/master | 2020-04-03T18:10:23.982992 | 2018-12-09T04:25:01 | 2018-12-09T04:25:01 | 155,473,686 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package com.sjsu.cmpe.sstreet.webserver.utils;
import com.sjsu.cmpe.sstreet.webserver.model.SensorType;
public class SensorDataByClusterQuery extends SensorDataSearchQuery {
private Integer clusterId;
public SensorDataByClusterQuery(){
super();
}
public SensorDataByClusterQuery(Integer clusterId) {
super();
this.clusterId = clusterId;
}
public SensorDataByClusterQuery(
Integer maxResult,
String continuation,
Integer clusterId
) {
super(maxResult, continuation);
this.clusterId = clusterId;
}
public Integer getClusterId() {
return clusterId;
}
public void setClusterId(Integer clusterId) {
this.clusterId = clusterId;
}
}
| [
"[email protected]"
] | |
b26a99d445a77eaecf4431b2ae5af9c2e83d35b4 | 37c01a0727825d52d81f9e17f853967e304a1046 | /src/com/jeecms/bbs/entity/base/BaseBbsConfig.java | 322e06c79009fa983075daeac5b75dccddd51d11 | [] | no_license | cnywb/jeecms | a86bd027a8e3550daf4ff5eaaea9113bbd9c3936 | 93c86a863db61d45bfb4b05822ca0d6774eca697 | refs/heads/master | 2020-04-08T02:26:24.359947 | 2018-11-24T13:20:58 | 2018-11-24T13:20:58 | 158,935,834 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,456 | java | package com.jeecms.bbs.entity.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the BBS_CONFIG table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="BBS_CONFIG"
*/
public abstract class BaseBbsConfig implements Serializable {
public static String REF = "BbsConfig";
public static String PROP_AVATAR_WIDTH = "avatarWidth";
public static String PROP_POST_MAX = "postMax";
public static String PROP_AVATAR_HEIGHT = "avatarHeight";
public static String PROP_SITE = "site";
public static String PROP_DEF_AVATAR = "defAvatar";
public static String PROP_REGISTER_GROUP = "registerGroup";
public static String PROP_TOPIC_TOTAL = "topicTotal";
public static String PROP_LAST_USER = "lastUser";
public static String PROP_REGISTER_RULE = "registerRule";
public static String PROP_DEFAULT_GROUP = "defaultGroup";
public static String PROP_POST_MAX_DATE = "postMaxDate";
public static String PROP_KEYWORDS = "keywords";
public static String PROP_POST_YESTERDAY = "postYesterday";
public static String PROP_AUTO_REGISTER = "autoRegister";
public static String PROP_REGISTER_STATUS = "registerStatus";
public static String PROP_POST_TOTAL = "postTotal";
public static String PROP_TOPIC_COUNT_PER_PAGE = "topicCountPerPage";
public static String PROP_DESCRIPTION = "description";
public static String PROP_TOPIC_HOT_COUNT = "topicHotCount";
public static String PROP_USER_TOTAL = "userTotal";
public static String PROP_POST_COUNT_PER_PAGE = "postCountPerPage";
public static String PROP_ID = "id";
public static String PROP_POST_TODAY = "postToday";
// constructors
public BaseBbsConfig () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseBbsConfig (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseBbsConfig (
java.lang.Integer id,
com.jeecms.bbs.entity.BbsUser lastUser,
com.jeecms.bbs.entity.BbsUserGroup registerGroup,
com.jeecms.bbs.entity.BbsUserGroup defaultGroup,
java.lang.String defAvatar,
java.lang.Integer avatarWidth,
java.lang.Integer avatarHeight,
java.lang.Integer topicCountPerPage,
java.lang.Integer postCountPerPage,
java.lang.String keywords,
java.lang.String description,
java.lang.Short registerStatus,
java.lang.Integer topicHotCount,
java.lang.Integer postToday,
java.lang.Integer postYesterday,
java.lang.Integer postMax,
java.util.Date postMaxDate,
java.lang.Integer topicTotal,
java.lang.Integer postTotal,
java.lang.Integer userTotal) {
this.setId(id);
this.setLastUser(lastUser);
this.setRegisterGroup(registerGroup);
this.setDefaultGroup(defaultGroup);
this.setDefAvatar(defAvatar);
this.setAvatarWidth(avatarWidth);
this.setAvatarHeight(avatarHeight);
this.setTopicCountPerPage(topicCountPerPage);
this.setPostCountPerPage(postCountPerPage);
this.setKeywords(keywords);
this.setDescription(description);
this.setRegisterStatus(registerStatus);
this.setTopicHotCount(topicHotCount);
this.setPostToday(postToday);
this.setPostYesterday(postYesterday);
this.setPostMax(postMax);
this.setPostMaxDate(postMaxDate);
this.setTopicTotal(topicTotal);
this.setPostTotal(postTotal);
this.setUserTotal(userTotal);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.String defAvatar;
private java.lang.Integer avatarWidth;
private java.lang.Integer avatarHeight;
private java.lang.Integer topicCountPerPage;
private java.lang.Integer postCountPerPage;
private java.lang.String keywords;
private java.lang.String description;
private java.lang.Short registerStatus;
private java.lang.String registerRule;
private java.lang.Integer topicHotCount;
private java.lang.Integer postToday;
private java.lang.Integer postYesterday;
private java.lang.Integer postMax;
private java.util.Date postMaxDate;
private java.lang.Integer topicTotal;
private java.lang.Integer postTotal;
private java.lang.Integer userTotal;
private java.lang.Boolean autoRegister;
private java.lang.Boolean emailValidate;
// one to one
private com.jeecms.cms.entity.main.CmsSite site;
// many to one
private com.jeecms.bbs.entity.BbsUser lastUser;
private com.jeecms.bbs.entity.BbsUserGroup registerGroup;
private com.jeecms.bbs.entity.BbsUserGroup defaultGroup;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="foreign"
* column="CONFIG_ID"
*/
public java.lang.Integer getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: DEF_AVATAR
*/
public java.lang.String getDefAvatar () {
return defAvatar;
}
/**
* Set the value related to the column: DEF_AVATAR
* @param defAvatar the DEF_AVATAR value
*/
public void setDefAvatar (java.lang.String defAvatar) {
this.defAvatar = defAvatar;
}
/**
* Return the value associated with the column: AVATAR_WIDTH
*/
public java.lang.Integer getAvatarWidth () {
return avatarWidth;
}
/**
* Set the value related to the column: AVATAR_WIDTH
* @param avatarWidth the AVATAR_WIDTH value
*/
public void setAvatarWidth (java.lang.Integer avatarWidth) {
this.avatarWidth = avatarWidth;
}
/**
* Return the value associated with the column: AVATAR_HEIGHT
*/
public java.lang.Integer getAvatarHeight () {
return avatarHeight;
}
/**
* Set the value related to the column: AVATAR_HEIGHT
* @param avatarHeight the AVATAR_HEIGHT value
*/
public void setAvatarHeight (java.lang.Integer avatarHeight) {
this.avatarHeight = avatarHeight;
}
/**
* Return the value associated with the column: TOPIC_COUNT_PER_PAGE
*/
public java.lang.Integer getTopicCountPerPage () {
return topicCountPerPage;
}
/**
* Set the value related to the column: TOPIC_COUNT_PER_PAGE
* @param topicCountPerPage the TOPIC_COUNT_PER_PAGE value
*/
public void setTopicCountPerPage (java.lang.Integer topicCountPerPage) {
this.topicCountPerPage = topicCountPerPage;
}
/**
* Return the value associated with the column: POST_COUNT_PER_PAGE
*/
public java.lang.Integer getPostCountPerPage () {
return postCountPerPage;
}
/**
* Set the value related to the column: POST_COUNT_PER_PAGE
* @param postCountPerPage the POST_COUNT_PER_PAGE value
*/
public void setPostCountPerPage (java.lang.Integer postCountPerPage) {
this.postCountPerPage = postCountPerPage;
}
/**
* Return the value associated with the column: KEYWORDS
*/
public java.lang.String getKeywords () {
return keywords;
}
/**
* Set the value related to the column: KEYWORDS
* @param keywords the KEYWORDS value
*/
public void setKeywords (java.lang.String keywords) {
this.keywords = keywords;
}
/**
* Return the value associated with the column: DESCRIPTION
*/
public java.lang.String getDescription () {
return description;
}
/**
* Set the value related to the column: DESCRIPTION
* @param description the DESCRIPTION value
*/
public void setDescription (java.lang.String description) {
this.description = description;
}
/**
* Return the value associated with the column: REGISTER_STATUS
*/
public java.lang.Short getRegisterStatus () {
return registerStatus;
}
/**
* Set the value related to the column: REGISTER_STATUS
* @param registerStatus the REGISTER_STATUS value
*/
public void setRegisterStatus (java.lang.Short registerStatus) {
this.registerStatus = registerStatus;
}
/**
* Return the value associated with the column: REGISTER_RULE
*/
public java.lang.String getRegisterRule () {
return registerRule;
}
/**
* Set the value related to the column: REGISTER_RULE
* @param registerRule the REGISTER_RULE value
*/
public void setRegisterRule (java.lang.String registerRule) {
this.registerRule = registerRule;
}
/**
* Return the value associated with the column: TOPIC_HOT_COUNT
*/
public java.lang.Integer getTopicHotCount () {
return topicHotCount;
}
/**
* Set the value related to the column: TOPIC_HOT_COUNT
* @param topicHotCount the TOPIC_HOT_COUNT value
*/
public void setTopicHotCount (java.lang.Integer topicHotCount) {
this.topicHotCount = topicHotCount;
}
/**
* Return the value associated with the column: CACHE_POST_TODAY
*/
public java.lang.Integer getPostToday () {
return postToday;
}
/**
* Set the value related to the column: CACHE_POST_TODAY
* @param postToday the CACHE_POST_TODAY value
*/
public void setPostToday (java.lang.Integer postToday) {
this.postToday = postToday;
}
/**
* Return the value associated with the column: CACHE_POST_YESTERDAY
*/
public java.lang.Integer getPostYesterday () {
return postYesterday;
}
/**
* Set the value related to the column: CACHE_POST_YESTERDAY
* @param postYesterday the CACHE_POST_YESTERDAY value
*/
public void setPostYesterday (java.lang.Integer postYesterday) {
this.postYesterday = postYesterday;
}
/**
* Return the value associated with the column: CACHE_POST_MAX
*/
public java.lang.Integer getPostMax () {
return postMax;
}
/**
* Set the value related to the column: CACHE_POST_MAX
* @param postMax the CACHE_POST_MAX value
*/
public void setPostMax (java.lang.Integer postMax) {
this.postMax = postMax;
}
/**
* Return the value associated with the column: CACHE_POST_MAX_DATE
*/
public java.util.Date getPostMaxDate () {
return postMaxDate;
}
/**
* Set the value related to the column: CACHE_POST_MAX_DATE
* @param postMaxDate the CACHE_POST_MAX_DATE value
*/
public void setPostMaxDate (java.util.Date postMaxDate) {
this.postMaxDate = postMaxDate;
}
/**
* Return the value associated with the column: CACHE_TOPIC_TOTAL
*/
public java.lang.Integer getTopicTotal () {
return topicTotal;
}
/**
* Set the value related to the column: CACHE_TOPIC_TOTAL
* @param topicTotal the CACHE_TOPIC_TOTAL value
*/
public void setTopicTotal (java.lang.Integer topicTotal) {
this.topicTotal = topicTotal;
}
/**
* Return the value associated with the column: CACHE_POST_TOTAL
*/
public java.lang.Integer getPostTotal () {
return postTotal;
}
/**
* Set the value related to the column: CACHE_POST_TOTAL
* @param postTotal the CACHE_POST_TOTAL value
*/
public void setPostTotal (java.lang.Integer postTotal) {
this.postTotal = postTotal;
}
/**
* Return the value associated with the column: CACHE_USER_TOTAL
*/
public java.lang.Integer getUserTotal () {
return userTotal;
}
/**
* Set the value related to the column: CACHE_USER_TOTAL
* @param userTotal the CACHE_USER_TOTAL value
*/
public void setUserTotal (java.lang.Integer userTotal) {
this.userTotal = userTotal;
}
/**
* Return the value associated with the column: AUTO_REGISTER
*/
public java.lang.Boolean getAutoRegister () {
return autoRegister;
}
/**
* Set the value related to the column: AUTO_REGISTER
* @param autoRegister the AUTO_REGISTER value
*/
public void setAutoRegister (java.lang.Boolean autoRegister) {
this.autoRegister = autoRegister;
}
public java.lang.Boolean getEmailValidate() {
return emailValidate;
}
public void setEmailValidate(java.lang.Boolean emailValidate) {
this.emailValidate = emailValidate;
}
/**
* Return the value associated with the column: site
*/
public com.jeecms.cms.entity.main.CmsSite getSite () {
return site;
}
/**
* Set the value related to the column: site
* @param site the site value
*/
public void setSite (com.jeecms.cms.entity.main.CmsSite site) {
this.site = site;
}
/**
* Return the value associated with the column: last_user_id
*/
public com.jeecms.bbs.entity.BbsUser getLastUser () {
return lastUser;
}
/**
* Set the value related to the column: last_user_id
* @param lastUser the last_user_id value
*/
public void setLastUser (com.jeecms.bbs.entity.BbsUser lastUser) {
this.lastUser = lastUser;
}
/**
* Return the value associated with the column: REGISTER_GROUP_ID
*/
public com.jeecms.bbs.entity.BbsUserGroup getRegisterGroup () {
return registerGroup;
}
/**
* Set the value related to the column: REGISTER_GROUP_ID
* @param registerGroup the REGISTER_GROUP_ID value
*/
public void setRegisterGroup (com.jeecms.bbs.entity.BbsUserGroup registerGroup) {
this.registerGroup = registerGroup;
}
/**
* Return the value associated with the column: DEFAULT_GROUP_ID
*/
public com.jeecms.bbs.entity.BbsUserGroup getDefaultGroup () {
return defaultGroup;
}
/**
* Set the value related to the column: DEFAULT_GROUP_ID
* @param defaultGroup the DEFAULT_GROUP_ID value
*/
public void setDefaultGroup (com.jeecms.bbs.entity.BbsUserGroup defaultGroup) {
this.defaultGroup = defaultGroup;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.jeecms.bbs.entity.BbsConfig)) return false;
else {
com.jeecms.bbs.entity.BbsConfig bbsConfig = (com.jeecms.bbs.entity.BbsConfig) obj;
if (null == this.getId() || null == bbsConfig.getId()) return false;
else return (this.getId().equals(bbsConfig.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
} | [
"[email protected]"
] | |
bb30786c000a3fb73215414c2a72793b5711d5fc | ae2edb8565cc9753989c46e5b16ec620568c2dde | /app/src/main/java/cn/deepkolos/simplemusic3/Widget/Layout/ClipFrameLayout.java | a3acd746dd47419fd099b9ee5553df835e250fc1 | [] | no_license | glucin/mymusic | b9ba99f83d086e5fb0fe98c8bd77f1f15aca2d12 | 807e8fa391c13200846ed2bc1d37f9563aebce5d | refs/heads/master | 2020-04-17T15:00:05.336400 | 2019-01-20T16:05:44 | 2019-01-20T16:05:44 | 166,681,072 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,788 | java | package cn.deepkolos.simplemusic3.Widget.Layout;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import cn.deepkolos.simplemusic3.R;
import cn.deepkolos.simplemusic3.Utils.UnitHelper;
public class ClipFrameLayout extends FrameLayout {
private int topLeftRadius = 0;
private int topRightRadius = 0;
private int bottomLeftRadius = 0;
private int bottomRightRadius = 0;
private Path path = new Path();
private RectF topLeftRect = new RectF();
private RectF topRightRect = new RectF();
private RectF bottomLeftRect = new RectF();
private RectF bottomRightRect = new RectF();
private int insetTop = 0;
private int insetLeft = 0;
private int insetRight = 0;
private int insetBottom = 0;
Paint paint = new Paint();
public ClipFrameLayout(Context context) {
super(context);
init();
}
public ClipFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.ClipLayoutAttrs);
int radius = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_radius, -1);
if (radius != -1) {
topLeftRadius = radius;
topRightRadius = radius;
bottomLeftRadius = radius;
bottomRightRadius = radius;
}
int _topLeftRadius = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_topLeftRadius, -1);
if (_topLeftRadius != -1) topLeftRadius = _topLeftRadius;
int _topRightRadius = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_topRightRadius, -1);
if (_topRightRadius != -1) topRightRadius = _topRightRadius;
int _bottomRightRadius = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_bottomRightRadius, -1);
if (_bottomRightRadius != -1) bottomRightRadius = _bottomRightRadius;
int _bottomLeftRadius = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_bottomLeftRadius, -1);
if (_bottomLeftRadius != -1) topRightRadius = _bottomLeftRadius;
int _inset = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_inset, -1);
if (_inset != -1) {
insetTop = _inset;
insetLeft = _inset;
insetRight = _inset;
insetBottom = _inset;
}
int _insetTop = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_topInset, -1);
if (_insetTop != -1) insetTop = _insetTop;
int _insetBottom = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_bottomInset, -1);
if (_insetBottom != -1) insetBottom = _insetBottom;
int _insetLeft = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_leftInset, -1);
if (_insetLeft != -1) insetLeft = _insetLeft;
int _insetRight = ta.getDimensionPixelOffset(R.styleable.ClipLayoutAttrs_rightInset, -1);
if (_insetRight != -1) insetRight = _insetRight;
ta.recycle();
init();
}
private void init() {
setWillNotDraw(false);
}
public void setRadius (int all) {
topLeftRadius = all;
topRightRadius = all;
bottomLeftRadius = all;
bottomRightRadius = all;
postInvalidate();
}
public void setRadius (int topLeft, int topRight, int bottomLeft, int bottomRight) {
topLeftRadius = topLeft;
topRightRadius = topRight;
bottomLeftRadius = bottomLeft;
bottomRightRadius = bottomRight;
postInvalidate();
}
public void setInset (int all) {
insetTop = all;
insetLeft = all;
insetRight = all;
insetBottom = all;
postInvalidate();
}
public void setInset (int left, int top, int right, int bottom) {
insetTop = top;
insetLeft = left;
insetRight = right;
insetBottom = bottom;
postInvalidate();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// init arc rect
int height = getHeight();
int width = getWidth();
topLeftRect.set(insetLeft, insetTop, topLeftRadius*2 + insetLeft, topLeftRadius*2 + insetTop);
topRightRect.set(width - (topRightRadius*2 + insetRight), insetTop, width - insetRight, topRightRadius*2+insetTop);
bottomLeftRect.set(insetLeft, height - (bottomLeftRadius*2 + insetBottom), bottomLeftRadius*2 + insetLeft, height - insetBottom);
bottomRightRect.set(width - (bottomRightRadius*2 + insetRight), height - (bottomRightRadius*2 + insetBottom), width - insetRight, height - insetBottom);
// draw clip-path
path.moveTo(insetLeft, topLeftRadius+insetTop);
path.arcTo(topLeftRect, 180, 90, false);
path.lineTo(width - (topRightRadius + insetRight),insetTop);
path.arcTo(topRightRect, 270, 90, false);
path.lineTo(width - insetRight, height - (bottomRightRadius + insetBottom));
path.arcTo(bottomRightRect, 0, 90, false);
path.lineTo(bottomLeftRadius+insetLeft, height - insetBottom);
path.arcTo(bottomLeftRect, 90, 90, false);
path.lineTo(insetLeft, topLeftRadius+insetTop);
path.close();
paint.setColor(Color.BLACK);
paint.setStrokeWidth(UnitHelper.dpToPx(2));
paint.setStyle(Paint.Style.STROKE);
paint.setAntiAlias(true);
canvas.clipPath(path);
}
}
| [
"[email protected]"
] | |
314cc6a976b54d9ffc5241e9a8a0678a9b065801 | eca650e80b3ff57d6dd8aa2c911b729de466d001 | /KruskalsMSF/src/KruskalsMSF.java | 7ce1c10ed1a4d26145712275e77d7b96b2638214 | [] | no_license | yjean0624/CSE2221-2231 | 9bfc9451889128ca49fa37b33957774554a00f98 | 3d8172f436dd4d2455dbb932e0a3ab2a167ef374 | refs/heads/master | 2020-12-10T08:00:41.855456 | 2020-01-13T07:59:55 | 2020-01-13T07:59:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,421 | java | import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Scanner;
public class KruskalsMSF {
/**
* Edge class.
*
* @author Xingyue Zhao
*
*/
static class Edge {
int source;
int destination;
int weight;
public Edge(int source, int destination, int weight) {
this.source = source;
this.destination = destination;
this.weight = weight;
}
}
static class Graph {
int vertices;
ArrayList<Edge> edges = new ArrayList<>();
Graph(int vertices) {
this.vertices = vertices;
}
public void addE(int source, int destination, int weight) {
Edge temp = new Edge(source, destination, weight);
this.edges.add(temp);
}
public void kruskalMST() {
PriorityQueue<Edge> pq = new PriorityQueue<>(this.edges.size(),
Comparator.comparingInt(o -> o.weight));
for (int i = 0; i < this.edges.size(); i++) {
Edge temp = this.edges.get(i);
pq.add(temp);
}
int[] parent = this.makeSet(this.vertices);
ArrayList<Edge> mst = new ArrayList<>();
int temp = 0;
while (temp < this.vertices - 1) {
Edge e = pq.remove();
if (this.find(parent, e.source) != this.find(parent,
e.destination)) {
mst.add(e);
temp++;
this.union(parent, this.find(parent, e.source),
this.find(parent, e.destination));
}
}
for (int i = 0; i < mst.size(); i++) {
Edge e = mst.get(i);
System.out.println(
e.source + "," + e.destination + ":" + e.weight);
}
}
public int[] makeSet(int parent) {
int[] temp = new int[parent];
for (int i = 0; i < temp.length; i++) {
temp[i] = i;
}
return temp;
}
public int find(int[] parent, int vertex) {
int temp = vertex;
if (parent[vertex] != vertex) {
temp = this.find(parent, parent[vertex]);
}
return temp;
}
public void union(int[] parent, int x, int y) {
parent[this.find(parent, y)] = this.find(parent, x);
}
}
public static void main(String[] args) throws IOException {
File graphX = new File(
"C:\\Users\\yjean\\Desktop\\sampleGraphs\\10-20.txt");
Scanner graphXfile = new Scanner(graphX);
int number = Integer.parseInt(graphXfile.nextLine());
Graph graph = new Graph(number);
while (graphXfile.hasNextLine()) {
String temp = graphXfile.nextLine();
int source = Integer.parseInt(temp.substring(0, temp.indexOf(',')));
int destination = Integer.parseInt(
temp.substring(temp.indexOf(',') + 1, temp.indexOf(':')));
int weight = Integer
.parseInt(temp.substring(temp.indexOf(':') + 1));
graph.addE(source, destination, weight);
}
graph.kruskalMST();
}
}
| [
"[email protected]"
] | |
4412c2d031fbdae955357f3e05eecf8daca9eec8 | 6e69f74c34a3b3aedd323b2d78d796890ef9a8fd | /src/parseotglist/ParseOtgList.java | a31fa57624b2598c0c90ee7823a8a830c5e420d9 | [] | no_license | spidchenko/ParseOtgList | 8bc2f1615ad2d7dfb9dbdd1c78709d656e8d71e9 | 1903f100c3a60d83c7475e78b20a8cfb56455f90 | refs/heads/master | 2020-04-18T07:10:15.661690 | 2019-01-24T10:49:37 | 2019-01-24T10:49:37 | 167,351,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,735 | 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 parseotglist;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
/**
*
* @author spidchenko.d
*/
public class ParseOtgList {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
updateOTGDatabase("0552");
ubdateVillagesAndTgDatabase();
// Parser parser = new Parser("http://decentralization.gov.ua/areas/0552/gromadu");
// parser.setEncoding("UTF-8");
//
// NodeList nodeList = parser.parse(new HasAttributeFilter("title","Назва громади"));
//
// System.out.println(nodeList.toString());
}
static void updateOTGDatabase(String areaCode) throws IOException{ //0552 KS 0512 MK
DBConnection connection = new DBConnection();
System.setProperty("javax.net.ssl.trustStore", "c:/Users/spidchenko.d/Downloads/decentralizationgovua.jks");
Document doc = Jsoup.connect("https://decentralization.gov.ua/areas/"+areaCode+"/gromadu").get();
Elements otgTitleElements = doc.getElementsByAttributeValue("title","Назва громади");
//System.out.println(otgTitleElements.html());
Iterator itr = otgTitleElements.iterator();
Element e;
while(itr.hasNext()){
e = (Element)itr.next();
connection.setNewOTG(Integer.parseInt(e.attr("href").split("/")[2]), e.html());
}
}
static void ubdateVillagesAndTgDatabase() throws IOException{
DBConnection connection = new DBConnection();
System.setProperty("javax.net.ssl.trustStore", "c:/Users/spidchenko.d/Downloads/decentralizationgovua.jks");
ArrayList ids = connection.getOTGIds();
Iterator liTags = null, itr = ids.iterator();
Document doc;
Element divList, liElement;
int numElements, currentOTG;
while(itr.hasNext()){
currentOTG = (int)itr.next();
doc = Jsoup.connect("https://decentralization.gov.ua/gromada/"+currentOTG+"/composition").get();
divList = doc.getElementById("consist");
System.out.println(divList.html());
numElements = divList.getElementsByTag("ul").size();
System.out.println(currentOTG+"; Number of ul tags = "+numElements);
if (numElements > 1){ //OTG has TG
for(int i = 0; i < numElements; i++){
System.out.println(">>>>> "+divList.getElementsByTag("p").eq(i).text());
int newTgId = connection.setNewTG(currentOTG, divList.getElementsByTag("p").eq(i).text()); //DB
//System.out.println("> "+divList.getElementsByTag("ul").get(i).children().iterator());
liTags = divList.getElementsByTag("ul").get(i).children().iterator();
while(liTags.hasNext()){
String villageName = ((Element)liTags.next()).text().replace(",", "");
System.out.println("> "+villageName);
connection.setNewVillage(newTgId, currentOTG, villageName); //DB
}
}
} else{ //OTG has no TG, only Villages
try{
liTags = divList.getElementsByTag("ul").get(0).children().iterator();
while(liTags.hasNext()){
String villageName = ((Element)liTags.next()).text().replace(",", "");
System.out.println("> "+villageName);
connection.setNewVillage(0, currentOTG, villageName); //DB
}
}catch (java.lang.IndexOutOfBoundsException err){
System.out.println("OTG has no villages!");
}
}
// System.out.println(divList.getElementsByTag("p").text());
}
}
}
| [
"[email protected]"
] | |
52e7f05caeb53e655a05d7f7c89af2eecc645caf | d06577e8649397cc825813c4652765bc6bdf6594 | /src/AnisotropicDiffusion_.java | 3495dcb736e63d385e84154e6d94d8c990d20480 | [] | no_license | h1dden-da3m0n/bva-ue | 5a0019a55b28bcfb891be82f14bb69529c7e5fe3 | c4cbaf910c59c8010c820b4e297cbeb67ebb86b9 | refs/heads/master | 2020-05-19T15:56:52.949014 | 2019-05-20T17:08:42 | 2019-05-20T17:08:42 | 185,096,027 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,484 | java | import bva.util.ConvolutionFilter;
import bva.util.ImageJUtility;
import ij.IJ;
import ij.ImagePlus;
import ij.gui.GenericDialog;
import ij.plugin.filter.PlugInFilter;
import ij.process.ImageProcessor;
public class AnisotropicDiffusion_ implements PlugInFilter {
public int setup(String arg, ImagePlus imp) {
if (arg.equals("about")) {
showAbout();
return DONE;
}
return DOES_8G + DOES_STACKS + SUPPORTS_MASKING;
} //setup
public void run(ImageProcessor ip) {
byte[] pixels = (byte[]) ip.getPixels();
int width = ip.getWidth();
int height = ip.getHeight();
int[][] inDataArrInt = ImageJUtility.convertFrom1DByteArr(pixels, width, height);
double[][] inDataArrDouble = ImageJUtility.convertToDoubleArr2D(inDataArrInt, width, height);
double[][] imageData = ImageJUtility.convertToDoubleArr2D(inDataArrInt, width, height);
GenericDialog gd = new GenericDialog("Anisotropic Diffusion");
gd.addSlider("K:", 0, 100, 20, 1);
gd.addNumericField("Iter.:", 10, 0);
gd.addCheckbox("Show all Iter:", false);
gd.showDialog();
if (gd.wasCanceled()) {
return;
} //if
int k = (int) gd.getNextNumber();
int iter = (int) gd.getNextNumber();
boolean showIter = gd.getNextBoolean();
for (int i = 0; i < iter; ++i) {
// calc gradients
double[][] gN = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 0, 0}, {1, -1, 0}, {0, 0, 0}}, 1);
double[][] gNE = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 0, 0}, {0, -1, 0}, {1, 0, 0}}, 1);
double[][] gE = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 0, 0}, {0, -1, 0}, {0, 1, 0}}, 1);
double[][] gSE = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 0, 0}, {0, -1, 0}, {0, 0, 1}}, 1);
double[][] gS = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 0, 0}, {0, -1, 1}, {0, 0, 0}}, 1);
double[][] gSW = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 0, 1}, {0, -1, 0}, {0, 0, 0}}, 1);
double[][] gW = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{0, 1, 0}, {0, -1, 0}, {0, 0, 0}}, 1);
double[][] gNW = ConvolutionFilter.ConvolveDouble(
imageData, width, height, new double[][]{{1, 0, 0}, {0, -1, 0}, {0, 0, 0}}, 1);
// calc diffusion coefficient
double[][] cN = calcDiffCoeff(gN, width, height, k);
double[][] cNE = calcDiffCoeff(gNE, width, height, k);
double[][] cE = calcDiffCoeff(gE, width, height, k);
double[][] cSE = calcDiffCoeff(gSE, width, height, k);
double[][] cS = calcDiffCoeff(gS, width, height, k);
double[][] cSW = calcDiffCoeff(gSW, width, height, k);
double[][] cW = calcDiffCoeff(gW, width, height, k);
double[][] cNW = calcDiffCoeff(gNW, width, height, k);
for (int x = 0; x < width; ++x) {
for (int y = 0; y < height; ++y) {
// calculate delta
imageData[x][y] += (1.0 / 7.0) * (
gN[x][y] * cN[x][y] +
gNE[x][y] * cNE[x][y] * 0.7 +
gE[x][y] * cE[x][y] +
gSE[x][y] * cSE[x][y] * 0.7 +
gS[x][y] * cS[x][y] +
gSW[x][y] * cSW[x][y] * 0.7 +
gW[x][y] * cW[x][y] +
gNW[x][y] * cNW[x][y] * 0.7
);
}
}
if (showIter)
ImageJUtility.showNewImage(imageData, width, height,
"Anisotropic Diffusion [k=" + k + ", i=" + (i + 1) + "]");
}
if (!showIter)
ImageJUtility.showNewImage(imageData, width, height,
"Anisotropic Diffusion [k=" + k + ", i=" + iter + "]");
ImageJUtility.showNewImageChequerboard(3, width, height, imageData, inDataArrDouble);
} //run
void showAbout() {
IJ.showMessage("About AnisotropicDiffusion_...",
"this is a PluginFilter template\n");
} //showAbout
private double[][] calcDiffCoeff(double[][] nabla, int width, int height, int k) {
double[][] diffCoeff = new double[width][height];
for (int x = 0; x < width; ++x) {
for (int y = 0; y < height; ++y) {
diffCoeff[x][y] = Math.pow(Math.E, -(Math.pow(Math.abs(nabla[x][y]), 2) / (2 * (k * k))));
}
}
return diffCoeff;
}
} //class FilterTemplate_
| [
"[email protected]"
] | |
9277f282aa58c36d78e2724f37e3fde6382478f0 | 0cdf3e16b686a36eb2da820b821ba69f66e98868 | /Android/013. Google Translator/gen/buet/rafi/google_translator/R.java | 9efa50e2a10e0ca022d7454d7c4dfe72d229f71b | [] | no_license | ash018/AndroidClass | 62358443c9df7f9f437752995c53ee7bb03e254e | 0d5888c181e51900a27d42700d2c81e4b8f51e49 | refs/heads/master | 2020-04-20T07:34:54.205860 | 2019-03-02T08:02:14 | 2019-03-02T08:02:14 | 168,714,602 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,461 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package buet.rafi.google_translator;
public final class R {
public static final class array {
public static final int languages=0x7f040000;
}
public static final class attr {
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int ScrollView1=0x7f060000;
public static final int from_language=0x7f060002;
public static final int original_text=0x7f060001;
public static final int retranslated_text=0x7f060005;
public static final int to_language=0x7f060003;
public static final int translated_text=0x7f060004;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f050000;
public static final int back_text=0x7f050004;
public static final int empty=0x7f050005;
public static final int from_text=0x7f050001;
public static final int original_text_hint=0x7f050002;
public static final int to_text=0x7f050003;
public static final int translate_error=0x7f050007;
public static final int translating=0x7f050006;
}
}
| [
"[email protected]"
] | |
17f4cb0d3b01f006f022679c46b44d786932e0b9 | a8a556ba82bc3b1793ee4df924d78e2e4563d782 | /StrategePattern/src/Cat.java | 6ba24e31de5f78b6dfe91e4ffa8f854a3a4624b9 | [] | no_license | icarus8050/DesignPattern-Practice | 0b7eb8236dc16306a668b81d2c2cae581b0cdb63 | ea7fa2bd2ac002af0343336b52696baa99bafb9f | refs/heads/master | 2020-05-03T00:55:42.631969 | 2019-05-04T08:53:03 | 2019-05-04T08:53:03 | 178,323,480 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 242 | java |
public class Cat extends Animal {
@Override
public void cry() {
// TODO Auto-generated method stub
System.out.println("Meow");
}
@Override
public void movePerform() {
// TODO Auto-generated method stub
getMove().move();
}
}
| [
"[email protected]"
] | |
88f07bf81b558ff3f7b6c3a02500354758b48dc6 | 8fd46e13a75d648767338a49753b88086ca7609b | /numberone-framework/src/main/java/com/numberone/framework/web/service/DictService.java | 34ddf5a1ebb04ae2077ac0d6d25e1abf73d5eb58 | [
"MIT"
] | permissive | wangrifeng/numberone-springboot | 14198b57430ec4d0f110baeb17662052fbb5ba3c | 82a6f913afe8034a88804d78160f4f22658d418b | refs/heads/master | 2022-09-14T23:38:42.468813 | 2020-02-21T03:58:40 | 2020-02-21T03:58:40 | 238,162,726 | 1 | 1 | MIT | 2022-09-01T23:19:50 | 2020-02-04T08:57:55 | Java | UTF-8 | Java | false | false | 1,089 | java | package com.numberone.framework.web.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.numberone.system.domain.SysDictData;
import com.numberone.system.service.ISysDictDataService;
/**
* numberone首创 html调用 thymeleaf 实现字典读取
*
* @author numberone
*/
@Service("dict")
public class DictService
{
@Autowired
private ISysDictDataService dictDataService;
/**
* 根据字典类型查询字典数据信息
*
* @param dictType 字典类型
* @return 参数键值
*/
public List<SysDictData> getType(String dictType)
{
return dictDataService.selectDictDataByType(dictType);
}
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public String getLabel(String dictType, String dictValue)
{
return dictDataService.selectDictLabel(dictType, dictValue);
}
}
| [
"[email protected]"
] | |
d63e5438c27a0eddb0dfa90e3b05d227814f0b93 | a7ad9e086a49d3bca1726e09a962cd69d0e2a0c6 | /src/main/java/com/example/demo/exceptions/AccountDoesNotExistException.java | 6f37a7d0808e1383177e3a099a9bac2f6192bb98 | [] | no_license | EkoGroszek/RestApiTest | 22f4193820aaa25570e132a6acc213610c2632f1 | 3b45f092c3aa1df7abd1b2d3cfdc39b0fb2c456a | refs/heads/master | 2020-06-15T21:46:04.157911 | 2019-07-30T09:58:04 | 2019-07-30T09:58:04 | 195,400,128 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 344 | java | package com.example.demo.exceptions;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(HttpStatus.NOT_FOUND)
public class AccountDoesNotExistException extends RuntimeException {
public AccountDoesNotExistException(String message) {
super(message);
}
}
| [
"[email protected]"
] | |
4d8a18266c9756e69a1e6a7fd6051eb5741b1101 | 509d496f1d4a37d1b56693d19cf96c528938baaa | /src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigStereotypeDeclaration.java | 8192729b0b85cc913997c65a361f09791563984e | [
"LicenseRef-scancode-other-permissive",
"BSD-3-Clause"
] | permissive | SofienBoutaib/argouml | bb65203a680b6d2c977c0bb96637914fd30584b1 | 71809598cfc3793b14809c51c975ac305e9bea6a | refs/heads/master | 2022-06-20T21:36:50.184555 | 2011-11-01T17:43:21 | 2011-11-01T17:43:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,698 | java | /* $Id: FigStereotypeDeclaration.java 17735 2010-01-04 14:49:32Z bobtarling $
*******************************************************************************
* Copyright (c) 2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Tom Morris
* Bob Tarling
*******************************************************************************
*
* Some portions of this file was previously release using the BSD License:
*/
// $Id: FigStereotypeDeclaration.java 17735 2010-01-04 14:49:32Z bobtarling $
// Copyright (c) 1996-2009 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.uml.diagram.static_structure.ui;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.util.HashSet;
import java.util.Set;
import java.util.Vector;
import javax.swing.Action;
import org.argouml.model.Model;
import org.argouml.ui.ArgoJMenu;
import org.argouml.uml.diagram.DiagramSettings;
import org.argouml.uml.diagram.ui.ActionAddNote;
import org.argouml.uml.diagram.ui.ActionCompartmentDisplay;
import org.argouml.uml.diagram.ui.ActionEdgesDisplay;
import org.argouml.uml.diagram.ui.CompartmentFigText;
import org.argouml.uml.diagram.ui.FigCompartmentBox;
import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewTagDefinition;
import org.tigris.gef.base.Selection;
/**
* Class to display a Stereotype declaration figure using
* Classifier box notation.<p>
*
* TODO: This is just a place-holder right now! - tfm
* This needs to show tags and constraints.
*/
public class FigStereotypeDeclaration extends FigCompartmentBox {
private void constructFigs(Rectangle bounds) {
// Put all the bits together, suppressing bounds calculations until
// we're all done for efficiency.
enableSizeChecking(false);
setSuppressCalcBounds(true);
getStereotypeFig().setKeyword("stereotype");
getStereotypeFig().setVisible(true);
/* The next line is needed so that we have the right dimension
* when drawing this Fig on the diagram by pressing down
* the mouse button, even before releasing the mouse button: */
getNameFig().setTopMargin(
getStereotypeFig().getMinimumSize().height);
addFig(getBigPort());
addFig(getNameFig());
// stereotype fig covers the name fig:
addFig(getStereotypeFig());
// TODO: Need named Tags and Constraints compartments here
// addFig(tagsFig);
// addFig(constraintsFig);
// Make all the parts match the main fig
setFilled(true);
setFillColor(FILL_COLOR);
setLineColor(LINE_COLOR);
setLineWidth(LINE_WIDTH);
/* Set the drop location in the case of D&D: */
if (bounds != null) {
setLocation(bounds.x, bounds.y);
}
setSuppressCalcBounds(false);
setBounds(getBounds());
}
/**
* Construct a Fig for a Stereotype on a diagram.
*
* @param owner owning stereotype
* @param bounds position and size
* @param settings render settings
*/
public FigStereotypeDeclaration(Object owner, Rectangle bounds,
DiagramSettings settings) {
super(owner, bounds, settings);
constructFigs(bounds);
enableSizeChecking(true);
}
@Override
public Selection makeSelection() {
return new SelectionStereotype(this);
}
/**
* Build a collection of menu items relevant for a right-click
* pop-up menu on a Stereotype.
* {@inheritDoc}
*/
@Override
public Vector getPopUpActions(MouseEvent me) {
Vector popUpActions = super.getPopUpActions(me);
// Add...
ArgoJMenu addMenu = new ArgoJMenu("menu.popup.add");
// TODO: Add Tags & Constraints
// addMenu.add(TargetManager.getInstance().getAddAttributeAction());
// addMenu.add(TargetManager.getInstance().getAddOperationAction());
addMenu.add(new ActionAddNote());
addMenu.add(new ActionNewTagDefinition());
addMenu.add(ActionEdgesDisplay.getShowEdges());
addMenu.add(ActionEdgesDisplay.getHideEdges());
popUpActions.add(popUpActions.size() - getPopupAddOffset(), addMenu);
// Show ...
ArgoJMenu showMenu = new ArgoJMenu("menu.popup.show");
for (Action action : ActionCompartmentDisplay.getActions()) {
showMenu.add(action);
}
if (showMenu.getComponentCount() > 0) {
popUpActions.add(popUpActions.size() - getPopupAddOffset(),
showMenu);
}
// Modifiers ...
popUpActions.add(popUpActions.size() - getPopupAddOffset(),
buildModifierPopUp(ABSTRACT | LEAF | ROOT));
// Visibility ...
popUpActions.add(popUpActions.size() - getPopupAddOffset(),
buildVisibilityPopUp());
return popUpActions;
}
@Override
protected CompartmentFigText unhighlight() {
CompartmentFigText fc = super.unhighlight();
if (fc == null) {
// TODO: Try unhighlighting our child compartments
// fc = unhighlight(getAttributesFig());
}
return fc;
}
@Override
protected void updateListeners(Object oldOwner, Object newOwner) {
Set<Object[]> listeners = new HashSet<Object[]>();
if (newOwner != null) {
listeners.add(new Object[] {newOwner, null});
// register for tagDefinitions:
for (Object td : Model.getFacade().getTagDefinitions(newOwner)) {
listeners.add(new Object[] {td,
new String[] {"name", "tagType", "multiplicity"}});
}
/* TODO: constraints, ... */
}
updateElementListeners(listeners);
}
}
| [
"[email protected]"
] | |
ceb0d5afb573c19720f71e8920134c264683b9d1 | aa328eeaeffdb492170f6a23feda55ae3cb838cd | /src/main/java/by/kotik/dao/AdminDAO.java | 5bc75c3d9de10257b98831f3fcde3a1af9004fd7 | [] | no_license | TemaGarfield/JWD_COFFEE-MACHINE | 26a33270fdfc4735c9b48910d86ebb90c440846a | be17371b33dc3a4a86122b1f9b2677d8508fb833 | refs/heads/main | 2023-07-13T08:07:16.204678 | 2021-08-15T23:05:10 | 2021-08-15T23:05:10 | 371,173,142 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package by.kotik.dao;
import by.kotik.bean.User;
import java.util.List;
public interface AdminDAO {
boolean deleteUser(int id) throws DAOException;
boolean updateUser(User user) throws DAOException;
List<User> getAllUsers() throws DAOException;
User getUserById(int id) throws DAOException;
boolean addUser(User user) throws DAOException;
}
| [
"[email protected]"
] | |
6690fed2885931ea6f356056fbfa6ed7cd5aa688 | ee4f9ef8ee8affb4b5bca6a99e3334673f4f8a1c | /app/src/main/java/com/example/travel_helper/Screen/checkListScreen/DTO/ToDo.java | 91caec37d9c8d61992fc8586bc263fbf0887f661 | [] | no_license | thaycacac/trumina | ba569dc88afb7a75954a058318bca4dc429773b2 | ff206f152ddcd262f0e83f0ae93615c99925a0a7 | refs/heads/master | 2020-11-24T11:54:04.704513 | 2019-12-30T02:30:23 | 2019-12-30T02:30:23 | 228,131,407 | 3 | 1 | null | 2020-08-09T04:07:56 | 2019-12-15T05:04:46 | Java | UTF-8 | Java | false | false | 715 | java | package com.example.travel_helper.Screen.checkListScreen.DTO;
import java.util.ArrayList;
import java.util.List;
public class ToDo {
private long id = -1;
private String name = "";
private String createdAt = "";
private List items = (List)(new ArrayList());
public final long getId() {
return this.id;
}
public final void setId(long var1) {
this.id = var1;
}
public final String getName() {
return this.name;
}
public final void setName( String name) {
this.name = name;
}
public final List getItems() {
return this.items;
}
public final void setItems( List items) {
this.items = items;
}
}
| [
"[email protected]"
] | |
fc6bf056cdebcf4f75b2a1fc653928c2dd525cad | 8eb059ab34cb24751e9d9a04d49c4cd5d53d20ce | /remoting2/src/main/java/org/jboss/ejb3/remoting/endpoint/client/RemoteContextDataInterceptor.java | b9c98fc3af51f6cf59722daedabbae6b4c2c3a3f | [] | no_license | wolfc/jboss-ejb3.obsolete | 0109c9f12100e0983333cb11803d18b073b0dbb5 | 4df1234e2f81312b3ff608f9965f9a6ad4191c92 | refs/heads/master | 2020-04-07T03:03:19.723537 | 2009-12-02T11:37:57 | 2009-12-02T11:37:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,616 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.ejb3.remoting.endpoint.client;
import javax.interceptor.InvocationContext;
import org.jboss.ejb3.sis.Interceptor;
/**
* @author <a href="mailto:[email protected]">Carlo de Wolf</a>
* @version $Revision: $
*/
public class RemoteContextDataInterceptor implements Interceptor
{
public Object invoke(InvocationContext context) throws Exception
{
RemoteContextData.setContextData(context.getContextData());
try
{
return context.proceed();
}
finally
{
RemoteContextData.cleanContextData();
}
}
}
| [
"[email protected]"
] | |
5edaf10bc1783b75d8a417b5d783223208bb0336 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/osmdroid_osmdroid/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/TileDownloader.java | 55463263b5e703d527bd4f6ecc9426718f31a2f2 | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,898 | java | // isComment
package org.osmdroid.tileprovider.modules;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.Log;
import org.osmdroid.api.IMapView;
import org.osmdroid.config.Configuration;
import org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants;
import org.osmdroid.tileprovider.tilesource.BitmapTileSourceBase;
import org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase;
import org.osmdroid.tileprovider.util.Counters;
import org.osmdroid.tileprovider.util.StreamUtils;
import org.osmdroid.util.MapTileIndex;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.Map;
/**
* isComment
*/
public class isClassOrIsInterface {
public Drawable isMethod(final long isParameter, final IFilesystemCache isParameter, final OnlineTileSourceBase isParameter) throws CantContinueException {
return isMethod(isNameExpr, isIntegerConstant, isNameExpr.isMethod(isNameExpr), isNameExpr, isNameExpr);
}
/**
* isComment
*/
public Drawable isMethod(final long isParameter, final int isParameter, final String isParameter, final IFilesystemCache isParameter, final OnlineTileSourceBase isParameter) throws CantContinueException {
// isComment
if (isNameExpr > isIntegerConstant) {
return null;
}
InputStream isVariable = null;
OutputStream isVariable = null;
HttpURLConnection isVariable = null;
ByteArrayInputStream isVariable = null;
ByteArrayOutputStream isVariable = null;
try {
final String isVariable = isNameExpr;
if (isNameExpr.isMethod().isMethod()) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr);
}
if (isNameExpr.isMethod(isNameExpr)) {
return null;
}
// isComment
if (isNameExpr.isMethod().isMethod() != null) {
isNameExpr = (HttpURLConnection) new URL(isNameExpr).isMethod(isNameExpr.isMethod().isMethod());
} else {
isNameExpr = (HttpURLConnection) new URL(isNameExpr).isMethod();
}
isNameExpr.isMethod(true);
isNameExpr.isMethod(isNameExpr.isMethod().isMethod(), isNameExpr.isMethod().isMethod());
for (final Map.Entry<String, String> isVariable : isNameExpr.isMethod().isMethod().isMethod()) {
isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr.isMethod());
}
isNameExpr.isMethod();
if (isNameExpr.isMethod() != isIntegerConstant) {
switch(isNameExpr.isMethod()) {
case isIntegerConstant:
case isIntegerConstant:
case isIntegerConstant:
case isIntegerConstant:
if (isNameExpr.isMethod().isMethod()) {
// isComment
String isVariable = isNameExpr.isMethod("isStringConstant");
if (isNameExpr != null) {
if (isNameExpr.isMethod("isStringConstant")) {
// isComment
URL isVariable = new URL(isNameExpr);
int isVariable = isNameExpr.isMethod();
boolean isVariable = isNameExpr.isMethod().isMethod("isStringConstant");
if (isNameExpr == -isIntegerConstant)
if (isNameExpr.isMethod().isMethod("isStringConstant")) {
isNameExpr = isIntegerConstant;
} else {
isNameExpr = isIntegerConstant;
}
isNameExpr = (isNameExpr ? "isStringConstant" : "isStringConstant") + isNameExpr.isMethod() + "isStringConstant" + isNameExpr + isNameExpr;
}
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant" + isNameExpr.isMethod() + "isStringConstant" + isNameExpr);
return isMethod(isNameExpr, isNameExpr + isIntegerConstant, isNameExpr, isNameExpr, isNameExpr);
}
break;
}
// isComment
default:
{
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant" + isNameExpr.isMethod());
if (isNameExpr.isMethod().isMethod()) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr);
}
isNameExpr.isFieldAccessExpr++;
// isComment
isNameExpr = isNameExpr.isMethod();
return null;
}
}
}
String isVariable = isNameExpr.isMethod("isStringConstant");
if (isNameExpr.isMethod().isMethod()) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr + "isStringConstant" + isNameExpr);
}
if (isNameExpr != null && !isNameExpr.isMethod().isMethod("isStringConstant")) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr + "isStringConstant" + isNameExpr);
}
isNameExpr = isNameExpr.isMethod();
isNameExpr = new ByteArrayOutputStream();
isNameExpr = new BufferedOutputStream(isNameExpr, isNameExpr.isFieldAccessExpr);
final long isVariable = isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr), isNameExpr.isMethod(isNameExpr.isFieldAccessExpr), isNameExpr.isMethod());
isNameExpr.isMethod(isNameExpr, isNameExpr);
isNameExpr.isMethod();
final byte[] isVariable = isNameExpr.isMethod();
isNameExpr = new ByteArrayInputStream(isNameExpr);
if (isNameExpr != null) {
isNameExpr.isMethod(isNameExpr, isNameExpr, isNameExpr, isNameExpr);
isNameExpr.isMethod();
}
return isNameExpr.isMethod(isNameExpr);
} catch (final UnknownHostException isParameter) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant" + isNameExpr);
isNameExpr.isFieldAccessExpr++;
} catch (final BitmapTileSourceBase.LowMemoryException isParameter) {
// isComment
isNameExpr.isFieldAccessExpr++;
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant" + isNameExpr);
throw new CantContinueException(isNameExpr);
} catch (final FileNotFoundException isParameter) {
isNameExpr.isFieldAccessExpr++;
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant" + isNameExpr);
} catch (final IOException isParameter) {
isNameExpr.isFieldAccessExpr++;
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant" + isNameExpr);
} catch (final Throwable isParameter) {
isNameExpr.isFieldAccessExpr++;
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr.isMethod(isNameExpr), isNameExpr);
} finally {
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
try {
isNameExpr.isMethod();
} catch (Exception isParameter) {
}
}
return null;
}
/**
* isComment
*/
public Long isMethod(final String isParameter) {
if (isNameExpr != null && isNameExpr.isMethod() > isIntegerConstant) {
try {
final Date isVariable = isNameExpr.isMethod().isMethod().isMethod(isNameExpr);
return isNameExpr.isMethod();
} catch (final Exception isParameter) {
if (isNameExpr.isMethod().isMethod())
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr, isNameExpr);
}
}
return null;
}
/**
* isComment
*/
public Long isMethod(final String isParameter) {
if (isNameExpr != null && isNameExpr.isMethod() > isIntegerConstant) {
try {
final String[] isVariable = isNameExpr.isMethod("isStringConstant");
final String isVariable = "isStringConstant";
for (final String isVariable : isNameExpr) {
final int isVariable = isNameExpr.isMethod(isNameExpr);
if (isNameExpr == isIntegerConstant) {
final String isVariable = isNameExpr.isMethod(isNameExpr.isMethod());
return isNameExpr.isMethod(isNameExpr);
}
}
} catch (final Exception isParameter) {
if (isNameExpr.isMethod().isMethod())
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant" + isNameExpr, isNameExpr);
}
}
return null;
}
/**
* isComment
*/
public long isMethod(final String isParameter, final String isParameter, final long isParameter) {
final Long isVariable = isNameExpr.isMethod().isMethod();
if (isNameExpr != null) {
return isNameExpr + isNameExpr;
}
final long isVariable = isNameExpr.isMethod().isMethod();
final Long isVariable = isMethod(isNameExpr);
if (isNameExpr != null) {
return isNameExpr + isNameExpr * isIntegerConstant + isNameExpr;
}
final Long isVariable = isMethod(isNameExpr);
if (isNameExpr != null) {
return isNameExpr + isNameExpr;
}
return isNameExpr + isNameExpr.isFieldAccessExpr + isNameExpr;
}
}
| [
"[email protected]"
] | |
384b1ead5b38e55c107f213cf2ae593bf68e9ff5 | 4c43b794fefdac56bbdaf4fe88890a113d7bf5e2 | /src/BackTrack/TabuleiroGUI.java | 7048da1d1533a20c6677fe703bf0558e5836fac0 | [] | no_license | LucasFranciscoCorreia/8-Rainhas-BackTrack | ec46ec00fdca6263dd430117b68042efb2310391 | 9ecd534cccaf102e01cc9611f54dda17a17a739d | refs/heads/master | 2021-01-22T17:57:06.487089 | 2017-08-18T17:46:34 | 2017-08-18T17:46:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,313 | java | package BackTrack;
import java.util.concurrent.atomic.AtomicBoolean;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
public class TabuleiroGUI extends Application{
public static void main(String[] args){
launch(args);
}
static AtomicBoolean bool;
AnchorPane pane;
static ToggleButton button;
static Linha linha;
static int frame = 1000;
@Override
public void start(Stage primaryStage) throws Exception {
pane = FXMLLoader.load(getClass().getResource("tab.fxml"));
button = new ToggleButton();
button.setLayoutX(411);
button.setLayoutY(510);
button.setText("Gerar");
linha = new Linha(0,0);
Tabuleiro.zerar();
ScreenManager.mainStage = primaryStage;
button.setOnAction(event -> {
bool.set(button.isSelected());
try {
if (bool.get()) {
Thread t = new Thread(new Runnable() {
boolean ok = true;
public void run() {
while (ok && button.isSelected()) {
try {
Thread.sleep(frame);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
Platform.runLater(() -> {
Linha l = TabuleiroGUI.linha;
if(ok && button.isSelected()){
Tabuleiro.Start(l);
}
if(Tabuleiro.rainhas > 7){
ok = false;
TabuleiroGUI.button.setSelected(false);
}
});
}
}
});
t.setDaemon(true);
t.start();
}
} catch (Exception ex) {
ex.printStackTrace();
}
});
pane.getChildren().add(button);
bool = new AtomicBoolean();
primaryStage.setScene(new Scene(pane));
primaryStage.setResizable(false);
primaryStage.show();
}
} | [
"[email protected]"
] | |
a7635e472378225ddc300ef005d06f777869bf5c | 50beb0622db9d8957d82c9b89530dbd187543a01 | /livestore/src/utils/DaoFactory.java | eb2a5dc21594115e5a0862c850a11d6659a57c42 | [] | no_license | ruochenxu92/Personal-practice | 6576fb299327f6617a2c46f2c408e7a719caf6a9 | a8996563adaf6ef57414c311b3b9561c284fbaae | refs/heads/master | 2021-05-28T10:24:15.404025 | 2014-07-09T05:06:24 | 2014-07-09T05:06:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 399 | java | package utils;
public class DaoFactory {
private static final DaoFactory factory = new DaoFactory();
private DaoFactory(){}
public static DaoFactory getInstance(){
return factory;
}
public <T> T createDao(String className,Class<T> clazz){
try {
T t = (T) Class.forName(className).newInstance();
return t;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
| [
"[email protected]"
] | |
193a61ede9c2d7ce32319743f508b4cdc3a0c2fc | 2fbd0602154935914fa4d6c45f6b10d42093c2bc | /src/models/Main.java | 04e9c34c5ee406d2f0751f568a99d39d0be47cfc | [] | no_license | nilsma/jobApplicationTracker | c2619f0c2d9d6e01ae7bb2e34cf17790dde45eb2 | 56af7f74e157ef3f547471f5599bfdd6ce2cd0c2 | refs/heads/master | 2021-01-02T09:20:24.216400 | 2014-01-31T11:47:47 | 2014-01-31T12:11:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 374 | java | package models;
import controllers.ApplicationController;
public class Main {
/**
* Launches the job application tracker, which is a an application to
* keep track of where one has applied for a job
* @param args
*/
@SuppressWarnings("unused")
public static void main(String[] args) {
ApplicationController application = new ApplicationController();
}
}
| [
"[email protected]"
] | |
84d9c80cd9238b271d26e79c91bc3e0c4d94b3d6 | 99db30cac9ad89c8fc8ffefa819135cebb01d7b1 | /GluePS/src/org/coppercore/component/IntegerProperty.java | 9613a55d6e4d21a5ffaf2dae3cf719817ea74ded | [] | no_license | METIS-Project/ILDE | b4bbf52c39fae24b7dafda7f0c3684cb3901f201 | f6e87f7f08dbe251a26ac78302bc30288142a9dd | refs/heads/master | 2021-01-01T16:30:40.596086 | 2015-02-06T16:45:17 | 2015-02-06T16:45:17 | 7,796,946 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,080 | java | /*
* CopperCore, an IMS-LD level C engine
* Copyright (C) 2003 Harrie Martens and Hubert Vogten
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (/license.txt); if not,
* write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* Contact information:
* Open University of the Netherlands
* Valkenburgerweg 177 Heerlen
* PO Box 2960 6401 DL Heerlen
* e-mail: [email protected] or
* [email protected]
*
*
* Open Universiteit Nederland, hereby disclaims all copyright interest
* in the program CopperCore written by
* Harrie Martens and Hubert Vogten
*
* prof.dr. Rob Koper,
* director of learning technologies research and development
*
*/
package org.coppercore.component;
import org.coppercore.business.Run;
import org.coppercore.business.Uol;
import org.coppercore.business.User;
import org.coppercore.datatypes.LDDataType;
import org.coppercore.datatypes.LDInteger;
import org.coppercore.exceptions.PropertyException;
import org.coppercore.exceptions.TypeCastException;
/**
* This Property represents an IMS LD integer Property. It extends
* ExplicitProperty adding type cast and restriction checking to the standard
* Property mechanism.
*
* @author Harrie Martens
* @author Hubert Vogten
* @version $Revision: 1.16 $, $Date: 2005/01/19 16:31:27 $
*/
public class IntegerProperty extends ExplicitProperty {
private static final long serialVersionUID = 42L;
/**
* Default constructor during run time.
*
* @param uol Uol the Uol in which this Property was declared
* @param run Run the Run in which this Property was referenced
* @param user User the User referring to this Property
* @param propId String the identifier of this Property as defined in the IMS
* LD instance
* @throws PropertyException when the constructor fails to create this
* Property
* @throws TypeCastException when the stored value can not be type casted to
* the type of the Property. This may occur especially after republication
* of the IMS LD instance.
*/
public IntegerProperty(Uol uol, Run run, User user, String propId) throws
PropertyException, TypeCastException {
super(uol, run, user, propId);
}
/**
* Returns the corresponding PropertyDefinition belonging to this component.
*
* @throws PropertyException when this operation fails
* @return PropertyDef the PropertyDefinition for this component
*/
protected PropertyDef findPropertyDef() throws
PropertyException {
return new IntegerPropertyDef(uolId, propId);
}
/**
* Creates the LDDataType object corresponding with the object and its String
* value.
*
* @param aValue String the value of this object
* @throws TypeCastException when the passed value can not be converted to
* the required LDDataType
* @return LDDataType the LDDataType object representing the value
*/
protected LDDataType createPropertyValue(String aValue) throws
TypeCastException {
LDInteger result = null;
if (aValue != null) {
result = new LDInteger(aValue);
}
return result;
}
/**
* Returns the passed value in the correct LDDataType by casting it.
*
* @param aValue LDDataType the value to be type casted
* @throws TypeCastException if type cast fails
* @return LDDataType the type casted value
*/
public LDDataType typeCast(LDDataType aValue) throws TypeCastException {
return aValue.toLDInteger();
}
}
| [
"[email protected]"
] | |
a256b01b6cb2a49ec13c9e72229c3b641275d94b | 56362fb8af0ef3e6f44078f22ad3755895b05b06 | /TeamDestinyProject/src/main/java/kr/kosa/destiny/analytics/model/Book.java | 27a0bd0049dc3e9748260e78f2064921f3f0e401 | [] | no_license | shiincs/DAIA_Project | 8673c635b424eb4cdf133e3444bf2861ecdff33c | c6b1ae0642449103add63f81286e6b237137ac97 | refs/heads/master | 2020-03-08T01:30:49.253835 | 2017-08-24T00:46:47 | 2017-08-24T00:46:47 | 127,832,622 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 470 | java | package kr.kosa.destiny.analytics.model;
public class Book {
private String title;
private String author;
public Book(String title, String author) {
this.title = title;
this.author = author;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
} | [
"COM@COM-PC"
] | COM@COM-PC |
54043131f60fc60580b578250e95fef006b81091 | 2bf21ae67ed1a68596bb5953e1a79b860b61ef19 | /src/DisKMeansWorkflow.java | dce751904ff3080aabd0e42c45b1d1fd48889b07 | [] | no_license | FireTemple/DataView-bohan | 2ee6b7aa34359454f9db5a2347280c248e908efc | d9790e1cc346d332a3b65d83787c01151e40d76b | refs/heads/main | 2023-03-14T09:29:58.401375 | 2021-03-10T02:04:05 | 2021-03-10T02:04:05 | 340,830,281 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,412 | java | import dataview.models.DATAVIEW_BigFile;
import dataview.models.Task;
import dataview.models.Workflow;
public class DisKMeansWorkflow extends Workflow {
public static int K = 2; // number of clusters
public static int M = 1; // number splitting datasets/ partitions
public static int iteration = 2; // number of iteration
public DisKMeansWorkflow() {
super("Distributed K-means", " Calculating K means clustering for huge number of datasets");
wins = new Object[1];
wins[0] = new DATAVIEW_BigFile("KMeansInput.txt");
wouts = new Object[M];
for(int i = 0; i < M; i++){
wouts[i] = new DATAVIEW_BigFile("KMoutput" + i + ".txt");
}
}
public void design()
{
Task T1 = addTask("DisKMeansInitialization");
Task[] T2 = new Task[M * iteration];
Task[] T3 = new Task[iteration];
Task[] T4 = new Task[M * iteration];
for (int i = 0; i < M * iteration; i++) {
T2[i] = addTask("DisCalculateCentroidStep1");
T4[i] = addTask("DisReassignCluster");
}
for (int i = 0; i < iteration; i++) {
T3[i] = addTask("DisCalculateCentroid");
}
addEdge(0,T1,0);
//addEdge("originalInput.enc", T1, 0);
for (int i = 0; i < M; i++) {
addEdge(T1, i, T2[i], 0);
}
for (int it = 0; it < iteration; it++) {
// Step1 to Centroit && Step1 to Reassign
int index = it * M;
for (int i = 0; i < M; i++) {
addEdge(T2[index + i], 0, T3[it], i);
addEdge(T2[index + i], 1, T4[index + i], 0);
}
for (int i = 0; i < M; i++) {
addEdge(T3[it], i, T4[index + i], 1);
}
for (int i = 0; i < M; i++) {
if (it != iteration - 1){
addEdge(T4[index + i], 0, T2[(it + 1) * M + i], 0);
}else{
addEdge(T4[index + i], 0, i);
}
}
}
/*for (int count = 0; count < iteration; count++) {
int index = 0;
int i = count * M;
int limitT2 = i + M;
for (i = count * M; i < limitT2; i++) {
addEdge(T2[i], 0, T3[count], index++);
//addEdge(T2[i], 1, T3[count], index++);
addEdge(T2[i], 1, T4[i], 0);
}
i = count * M;
int limitT4 = i + M;
for (i = count * M; i < limitT4; i++) {
addEdge(T3[count], i, T4[i], 1);
}
if (count == iteration - 1) {
for (i = count * M; i < limitT4; i++) {
addEdge(T4[i], 0, "output" + i+ ".txt");
}
} else {
index = (count + 1) * M;
for (i = count * M; i < limitT4; i++) {
addEdge(T4[i], 0, T2[index++], 0);
}
}
}*/
}
}
| [
"[email protected]"
] | |
d3e0ff6d1b01d5413b89bdc43c6793a4a83acc2e | 9df9ce504ec5695be97ff610badc441808f4ae97 | /ood-week2-factory/src/edu/lewisu/ood/week2/factory/TopCandles.java | 35fbbf828aecb2912c72df4b27c4a7f64f5100aa | [] | no_license | Stephen-Montague/lewis-ood-week2 | 3af5ae9f7137c97167e9286c613a3edb76444678 | ab70f2b4f7550f4be9e05715590671999a424c59 | refs/heads/master | 2020-07-21T10:16:32.074423 | 2019-09-16T12:08:52 | 2019-09-16T12:08:52 | 206,830,361 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 336 | java | package edu.lewisu.ood.week2.factory;
public class TopCandles extends CakeDecorator {
public TopCandles(Cake cake) {
this.cake = cake;
}
public String getDescription() {
return cake.getDescription() + ", Candles";
}
public double cost() {
return cake.cost() + 0.50;
}
} | [
"[email protected]"
] | |
5b9b85d30924f15d0821b0e5489f34ff0b76dd48 | 74d9b00d259a60ee910477abf325c3d6a1335b80 | /src/main/java/com/springboot/common/util/ToolUtil.java | dc412c2e5a8aa39e2fa7773aa4e790829a8855aa | [] | no_license | zihanbobo/springboot-master | d023babca702fe2ad4705d4ad780702cbd27e09c | e50d99b0c499c14191ac6ad5191796a745150039 | refs/heads/master | 2022-01-12T20:48:04.490601 | 2019-05-16T05:54:06 | 2019-05-16T05:54:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,968 | java | package com.springboot.common.util;
import java.text.SimpleDateFormat;
import java.util.*;
public class ToolUtil {
/**
* 获取随机位数的字符串
*
* @param length
* @return
*/
public static String getRandomString(int length) {
String base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
Random random = new Random();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < length; i++) {
int number = random.nextInt(base.length());
sb.append(base.charAt(number));
}
return sb.toString();
}
/**
* 短信验证码
*
* @return
*/
public static String getRandomNumber() {
Random random = new Random();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < 6; i++) {
sb.append(random.nextInt(10));
}
return sb.toString();
}
/**
* 时间戳转日期格式
*
* @param timeStmp
* @return
*/
public static String getDateFormat(long timeStmp) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return dateFormat.format(new Date(timeStmp));
}
public static <T> List<T> newLinkedList(T... values) {
return (LinkedList) list(true, values);
}
public static <T> List<T> list(boolean isLinked, T... values) {
if (isEmpty(values)) {
return list(isLinked);
} else {
List<T> arrayList = isLinked ? new LinkedList() : new ArrayList(values.length);
Object[] arr$ = values;
int len$ = values.length;
for (int i$ = 0; i$ < len$; ++i$) {
T t = (T) arr$[i$];
(arrayList).add(t);
}
return arrayList;
}
}
public static <T> boolean isEmpty(T... array) {
return array == null || array.length == 0;
}
}
| [
"[email protected]"
] | |
a1ad4246400cd7257f212c8de40eb11e0260bb50 | 673a2dd7cd3087407be4d9e56d3bdc57922f16ce | /testPjt/src/StringBufferClass.java | 6b9af3d9291ae2497ce3c32aef79384d9c4c5def | [] | no_license | hyeonjerry/Java-Tutorial | 3a219632db567c384febf44e7fb71efa93e2ff96 | a982f731007cd3aab38a67c75c684bd572ca8f7c | refs/heads/main | 2023-08-18T04:31:13.513613 | 2021-06-30T06:53:43 | 2021-06-30T06:53:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package testPjt.src;
public class StringBufferClass {
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
// 문자열을 추가하거나 변경할 때 사용하는 자료형
sb.append(" ");
sb.append("jump to java");
sb.insert(0, "hello");
System.out.println(sb);
System.out.println(sb.substring(14));
String temp = "";
temp += "hello";
temp += " ";
temp += "jump to java";
System.out.println(temp);
System.out.println(sb.equals(temp));
System.out.println((sb.toString().equals(temp)));
// toString() -> String 자료형으로 변경
}
}
| [
"[email protected]"
] | |
cbcaaf32ee9edc3d106305f9c3e453a7ba18034f | 056a186236f1dab99c2cf8e553eddd1cedb47734 | /drools-wb-services/drools-wb-verifier/drools-wb-verifier-api/src/main/java/org/drools/workbench/services/verifier/api/client/cache/inspectors/FieldInspector.java | ea06044735626c89b2ae7eb309ca0cd3d78703b4 | [
"Apache-2.0"
] | permissive | bingyue/drools-wb | bdd5ae52606771c95cb2aedccc14ef927753d3aa | 88dcdfc366c97984ac39a27f971a76d2a702af07 | refs/heads/master | 2021-01-12T16:36:58.397797 | 2016-10-19T14:43:17 | 2016-10-19T14:43:17 | 71,418,437 | 1 | 0 | null | 2016-10-20T02:34:16 | 2016-10-20T02:34:16 | null | UTF-8 | Java | false | false | 9,080 | java | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* 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 org.drools.workbench.services.verifier.api.client.cache.inspectors;
import java.util.Collection;
import org.drools.workbench.services.verifier.api.client.cache.inspectors.action.ActionInspectorFactory;
import org.drools.workbench.services.verifier.api.client.cache.inspectors.condition.ConditionInspector;
import org.drools.workbench.services.verifier.api.client.cache.util.HasConflicts;
import org.drools.workbench.services.verifier.api.client.cache.util.maps.InspectorList;
import org.drools.workbench.services.verifier.api.client.cache.util.maps.UpdatableInspectorList;
import org.drools.workbench.services.verifier.api.client.checks.util.Conflict;
import org.drools.workbench.services.verifier.api.client.checks.util.IsConflicting;
import org.drools.workbench.services.verifier.api.client.checks.util.IsRedundant;
import org.drools.workbench.services.verifier.api.client.checks.util.IsSubsuming;
import org.drools.workbench.services.verifier.api.client.index.Action;
import org.drools.workbench.services.verifier.api.client.index.Condition;
import org.drools.workbench.services.verifier.api.client.index.Field;
import org.drools.workbench.services.verifier.api.client.index.ObjectField;
import org.drools.workbench.services.verifier.api.client.index.keys.Key;
import org.drools.workbench.services.verifier.api.client.index.keys.UUIDKey;
import org.drools.workbench.services.verifier.api.client.index.select.AllListener;
import org.drools.workbench.services.verifier.api.client.cache.inspectors.action.ActionInspector;
import org.drools.workbench.services.verifier.api.client.cache.inspectors.condition.ConditionInspectorFactory;
import org.drools.workbench.services.verifier.api.client.cache.util.HasKeys;
import org.drools.workbench.services.verifier.api.client.checks.util.HumanReadable;
import org.drools.workbench.services.verifier.api.client.configuration.AnalyzerConfiguration;
import org.uberfire.commons.validation.PortablePreconditions;
public class FieldInspector
implements HasConflicts,
IsConflicting,
IsSubsuming,
IsRedundant,
HumanReadable,
HasKeys {
private final ObjectField objectField;
private final UpdatableInspectorList<ActionInspector, Action> actionInspectorList;
private final UpdatableInspectorList<ConditionInspector, Condition> conditionInspectorList;
private final UUIDKey uuidKey;
private final RuleInspectorUpdater ruleInspectorUpdater;
public FieldInspector( final Field field,
final RuleInspectorUpdater ruleInspectorUpdater,
final AnalyzerConfiguration configuration ) {
this( field.getObjectField(),
ruleInspectorUpdater,
configuration );
configuration.getUUID( this );
updateActionInspectors( field.getActions()
.where( Action.value()
.any() )
.select()
.all() );
updateConditionInspectors( field.getConditions()
.where( Condition.value()
.any() )
.select()
.all() );
setupActionsListener( field );
setupConditionsListener( field );
}
public FieldInspector( final ObjectField field,
final RuleInspectorUpdater ruleInspectorUpdater,
final AnalyzerConfiguration configuration ) {
this.objectField = PortablePreconditions.checkNotNull( "field",
field );
this.ruleInspectorUpdater = PortablePreconditions.checkNotNull( "ruleInspectorUpdater",
ruleInspectorUpdater );
uuidKey = configuration.getUUID( this );
actionInspectorList = new UpdatableInspectorList<>( new ActionInspectorFactory( configuration ),
configuration );
conditionInspectorList = new UpdatableInspectorList<>( new ConditionInspectorFactory( configuration ),
configuration );
}
private void setupConditionsListener( final Field field ) {
field.getConditions()
.where( Condition.value()
.any() )
.listen()
.all( new AllListener<Condition>() {
@Override
public void onAllChanged( final Collection<Condition> all ) {
updateConditionInspectors( all );
ruleInspectorUpdater.resetConditionsInspectors();
}
} );
}
private void setupActionsListener( final Field field ) {
field.getActions()
.where( Action.value()
.any() )
.listen()
.all( new AllListener<Action>() {
@Override
public void onAllChanged( final Collection<Action> all ) {
updateActionInspectors( all );
ruleInspectorUpdater.resetActionsInspectors();
}
} );
}
public ObjectField getObjectField() {
return objectField;
}
private void updateConditionInspectors( final Collection<Condition> all ) {
conditionInspectorList.update( all );
}
private void updateActionInspectors( final Collection<Action> all ) {
actionInspectorList.update( all );
}
public InspectorList<ActionInspector> getActionInspectorList() {
return actionInspectorList;
}
public InspectorList<ConditionInspector> getConditionInspectorList() {
return conditionInspectorList;
}
@Override
public Conflict hasConflicts() {
int index = 1;
for ( final ConditionInspector conditionInspector : conditionInspectorList ) {
for ( int j = index; j < conditionInspectorList.size(); j++ ) {
if ( conditionInspector.conflicts( conditionInspectorList.get( j ) ) ) {
return new Conflict( conditionInspector,
conditionInspectorList.get( j ) );
}
}
index++;
}
return Conflict.EMPTY;
}
@Override
public boolean conflicts( final Object other ) {
if ( other instanceof FieldInspector && objectField.equals( ( (FieldInspector) other ).objectField ) ) {
final boolean conflicting = actionInspectorList.conflicts( ( (FieldInspector) other ).actionInspectorList );
if ( conflicting ) {
return true;
} else {
return conditionInspectorList.conflicts( ( (FieldInspector) other ).conditionInspectorList );
}
} else {
return false;
}
}
@Override
public boolean isRedundant( final Object other ) {
if ( other instanceof FieldInspector && objectField.equals( ( (FieldInspector) other ).objectField ) ) {
return actionInspectorList.isRedundant( ( (FieldInspector) other ).actionInspectorList )
&& conditionInspectorList.isRedundant( ( (FieldInspector) other ).conditionInspectorList );
} else {
return false;
}
}
@Override
public boolean subsumes( final Object other ) {
if ( other instanceof FieldInspector && objectField.equals( ( (FieldInspector) other ).objectField ) ) {
return actionInspectorList.subsumes( ( (FieldInspector) other ).actionInspectorList )
&& conditionInspectorList.subsumes( ( (FieldInspector) other ).conditionInspectorList );
} else {
return false;
}
}
@Override
public String toHumanReadableString() {
return objectField.getName();
}
@Override
public UUIDKey getUuidKey() {
return uuidKey;
}
@Override
public Key[] keys() {
return new Key[]{
uuidKey
};
}
}
| [
"[email protected]"
] | |
67a66a30b16863957a73ced19fa222964e2c905e | 4d737b636c581fc0d28f040a507891fd83d6cb52 | /app/src/main/java/com/wangtotang/ttchatdemo/adapter/EmoteAdapter.java | 8693ebd637ed43d72f54f4f4151494d2a330da57 | [] | no_license | wangtotang/TTChatDemo | 173d19da79c9e2183a39973d366e12738524497a | 3514d9250a3c6553e40364dc3159691db996e9be | refs/heads/master | 2016-09-05T12:15:22.028799 | 2015-04-23T12:07:23 | 2015-04-23T12:07:23 | 33,064,883 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,432 | java | package com.wangtotang.ttchatdemo.adapter;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.wangtotang.ttchatdemo.R;
import com.wangtotang.ttchatdemo.bean.FaceText;
import java.util.List;
/**
* Created by Wangto Tang on 2015/3/31.
*/
public class EmoteAdapter extends BaseArrayListAdapter {
public EmoteAdapter(Context context, List<FaceText> datas) {
super(context, datas);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.item_face_text, null);
holder = new ViewHolder();
holder.mIvImage = (ImageView) convertView
.findViewById(R.id.v_face_text);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
FaceText faceText = (FaceText) getItem(position);
String key = faceText.text.substring(1);
Drawable drawable =mContext.getResources().getDrawable(mContext.getResources().getIdentifier(key, "drawable", mContext.getPackageName()));
holder.mIvImage.setImageDrawable(drawable);
return convertView;
}
class ViewHolder {
ImageView mIvImage;
}
}
| [
"[email protected]"
] | |
255969d7b941e6f32ed27c681429e46a3168562d | 920aa81ed6b7d933f428a4b3ea52a0c7a4457527 | /Java/annotations_app/src/com/techlabs/annotations/test/FooTest.java | 348a547c7bd91a78e693c0e153571d5f83f6b6fd | [] | no_license | NiranjanShetty8/Swabhav | 3f4700b9cf5195b3ed3905171c0ea534018956a9 | 0b5235b476a393bdb041920639a2c138c2fa1ad7 | refs/heads/master | 2023-01-11T08:06:45.055672 | 2020-03-18T11:55:23 | 2020-03-18T11:55:23 | 218,492,278 | 0 | 0 | null | 2023-01-07T15:06:05 | 2019-10-30T09:39:04 | Java | UTF-8 | Java | false | false | 948 | java | package com.techlabs.annotations.test;
import java.lang.annotation.Annotation;
import java.lang.reflect.*;
import com.techlabs.annotations.*;
public class FooTest {
public static void main(String[] args) {
int i = 0;
Foo obj = new Foo();
// Class<? extends Foo> cls = obj.getClass();
// Method[] totalMethods = cls.getMethods();
Method[] totalMethods = obj.getClass().getMethods();
Method[] annoMethods = new Method[totalMethods.length];
for (Method method : totalMethods) {
if (method.getAnnotation(RequireRefactor.class) != null) {
annoMethods[i] = method;
i++;
}
}
System.out.println("Number of annoted methods: " + i);
for (Method met : annoMethods) {
if (met != null)
System.out.println(met.getName());
}
}
}
// Annotation anno = methody.getAnnotation(RequireRefactor.class);
//RequireRefactor rf = (RequireRefactor)anno;
//if(rf.key() == 10);
//{
// System.out.println(methody.getName());
//} | [
"[email protected]"
] | |
0b2559a655c6be6336feb667672e723fc8602c71 | 7cc39b1ee93832aed70e14224f8a3d991570cca6 | /aws-java-sdk-personalizeevents/src/main/java/com/amazonaws/services/personalizeevents/AmazonPersonalizeEventsClient.java | f2a6659c6f42e6b9c90e69859466244ddaf637c3 | [
"Apache-2.0"
] | permissive | yijiangliu/aws-sdk-java | 74e626e096fe4cee22291809576bb7dc70aef94d | b75779a2ab0fe14c91da1e54be25b770385affac | refs/heads/master | 2022-12-17T10:24:59.549226 | 2020-08-19T23:46:40 | 2020-08-19T23:46:40 | 289,107,793 | 1 | 0 | Apache-2.0 | 2020-08-20T20:49:17 | 2020-08-20T20:49:16 | null | UTF-8 | Java | false | false | 11,863 | java | /*
* Copyright 2015-2020 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.personalizeevents;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.personalizeevents.AmazonPersonalizeEventsClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.personalizeevents.model.*;
import com.amazonaws.services.personalizeevents.model.transform.*;
/**
* Client for accessing Amazon Personalize Events. All service calls made using this client are blocking, and will not
* return until the service call completes.
* <p>
* <p>
* Amazon Personalize can consume real-time user event data, such as <i>stream</i> or <i>click</i> data, and use it for
* model training either alone or combined with historical data. For more information see <a>recording-events</a>.
* </p>
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonPersonalizeEventsClient extends AmazonWebServiceClient implements AmazonPersonalizeEvents {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AmazonPersonalizeEvents.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "personalize";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidInputException").withExceptionUnmarshaller(
com.amazonaws.services.personalizeevents.model.transform.InvalidInputExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.personalizeevents.model.AmazonPersonalizeEventsException.class));
public static AmazonPersonalizeEventsClientBuilder builder() {
return AmazonPersonalizeEventsClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on Amazon Personalize Events using the specified parameters.
*
* <p>
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AmazonPersonalizeEventsClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on Amazon Personalize Events using the specified parameters.
*
* <p>
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AmazonPersonalizeEventsClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("personalize-events.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/personalizeevents/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/personalizeevents/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
* <p>
* Records user interaction event data. For more information see <a>event-record-api</a>.
* </p>
*
* @param putEventsRequest
* @return Result of the PutEvents operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @sample AmazonPersonalizeEvents.PutEvents
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22/PutEvents" target="_top">AWS
* API Documentation</a>
*/
@Override
public PutEventsResult putEvents(PutEventsRequest request) {
request = beforeClientExecution(request);
return executePutEvents(request);
}
@SdkInternalApi
final PutEventsResult executePutEvents(PutEventsRequest putEventsRequest) {
ExecutionContext executionContext = createExecutionContext(putEventsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<PutEventsRequest> request = null;
Response<PutEventsResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putEventsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Personalize Events");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutEvents");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<PutEventsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutEventsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns additional metadata for a previously executed successful, request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
* <p>
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
ExecutionContext executionContext) {
return invoke(request, responseHandler, executionContext, null, null);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
}
/**
* Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
* be ignored for this operation.
**/
private <X, Y extends AmazonWebServiceRequest> Response<X> anonymousInvoke(Request<Y> request,
HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext) {
return doInvoke(request, responseHandler, executionContext, null, null);
}
/**
* Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
* ExecutionContext beforehand.
**/
private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
if (discoveredEndpoint != null) {
request.setEndpoint(discoveredEndpoint);
request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
} else if (uriFromEndpointTrait != null) {
request.setEndpoint(uriFromEndpointTrait);
} else {
request.setEndpoint(endpoint);
}
request.setTimeOffset(timeOffset);
HttpResponseHandler<AmazonServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
return client.execute(request, responseHandler, errorResponseHandler, executionContext);
}
@com.amazonaws.annotation.SdkInternalApi
static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() {
return protocolFactory;
}
}
| [
""
] | |
a9b92bdf5a3909869b1fdb5a7561e746c01af9fd | eeaa439297f177d92d56b37869c85f3bb59d7436 | /sigil/eclipse/runtime/src/org/apache/felix/sigil/eclipse/runtime/config/OSGiLaunchConfigurationConstants.java | 47a3d3621bf2a024149bb566d8e59be670c1ff53 | [
"Apache-2.0"
] | permissive | wmzsoft/felix | c1416837c88be170fb7a83cce6ad010e27c9934d | 226f0cfa3a0093e3d63364da0b0cb9ccac9bd7ac | refs/heads/trunk | 2021-01-21T07:41:44.863799 | 2015-07-18T18:13:01 | 2015-07-18T18:13:01 | 39,355,234 | 1 | 3 | null | 2015-07-20T00:48:00 | 2015-07-20T00:48:00 | null | UTF-8 | Java | false | false | 328 | java | package org.apache.felix.sigil.eclipse.runtime.config;
public interface OSGiLaunchConfigurationConstants
{
String FORM_FILE_LOCATION = "org.apache.felix.sigil.form.location";
String AUTOMATIC_ADD = "org.apache.felix.sigil.automatic.add";
String CLASSPATH_PROVIDER = "org.apache.felix.sigil.classpath.Provider";
}
| [
"[email protected]"
] | |
2cd3eda757b6ac2b13cfe763c562abc8c41d042b | dcdcf6d252eae4c8f1d36f2fc60d55642db6770d | /curso/src/main/java/com/java/so/Book.java | 90e63805027740172347f79dbf4aa27fda89e763 | [] | no_license | AlbertProfe/JAVA_pqtm2019 | 7b509b4aa943fc9b9514ba301c4fd5b0fe302da7 | 8bb59d1709f307548e1eac8b8dd3ca39f87152e4 | refs/heads/master | 2022-12-05T07:20:10.900783 | 2020-10-09T11:43:57 | 2020-10-09T11:43:57 | 186,802,817 | 1 | 0 | null | 2022-11-24T08:17:31 | 2019-05-15T10:20:17 | Java | UTF-8 | Java | false | false | 2,005 | java |
package com.java.so;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
@Entity
public class Book implements Serializable {
@Id
private String title;
private String author;
private Date date;
@OneToMany(mappedBy = "book", cascade = CascadeType.ALL)
private List<Page> pages = new ArrayList<Page>();
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((title == null) ? 0 : title.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Book other = (Book) obj;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
return true;
}
public Book(String title, String author, Date date) {
super();
this.title = title;
this.author = author;
this.date = date;
}
public Book(String title) {
super();
this.title = title;
}
public Book() {
super();
}
public void addPage(Page p) {
pages.add(p);
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public List<Page> getPages() {
return pages;
}
public void setPages(List<Page> pages) {
this.pages = pages;
}
@Override
public String toString() {
return "Book [title=" + title + ", author=" + author + ", date=" + date + ", pages=" + pages + "]";
}
}
| [
"inspiratalbert@DESKTOP-E24ITDK"
] | inspiratalbert@DESKTOP-E24ITDK |
02471166484f56f585b5f5c136b8825af43c0151 | fdf78937830eec352c16a0b5b725936ac2be27e3 | /mall-02/src/main/java/com/ceshi/controller/FrontDeskIndexController.java | aee52978ff4652c451a039577c6ff8818e8a6fce | [] | no_license | Hi-jing/cart | 765857b5dff94ddf5dc9de9e85bc685fc5494ec2 | ff53cd218eef6ea049f69cc1d142b0c17cf311df | refs/heads/master | 2021-06-24T07:02:26.471653 | 2017-09-13T14:34:45 | 2017-09-13T14:34:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,412 | java | package com.ceshi.controller;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import com.ceshi.bean.Go_evaluate;
import com.ceshi.bean.Go_pictureWithBLOBs;
import com.ceshi.bean.Good;
import com.ceshi.bean.Good_searchrecord;
import com.ceshi.bean.Me_address;
import com.ceshi.bean.Member;
import com.ceshi.bean.Msg;
import com.ceshi.bean.Myorder;
import com.ceshi.service.FrontDeskIndexService;
/**
* 处理前台移动端index页面的数据
*
* @author dhj
*
*/
@Controller
public class FrontDeskIndexController {
@Autowired
FrontDeskIndexService frontDeskIndexService;
/**
* 对移动端index页面的轮播图片查询
*
* @return
*/
@RequestMapping("/frontDesk/index/lb")
@ResponseBody
public Msg getIndexInfoLb(HttpSession session) {
List<Go_pictureWithBLOBs> go_pictureWithBLOBsList = frontDeskIndexService.getPi_lb();
return Msg.success().add("picbyte", go_pictureWithBLOBsList);
}
/**
* 对移动端index页面的特价商品查询
*
* @return
*/
@RequestMapping("/frontDesk/index/specialPrice")
@ResponseBody
public Msg getIndexInfoSpecialPrice() {
List<Integer> specialPriceGoodId = frontDeskIndexService.getSpecialPrice();
List<Integer> lbGoodId = frontDeskIndexService.getLbGoodId();
for (int i = 0; i < lbGoodId.size(); i++) {
for (int j = 0; j < specialPriceGoodId.size(); j++) {
if (lbGoodId.get(i).equals(specialPriceGoodId.get(j))) {
specialPriceGoodId.remove(j);
}
}
}
List<Good> gList = frontDeskIndexService.getSpecialPriceGood(specialPriceGoodId.get(0),
specialPriceGoodId.get(1), specialPriceGoodId.get(2));
return Msg.success().add("gList", gList);
}
/**
* 对移动端index页面的热销商品查询
*
* @return
*/
@RequestMapping("/frontDesk/index/HotSellGood")
@ResponseBody
public Msg getIndexInfoHotSellGood() {
List<Good> gList = frontDeskIndexService.getHotSellGood();
return Msg.success().add("gList", gList);
}
/**
* 对移动端index页面的服装商品查询
*
* @return
*/
@RequestMapping("/frontDesk/index/clothing")
@ResponseBody
public Msg getIndexInfoClothing() {
List<Good> gList = frontDeskIndexService.getClothing();
return Msg.success().add("gList", gList);
}
/**
* 对移动端index页面的手机数码商品查询
*
* @return
*/
@RequestMapping("/frontDesk/index/mobiles")
@ResponseBody
public Msg getIndexInfoMobiles() {
List<Good> gList = frontDeskIndexService.getMobiles();
return Msg.success().add("gList", gList);
}
/**
* 对移动端index页面的搜索内容进行保存
*
* @return
*/
@RequestMapping("/frontDesk/index/search")
@ResponseBody
public Msg searchSave(@RequestParam("se_val") String seval) {
boolean b = frontDeskIndexService.searchSave(seval);
if (b) {
return Msg.success().add("msg", "保存成功");
}else {
return Msg.fail().add("msg", "保存失败");
}
}
/**
* 对移动端index页面的搜索内容进行查询
*
* @return
*/
@RequestMapping("/frontDesk/index/searchText/check")
@ResponseBody
public Msg checkSearchText() {
List<Good_searchrecord> list = frontDeskIndexService.checkSearchText();
return Msg.success().add("list", list);
}
/**
* 对移动端index页面的搜索内容进行删除
*
* @return
*/
@RequestMapping("/frontDesk/index/searchText/delete")
@ResponseBody
public Msg deleteSearchText() {
boolean b = frontDeskIndexService.deleteSearchText();
if (b) {
return Msg.success().add("msg", "删除成功");
}else {
return Msg.fail().add("msg", "删除失败");
}
}
/**
* 对移动端index页面的搜索后的商品
*
* @return
*/
@RequestMapping("/frontDesk/index/good/search")
@ResponseBody
public Msg searchGood(@RequestParam("search_text") String text) {
String textStrings = text.trim();
String[] strings = new String[textStrings.length()];
for (int i = 0; i < textStrings.length(); i++) {
strings[i] = textStrings.substring(i, i+1);
}
List<Good> list = frontDeskIndexService.searchGood(strings);
return Msg.success().add("list", list);
}
/**
* 对移动端商品详情查询(不包含商品评价)
*
* @return
*/
@RequestMapping("/frontDesk/index/good/details")
@ResponseBody
public Msg goodDetails(@RequestParam("goodid") int goodid) {
Good good = frontDeskIndexService.goodDetails(goodid);
return Msg.success().add("good", good);
}
/**
* 对移动端商品详情查询(包含商品评价)
*
* @return
*/
@RequestMapping("/frontDesk/index/good/evaluate")
@ResponseBody
public Msg getEvaluate(@RequestParam("goodid") int goodid) {
List<Go_evaluate> gEvaluate = frontDeskIndexService.getEvaluate(goodid);
return Msg.success().add("gEvaluate", gEvaluate);
}
/**
* 确认订单得到我的默认地址
* @return
*/
@RequestMapping("/frontDesk/index/good/affirm-order")
@ResponseBody
public Msg affirmOrder(HttpSession session) {
//1、得到该会员 的默认收货地址
//2、根据goodid获得商品信息(页面跳转传值 :缩略图,商品名称,规格名称,数量,现价)
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
Me_address me_address = frontDeskIndexService.affirmOrder(name);
return Msg.success().add("me_address", me_address);
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
* 确认订单付款
* @return
*/
@RequestMapping("/frontDesk/index/good/affirm-order/pay")
@ResponseBody
public Msg affirmPay(HttpSession session,@RequestParam("goodid") int goodid,
@RequestParam("kindid") int kindid,
@RequestParam("buysum") int buysum,
@RequestParam("addressid") int addressid,
@RequestParam("leavemsg") String leavemsg,
@RequestParam("price") Double price) {
//收货地址由页面中获取
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
boolean b = frontDeskIndexService.affirmPay(name,goodid,kindid,buysum,addressid,leavemsg);
if (b) {
frontDeskIndexService.reduceMoney(name,price);
return Msg.success().add("msg", "付款成功");
}else {
return Msg.fail().add("msg", "付款失败");
}
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
* 个人信息资料查看
* @return
*/
@RequestMapping("/frontDesk/personal/personal-date")
@ResponseBody
public Msg getPersonalData(HttpSession session) {
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
Member member = frontDeskIndexService.getPersonalData(name);
return Msg.success().add("member", member);
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
* 个人信息资料查看
* @return
*/
@RequestMapping("/frontDesk/personal/membercard/trade-record")
@ResponseBody
public Msg getRecord(HttpSession session) {
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
List<Myorder> myorder = frontDeskIndexService.getRecord(name);
return Msg.success().add("myorder", myorder);
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
* 个人信息资料查看
* @return
*/
@RequestMapping("/frontDesk/personal/membercard/isExist")
@ResponseBody
public Msg isExist(HttpSession session) {
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
boolean b = frontDeskIndexService.isExist(name);
if (b) {
return Msg.success().add("msg", "会员卡存在");
}else {
return Msg.fail().add("msg", "会员卡不存在");
}
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
*用户注销
* @return
*/
@RequestMapping("/frontDesk/personal/cancel")
@ResponseBody
public Msg cancel(HttpSession session) {
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
session.removeAttribute("username");
return Msg.success().add("msg", "注销成功");
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
*用户反馈信息
* @return
*/
@RequestMapping("/frontDesk/personal/feedback/information")
@ResponseBody
public Msg feedbackInformation(@RequestParam("title") String title,
@RequestParam("content") String content, HttpSession session) {
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
boolean b = frontDeskIndexService.feedbackInformation(title,content,name);
if (b) {
return Msg.success().add("msg", "反馈成功");
}else
{
return Msg.fail().add("msg", "反馈失败");
}
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
/**
*用户反馈信息
* @return
*/
@RequestMapping("/frontDesk/personal/password/edit")
@ResponseBody
public Msg passwordEdit(@RequestParam("password") String password,HttpSession session) {
String name = "";
name = (String) session.getAttribute("username");
if (name!=null&&!name.equals("")) {
boolean b = frontDeskIndexService.passwordEdit(password,name);
if (b) {
return Msg.success().add("msg", "更改成功");
}else
{
return Msg.fail().add("msg", "更改失败");
}
}else {
return Msg.fail().add("msg", "没有登录!");
}
}
}
| [
"Administrator@USER-20160908WE"
] | Administrator@USER-20160908WE |
e4dc18e89e57dce406fd702a51962901b185735c | f5ff8696048a4280eed25fd3fd58fcf89a4cdb2e | /src/map/ksj/BusRoute.java | d8befedcdf6eff66cc98938a3c3cb218189603df | [
"MIT"
] | permissive | ma38su/ksj | 316fcd7f6ee0be80bec1e7cef4cfa5d019cfc34e | 63731db102919176bbb8df2956bdd2cb0bb4fbf8 | refs/heads/master | 2021-01-22T22:56:52.034232 | 2020-11-21T14:38:08 | 2020-11-21T14:38:08 | 5,350,876 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,584 | java | package map.ksj;
import java.awt.Graphics2D;
import java.awt.Rectangle;
/**
* バスルートのクラス
* @author fujiwara
*/
public class BusRoute implements Data {
/**
* 路線
*/
private GmlCurve curve;
/**
* バス路線情報のクラス
*/
private BusRouteInfo info;
/**
* 平日運行頻度
*/
private double ratePerDay;
/**
* 土曜日運行頻度
*/
private double ratePerSaturday;
/**
* 日祝日運行頻度
*/
private double ratePerHoliday;
/**
* バス路線の系統番号・系統名
* 系統が未整備であれば路線名・事業者名と連番
*/
private String line;
public BusRoute() {
this.info = new BusRouteInfo();
}
public BusRoute(GmlCurve curve, BusRouteInfo info) {
this.curve = curve;
this.info = info;
}
public Rectangle getBounds() {
return this.curve.getBounds();
}
/**
* @return バス路線情報のクラス
*/
public BusRouteInfo getInfo() {
return this.info;
}
public void setInfo(BusRouteInfo info) {
this.info = info;
}
/**
* @return 路線
*/
public GmlCurve getCurve() {
return this.curve;
}
public void setCurve(GmlCurve curve) {
this.curve = curve;
}
/**
* @return バス系統
*/
public String getLine() {
return this.line;
}
public void draw(Graphics2D g) {
this.curve.draw(g);
}
/**
* @return 平日運行頻度
*/
public double getRateParDay() {
return this.ratePerDay;
}
/**
* @return 日祝日運行頻度
*/
public double getRatePerHoliday() {
return this.ratePerHoliday;
}
/**
* @return 土曜日運行頻度
*/
public double getRatePerSaturday() {
return this.ratePerSaturday;
}
@Override
public void link(String tag, Object obj) {
if (obj instanceof GmlCurve) {
if ("ksj:brt".equals(tag)) {
this.curve = (GmlCurve) obj;
}
} else if (obj instanceof String) {
String string = (String) obj;
if ("ksj:bsc".equals(tag)) {
int type = Integer.parseInt(string);
this.info.setType(type);
} else if ("ksj:boc".equals(tag)) {
this.info.setOperationCommunity(string);
} else if ("ksj:bln".equals(tag)) {
this.info.setLine(string);
} else if ("ksj:rpd".equals(tag)) {
this.ratePerDay = Double.parseDouble(string);
} else if ("ksj:rps".equals(tag)) {
this.ratePerSaturday = Double.parseDouble(string);
} else if ("ksj:rph".equals(tag)) {
this.ratePerHoliday = Double.parseDouble(string);
} else if ("ksj:rmk".equals(tag)) {
if (!"".equals(string)) {
System.out.println("remark: "+ string);
}
}
}
}
}
| [
"[email protected]"
] | |
3bb64aacd01e13384e0ddd6d244126673c4680f7 | a0d6199649b7947718e290133d1565732b817cf5 | /onlinehelp/src/main/java/uk/co/o2/soa/useraccountsdata_1/BillingDataType.java | ee2b2af7102b3c37a84738a5d6bee8d64c42775f | [] | no_license | palaksareen/projectt | c05b487ac5db65a650b6da2b2ae10544c54699c8 | 70d3ac600306f0e73b9e1895d04741dcf3a70feb | refs/heads/master | 2021-08-16T22:48:57.296252 | 2017-11-20T12:58:01 | 2017-11-20T12:58:01 | 111,407,865 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,256 | java |
package uk.co.o2.soa.useraccountsdata_1;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import uk.co.o2.soa.pscommonregistrationdata_2.IdentityReferenceType;
/**
* Billing information
*
* <p>Java class for billingDataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="billingDataType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="billingMsisdn" type="{http://soa.o2.co.uk/coredata_1}msisdnType" minOccurs="0"/>
* <element name="billingAccountId" type="{http://soa.o2.co.uk/pscommonregistrationdata_2}billingAccountIdType" minOccurs="0"/>
* <element name="billingAccountName" type="{http://soa.o2.co.uk/pscommonregistrationdata_2}billingAccountNameType" minOccurs="0"/>
* <element name="billingAccountType" type="{http://soa.o2.co.uk/pscommonregistrationdata_2}accountCategoryType" minOccurs="0"/>
* <element name="owningPortalAccount" type="{http://soa.o2.co.uk/pscommonregistrationdata_2}identityReferenceType" minOccurs="0"/>
* <element name="customerNumber" type="{http://soa.o2.co.uk/pscommonregistrationdata_2}customerNumberType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "billingDataType", propOrder = {
"billingMsisdn",
"billingAccountId",
"billingAccountName",
"billingAccountType",
"owningPortalAccount",
"customerNumber"
})
public class BillingDataType {
protected String billingMsisdn;
protected String billingAccountId;
protected String billingAccountName;
protected String billingAccountType;
protected IdentityReferenceType owningPortalAccount;
protected BigInteger customerNumber;
/**
* Gets the value of the billingMsisdn property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBillingMsisdn() {
return billingMsisdn;
}
/**
* Sets the value of the billingMsisdn property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBillingMsisdn(String value) {
this.billingMsisdn = value;
}
/**
* Gets the value of the billingAccountId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBillingAccountId() {
return billingAccountId;
}
/**
* Sets the value of the billingAccountId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBillingAccountId(String value) {
this.billingAccountId = value;
}
/**
* Gets the value of the billingAccountName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBillingAccountName() {
return billingAccountName;
}
/**
* Sets the value of the billingAccountName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBillingAccountName(String value) {
this.billingAccountName = value;
}
/**
* Gets the value of the billingAccountType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBillingAccountType() {
return billingAccountType;
}
/**
* Sets the value of the billingAccountType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBillingAccountType(String value) {
this.billingAccountType = value;
}
/**
* Gets the value of the owningPortalAccount property.
*
* @return
* possible object is
* {@link IdentityReferenceType }
*
*/
public IdentityReferenceType getOwningPortalAccount() {
return owningPortalAccount;
}
/**
* Sets the value of the owningPortalAccount property.
*
* @param value
* allowed object is
* {@link IdentityReferenceType }
*
*/
public void setOwningPortalAccount(IdentityReferenceType value) {
this.owningPortalAccount = value;
}
/**
* Gets the value of the customerNumber property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getCustomerNumber() {
return customerNumber;
}
/**
* Sets the value of the customerNumber property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setCustomerNumber(BigInteger value) {
this.customerNumber = value;
}
}
| [
"[email protected]"
] | |
a99b227dca6831e18affb86f7945862df8fa8ba9 | 0b981934c0932b8c76211a9685a9a346e4e1a601 | /src/main/java/springproj_1/demo/mapper/TeacherMapper.java | 203a3cfeac6b62e3c1f97516c1770fd20940b107 | [] | no_license | xw6938/javaDB | 830947b348a1c6584e7bb7a0e66059bd700e4230 | b21620ed98f6aa36d883460e6bc723bbb37d653b | refs/heads/master | 2020-06-24T05:17:46.784206 | 2019-08-05T15:49:42 | 2019-08-05T15:49:42 | 198,859,947 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 214 | java | package springproj_1.demo.mapper;
import org.springframework.stereotype.Repository;
import springproj_1.demo.entity.Teacher;
@Repository
public interface TeacherMapper {
Teacher getTeacherInfo(String Tno);
}
| [
"[email protected]"
] | |
b900453f3b859016f5dd94c64a9c5c6cbd19d516 | 60172c192e2ed2fa3b822d251e184c99a132f484 | /代码/mysql_wade/cashiersys/src/com/linkage/common/components/Suggest.java | cfee31b942eb0b102d891f61ba62e8c0008a94a2 | [] | no_license | wangscript/kawasaka-web | a73087df301b8ec6e894c7fa8f133c940b44409e | 70f9917e280e7d20271f9f0242289e145356a74a | refs/heads/master | 2020-04-30T23:29:27.833981 | 2011-12-13T11:04:28 | 2011-12-13T11:04:28 | 39,171,839 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 6,783 | java | package com.linkage.common.components;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import org.apache.tapestry.ApplicationRuntimeException;
import org.apache.tapestry.IForm;
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.Tapestry;
import org.apache.tapestry.form.IPropertySelectionModel;
import org.apache.tapestry.html.Body;
import com.linkage.appframework.data.DataMap;
import com.linkage.appframework.data.DatasetList;
import com.linkage.appframework.data.IData;
import com.linkage.appframework.data.IDataset;
import com.linkage.webframework.tapestry.components.BaseFormComponent;
public abstract class Suggest extends BaseFormComponent
{
public abstract String getValue();
public abstract Object getModel();
public abstract String getStyle();
public abstract String getEnterAction();
//public abstract void setUploads(IDataset uploads);
//public abstract void setOtherConnectInfos(IDataset otherConnectInfos);
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) {
IForm form = getForm(cycle);
String name = form.getElementId(this);
String value = getValue();
Object model = getModel();
String style = getStyle();
String enterAction = getEnterAction();
IDataset dataModel = null;
if (model == null) {
model = new DatasetList();
}
if ((model == null) || (model instanceof IDataset)) {
dataModel = (IDataset)model;
} else if (model instanceof IPropertySelectionModel) {
dataModel = convertToDataset((IPropertySelectionModel)model);
} else {
throw new ApplicationRuntimeException("Suggest component " + name + ": type of parameter model is no other than com.linkage.appframework.data.IDataset or org.apache.tapestry.form.IPropertySelectionModel.");
}
if (!cycle.isRewinding()) {
Body body = Body.get(cycle);
if (body == null) {
throw new ApplicationRuntimeException(Tapestry.format(
"must-be-contained-by-body", "Suggest"));
}
//String value = getValue();
//body.includeExternalScript(writer, "./common/scripts/suggest.js");
writer.beginEmpty("input");
writer.attribute("type", "hidden");
writer.attribute("name", name);
writer.attribute("id", name);
writer.attribute("value", value);
renderInformalParameters(writer, cycle);
writer.beginEmpty("input");
writer.attribute("type", "text");
writer.attribute("name", "input_" + name);
writer.attribute("id", "input_" + name);
writer.attribute("value", "");
writer.attribute("autocomplete", "off");
writer.attribute("style", style);
if (enterAction != null) writer.attribute("onkeypress", "if (window.event.keyCode == 13) { Wade.event.stopEvent(); return " + enterAction + "; }");
renderInformalParameters(writer, cycle);
writer.printRaw("\r\n");
writer.printRaw("<div id=\"suggest_" + name + "\" style=\"z-index:100;display:none;\"></div>\r\n");
writer.printRaw("<script type=\"text/javascript\" src=\"./common/scripts/suggest.js\"></script>\r\n");
StringBuffer html = new StringBuffer();
html.append("<script>");
html.append("document.getElementById(\"" + "input_" + name + "\").style.display = \"block\";");
html.append("var suggestCode"+ name +"List = [];");
html.append("var suggestText"+ name +"List = [];");
for (int i = 0; i < dataModel.size(); ++i) {
IData data = (IData)dataModel.get(i);
html.append("suggestCode"+ name +"List.push(\""+ data.getString("DATA_ID") +"\");");
html.append("suggestText"+ name +"List.push(\""+ pinjieStr(data.getString("DATA_NAME")) +"\");");
}
html.append("var suggest = new Suggest.Local(\""+ name +"\",\""+ "input_" + name +"\", \"" + "suggest_" + name +"\", suggestCode"+ name +"List, suggestText"+ name +"List, {dispAllKey: true});");
html.append("</script>");
html.append("\r\n");
writer.printRaw(html.toString());
}
}
private IDataset convertToDataset(IPropertySelectionModel model) {
IDataset dataset = new DatasetList();
int count = model.getOptionCount();
for (int i = 0; i < count; ++i) {
IData data = new DataMap();
String value = model.getValue(i);
if (value != null) {
if (!"".equals(value)){
data.put("DATA_ID", model.getValue(i));
data.put("DATA_NAME", model.getLabel(i));
dataset.add(data);
}
}
}
return dataset;
}
private String pinjieStr(String src){
return makeStringToPinyin(src) + ":" + src;
}
private String makeStringToPinyin(String src){
StringBuilder outStr = new StringBuilder();
if(src!=null && !src.trim().equalsIgnoreCase("")){
char[] srcChar ;
srcChar=src.toCharArray();
//汉语拼音格式输出类
HanyuPinyinOutputFormat hanYuPinOutputFormat = new HanyuPinyinOutputFormat();
//输出设置,大小写,音标方式等
hanYuPinOutputFormat.setCaseType(HanyuPinyinCaseType.UPPERCASE);
hanYuPinOutputFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
hanYuPinOutputFormat.setVCharType(HanyuPinyinVCharType.WITH_V);
String[] temp = new String[src.length()];
for(int i=0;i<srcChar.length;i++){
char c = srcChar[i];
//是中文或者a-z或者A-Z转换拼音(我的需求,是保留中文或者a-z或者A-Z)
if(String.valueOf(c).matches("[\\u4E00-\\u9FA5]+")){
try{
String tmp[] = PinyinHelper.toHanyuPinyinStringArray(srcChar[i], hanYuPinOutputFormat);
temp[i] = tmp[0].substring(0, 1);
}catch(BadHanyuPinyinOutputFormatCombination e) {
e.printStackTrace();
}
}else if(((int)c>=65 && (int)c<=90) || ((int)c>=97 && (int)c<=122)){
temp[i] = String.valueOf(srcChar[i]);
}else{
temp[i] = String.valueOf(srcChar[i]);
}
}
int i=0;
for(String s : temp){
if(i == temp.length - 1){
outStr.append(s);
}else{
outStr.append(s + "");
}
i++;
}
}
return outStr.toString();
}
}
| [
"[email protected]"
] | |
486b0457964476a66ff8b62ee85f8d55e828c430 | b237e189b215391b0866674ca1a62516343bb645 | /src/main/java/com/mirakl/client/mmp/request/shop/AbstractMiraklGetShopDocumentsRequest.java | 787845c53481efd2af62a9ceb9e54aa9d9cc5360 | [] | no_license | blacwood/MIRAKL | 86ddc1974f1881df57cf6ac36dbb8e4c17849db3 | fb8dd37a9b90224f859b41450e79e7e2facbe7b0 | refs/heads/master | 2020-05-23T10:11:55.664123 | 2017-04-18T20:13:38 | 2017-04-18T20:13:38 | 80,401,817 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 814 | java | /**
* Copyright © 2016 Mirakl. www.mirakl.com - [email protected]
* All Rights Reserved. Tous droits réservés.
* Strictly Confidential, this data may not be reproduced or redistributed
* Use of this data is pursuant to a license agreement with Mirakl.
*/
package com.mirakl.client.mmp.request.shop;
import com.mirakl.client.core.internal.MiraklApiEndpoint;
import com.mirakl.client.domain.common.Unicity;
import com.mirakl.client.mmp.core.internal.MiraklMarketplacePlatformCommonApiEndpoint;
import com.mirakl.client.request.AbstractMiraklApiRequest;
@Unicity(includeAll = true)
public abstract class AbstractMiraklGetShopDocumentsRequest extends AbstractMiraklApiRequest {
@Override
public MiraklApiEndpoint getEndpoint() {
return MiraklMarketplacePlatformCommonApiEndpoint.S30;
}
}
| [
"[email protected]"
] | |
3d74498afea0a4d68523aac42ab1beb757c6ac07 | dfa69d770c803a89200508dcab96615a4fba2aef | /homework-21-ck2860/src/util/Node.java | 644d843f68af85dd093c4ac4821c2f1798804f21 | [] | no_license | ck2860/Java-Projects | 087904cc871d3b6b00964698113b358cbb3f4fbb | 1852048e317a1276b9e3f9a201acef0e42d272fa | refs/heads/main | 2023-08-29T08:49:01.312907 | 2021-10-06T16:28:14 | 2021-10-06T16:28:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,384 | java | package util;
/**
* Used to implement node-based data structures.
*
* @param <T> The type of value stored by the node.
*/
class Node<T> {
/**
* The node's value.
*/
private T value;
/**
* The next node in the sequence.
*/
private Node<T> next;
/**
* Creates a new node with the specified value.
*
* @param value The value stored by the node.
*/
Node(T value) {
this(value, null);
}
/**
* Creates a new node with the specified value and next node.
*
* @param value The value stored by this node.
* @param next The next node in the sequence.
*/
Node(T value, Node<T> next) {
this.value = value;
this.next = next;
}
/**
* Returns the value stored by the node.
*
* @return The value stored by the node.
*/
public T getValue() {
return value;
}
/**
* Returns the next node in the sequence; may be null.
*
* @return The next node in the sequence.
*/
public Node<T> getNext() {
return next;
}
/**
* Sets the next node in the sequence to the specified value.
*
* @param node The next node in the sequence.
*/
public void setNext(Node<T> next) {
this.next = next;
}
}
| [
"[email protected]"
] | |
37788ab71f95b9e633dd15f77159bb3d1a7fbcd0 | 17fdc38df32efbd873302f699889f8b3e93690ff | /android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/components/camera/CameraViewManager.java | 2e892e89788027538cc276fd0012c81a095eed42 | [
"MIT",
"BSD-3-Clause",
"CC-BY-4.0",
"Apache-2.0"
] | permissive | mohebifar/expo | a83d51a1e2f886375aa6fb5c535719891dc3efdd | 083f2254c65e71385054172e147765edfb676fe4 | refs/heads/master | 2021-01-15T21:24:31.714042 | 2017-08-09T23:02:36 | 2017-08-09T23:02:36 | 99,859,373 | 2 | 0 | null | 2017-08-09T22:58:22 | 2017-08-09T22:58:22 | null | UTF-8 | Java | false | false | 2,981 | java | package versioned.host.exp.exponent.modules.api.components.camera;
import android.support.annotation.Nullable;
import com.facebook.react.bridge.Promise;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.ViewGroupManager;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.google.android.cameraview.AspectRatio;
import java.util.Map;
import java.util.Set;
public class CameraViewManager extends ViewGroupManager<ExpoCameraView> {
public enum Events {
EVENT_CAMERA_READY("onCameraReady");
private final String mName;
Events(final String name) {
mName = name;
}
@Override
public String toString() {
return mName;
}
}
private static final String REACT_CLASS = "ExponentCamera";
private static CameraViewManager instance;
private ExpoCameraView mCameraView;
public CameraViewManager() {
super();
instance = this;
}
public static CameraViewManager getInstance() { return instance; }
@Override
public String getName() {
return REACT_CLASS;
}
@Override
protected ExpoCameraView createViewInstance(ThemedReactContext themedReactContext) {
mCameraView = new ExpoCameraView(themedReactContext);
return mCameraView;
}
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
for (Events event : Events.values()) {
builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
}
return builder.build();
}
@ReactProp(name = "type")
public void setType(ExpoCameraView view, int type) {
view.setFacing(type);
}
@ReactProp(name = "ratio")
public void setRatio(ExpoCameraView view, String ratio) {
view.setAspectRatio(AspectRatio.parse(ratio));
}
@ReactProp(name = "flashMode")
public void setFlashMode(ExpoCameraView view, int torchMode) {
view.setFlash(torchMode);
}
@ReactProp(name = "autoFocus")
public void setAutoFocus(ExpoCameraView view, boolean autoFocus) {
view.setAutoFocus(autoFocus);
}
@ReactProp(name = "focusDepth")
public void setFocusDepth(ExpoCameraView view, float depth) {
view.setFocusDepth(depth);
}
@ReactProp(name = "zoom")
public void setZoom(ExpoCameraView view, float zoom) {
view.setZoom(zoom);
}
@ReactProp(name = "whiteBalance")
public void setWhiteBalance(ExpoCameraView view, int whiteBalance) {
view.setWhiteBalance(whiteBalance);
}
public void takePicture(Promise promise) {
if (mCameraView.isCameraOpened()) {
mCameraView.takePicture(promise);
} else {
promise.reject("E_CAMERA_UNAVAILABLE", "Camera is not running");
}
}
public Set<AspectRatio> getSupportedRatios() {
if (mCameraView.isCameraOpened()) {
return mCameraView.getSupportedAspectRatios();
}
return null;
}
}
| [
"[email protected]"
] | |
9e6f01bc5ab8c337a540eb1cf625e2374817df7f | 81b1cb8a87554af156ed7b84a21d24d0e074f25b | /src/main/java/com/creditharmony/core/common/type/SelectOptionType.java | a988b880bf1f153ef0aa949e9142e9ebb5653669 | [] | no_license | sengeiou/chp-core | 03e5abd12d242b04e0060372e0dcfad3ad52ccd2 | bdc410a1682ba2983ed64cc8377b5e7707210819 | refs/heads/master | 2020-05-16T02:55:41.694666 | 2017-07-06T06:17:16 | 2017-07-06T06:17:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 618 | java | package com.creditharmony.core.common.type;
/**
* 页面下拉列表框选项的类型常量
* @Class Name SelectOptionType
* @author 张永生
* @Create In 2015年12月9日
*/
public interface SelectOptionType {
/**
* 下拉列表默认被选中的选中项对应的String类型数值
*/
public static final String STRING_DEFAULT_VALUE = "-1";
/**
* 下拉列表默认被选中的选中项对应的Integer类型数值
*/
public static final Integer INTEGER_DEFAULT_VALUE = -1;
/**
* -1转换成默认的null
*/
public static final String DEFAULT_NULL = null;
}
| [
"[email protected]"
] | |
acf68b30d2317145b9f7ac411dffd24e214c1e6e | bb018e9f866e4df1df10aeaaad45b02c06cc70be | /app/src/main/java/ru/drom/gitgrep/util/OnSubscribeAddAccount.java | 2cb9bfbc2e0116d1bd59e870f23d275d045b463a | [] | no_license | vaginessa/gitgrep | 8f55d1c9262158acd7abf866d42b5afe05b74f11 | 0973ed6dee6273825f5a721f36f669217a488626 | refs/heads/master | 2021-10-10T22:23:29.912898 | 2017-04-30T09:16:12 | 2017-04-30T09:16:12 | 116,833,115 | 0 | 0 | null | 2019-01-18T09:30:33 | 2018-01-09T15:22:19 | Java | UTF-8 | Java | false | false | 7,732 | java | package ru.drom.gitgrep.util;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorActivity;
import android.accounts.AccountManager;
import android.accounts.AccountManagerCallback;
import android.accounts.AccountManagerFuture;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
/**
* Initiate creation of {@link Account} via {@link AccountManager} and subscribe to results.
*<p>
* You will typically want to use {@link RxAndroid#requireAccount(Builder)}
* to create Account on-demand, only if it does not exist yet.
*<p>
* This method uses {@link AccountManagerCallback} to avoid creation of separate thread
* for blocking call, and as such, won't work for non-graphical AccountAuthenticator, as well
* as implementations, incompatible with {@link AccountAuthenticatorActivity}.
* If you want to create such AccountAuthenticator (which is generally a bad idea) or need to
* work around issues of existing one, use {@link AccountManagerFuture#getResult()}
* instead.
*/
final class OnSubscribeAddAccount implements Observable.OnSubscribe<Account> {
private Activity activity;
private final String accountType;
private final String authTokenType;
private final String[] requiredFeatures;
private final Bundle addAccountOptions;
private volatile Handler handler;
/**
* Performs {@link AccountManager#addAccount(String, String, String[], Bundle, Activity, AccountManagerCallback, Handler)}
* to create an account without additional parameters. Account creation and Observable callbacks will
* be invoked on current thread or main thread (if current thread does not have a {@link Looper})
*<p>
* Use {@link #OnSubscribeAddAccount(Activity, String, Handler)} if you don't want
* current thread to be used.
*<p>
* Use {@link Builder} if you want to provide account creation parameters.
*
* @param activity used by AccountManager to launch Account creation Activity.
* @param accountType type of created Account.
*/
public OnSubscribeAddAccount(@NonNull Activity activity, @NonNull String accountType) {
this(activity, accountType, new Handler(chooseLooper()));
}
/**
* Performs {@link AccountManager#addAccount(String, String, String[], Bundle, Activity, AccountManagerCallback, Handler)}
* to create an account without additional parameters. Account creation and Observable callbacks will
* be invoked on thread, associated with specified {@link Looper}.
*<p>
* Use {@link Builder} if you want to provide account creation parameters.
*
* @param activity used by AccountManager to launch account creation Activity.
* @param accountType type of created Account.
* @param handler used to invoke account creation and callbacks.
*/
public OnSubscribeAddAccount(@NonNull Activity activity, @NonNull String accountType, @NonNull Handler handler) {
this(activity, accountType, handler, null, null, null);
}
private OnSubscribeAddAccount(Activity activity, String accountType, Handler handler,
String authTokenType,
String[] requiredFeatures,
Bundle addAccountOptions) {
if (activity == null || TextUtils.isEmpty(accountType))
throw new IllegalArgumentException("activity and account type must be specified");
this.activity = activity;
this.accountType = accountType;
this.handler = handler;
this.authTokenType = authTokenType;
this.requiredFeatures = requiredFeatures;
this.addAccountOptions = addAccountOptions;
}
@Override
public void call(final Subscriber<? super Account> subscriber) {
if (handler == null) {
handler = new Handler(chooseLooper());
}
if (Thread.currentThread() == handler.getLooper().getThread()) {
subscribe(subscriber);
} else {
// follow the Observable contract if isn't subscribed to on the same thread as created
handler.post(() -> subscribe(subscriber));
}
}
private void subscribe(final Subscriber<? super Account> subscriber) {
final Context appContext = activity.getApplication();
final AccountManager am = AccountManager.get(appContext);
final AccountManagerCallback<Bundle> callback = new AccountManagerCallback<Bundle>() {
@Override
public void run(AccountManagerFuture<Bundle> future) {
if (subscriber.isUnsubscribed())
return;
Exception errorDescription = null;
try {
final Bundle results = future.getResult();
Account[] accs = am.getAccountsByType(accountType);
if (accs.length == 0) {
errorDescription = new IllegalStateException("No Account created; results: " + results);
} else {
for (Account acc:accs) {
subscriber.onNext(acc);
}
subscriber.onCompleted();
}
} catch (Exception e) {
errorDescription = e;
} finally {
if (errorDescription != null) {
subscriber.onError(errorDescription);
}
}
}
};
final AccountManagerFuture<Bundle> f = am.addAccount(accountType,
authTokenType, requiredFeatures, addAccountOptions, activity, callback, handler);
// slightly reduce chance of leak, if something goes terribly wrong
activity = null;
subscriber.add(RxAndroid.unsubscribeInHandlerThread(new Action0() {
@Override
public void call() {
f.cancel(true);
}
}, handler));
}
public final static class Builder {
final Activity activity;
final String accountType;
private Handler handler;
private String authTokenType;
private String[] requiredFeatures;
private Bundle addAccountOptions;
public Builder(@NonNull Activity activity, @NonNull String accountType) {
this.activity = activity;
this.accountType = accountType;
}
public Builder setHandler(Handler handler) {
this.handler = handler;
return this;
}
public Builder setAuthTokenType(String authTokenType) {
this.authTokenType = authTokenType;
return this;
}
public Builder setAddAccountOptions(Bundle addAccountOptions) {
this.addAccountOptions = addAccountOptions;
return this;
}
public Builder setRequiredFeatures(String... requiredFeatures) {
this.requiredFeatures = requiredFeatures;
return this;
}
public OnSubscribeAddAccount build() {
return new OnSubscribeAddAccount(
activity,
accountType,
handler,
authTokenType,
requiredFeatures,
addAccountOptions);
}
}
private static Looper chooseLooper() {
return Looper.myLooper() == null ? Looper.getMainLooper() : Looper.myLooper();
}
} | [
"[email protected]"
] | |
99b33ee08af47237ad0cacd55c04d4ed0095f5d8 | 5aa9e450293ea0b3df344153521faba659361717 | /src/main/java/com/huangchao/acef/service/OrdinaryArticleRichTextService.java | 7a67dd641e8c316f774bc4d423ec23ba9fd7aff2 | [] | no_license | HuangQAQ/acef | 0df6ca9cee5e90b5ee02f0ab9d36a3da08e41c61 | 80d29cd0984032547076b8411814020c75e2eb1c | refs/heads/master | 2020-07-28T21:49:29.861377 | 2019-06-30T07:51:56 | 2019-06-30T07:51:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,684 | java | package com.huangchao.acef.service;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.huangchao.acef.dao.OrdinaryArticleRichTextMapper;
import com.huangchao.acef.dao.PictureMapper;
import com.huangchao.acef.entity.OrdinaryArticle;
import com.huangchao.acef.utils.CookieUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import static com.huangchao.acef.global.Common.deletePreviousPicture;
/**
* 本类为普通文章操作类
*/
@Service
public class OrdinaryArticleRichTextService {
//注入富文本活动文章操作类
@Autowired
private OrdinaryArticleRichTextMapper ordinaryArticleRichTextMapper;
//注入图片操作类
@Autowired
private PictureMapper pictureMapper;
//注入图片保存路径
@Value("${filePath}")
String filePath;
//注入图片保存路径,相对根路径
@Value("${imgPath}")
String imgPath;
//注入文章图片/海报保存路径
@Value("${activityArticleImgPath}")
String activityArticleImgPath;
//普通文章上传
public void uploadOrdinaryArticle(OrdinaryArticle oa, HttpServletRequest request, HttpServletResponse response) {
ordinaryArticleRichTextMapper.uploadOrdinaryArticle(oa);
//获取cookie
Cookie[] cookies = request.getCookies();
Cookie cookie = CookieUtil.findCookie(cookies, "articleId");
//若id为articleId的cookie为不为空或者和当前文章id相同,则认为文章上传未中断,清除保存再cookie的文章id
if (cookie != null && cookie.getValue().equals(oa.getArticleId()))
CookieUtil.saveCookie("articleId", oa.getArticleId(), response, 0);
}
//根据普通文章id删除普通文章
public void deleteOrdinaryArticle(String[] articleId) throws IOException {
if (articleId != null) {
for (int i = 0; i < articleId.length; i++) {
//删除文章中的图片
String[] imgPaths = pictureMapper.getRiceTextPictures(articleId[i]);
if (imgPaths != null) {
for (String imgUrl : imgPaths) {
//删除图片
deletePreviousPicture(imgUrl, filePath, imgPath + activityArticleImgPath);
//删除数据库中保存的图片链接
pictureMapper.deleteRichTextPicture(articleId[i]);
}
}
}
//删除文章
ordinaryArticleRichTextMapper.deleteOrdinaryArticle(articleId);
}
}
//根据普通文章id获取普通文章
public OrdinaryArticle getOneOrdinaryArticle(String articleId) {
if (articleId != null) {
OrdinaryArticle ordinaryArticle = ordinaryArticleRichTextMapper.getOneOrdinaryArticle(articleId);
//截断时间
ordinaryArticle.setDisplayTime(ordinaryArticle.getDisplayTime().substring(0, 10));
return ordinaryArticle;
} else
return null;
}
//批量获取普通文章
public PageInfo<OrdinaryArticle> getOrdinaryArticle(String language, int currentPage, int pageSize, String part) {
if (language.equals("all"))
language = null;
//对数据库的操作必须在此定义的下一条语句执行,且只有一条语句有分页效果,若要多条语句都有分页效果,需写多条本语句
Page<?> page = PageHelper.startPage(currentPage, pageSize);
List<OrdinaryArticle> ordinaryArticleList = ordinaryArticleRichTextMapper.getOrdinaryArticle(language, part);
//截断时间
for (OrdinaryArticle o : ordinaryArticleList) {
o.setDisplayTime(o.getDisplayTime().substring(0, 10));
}
//用PageInfo对结果进行包装
PageInfo<OrdinaryArticle> pageInfo = (PageInfo<OrdinaryArticle>) page.toPageInfo();
return pageInfo;
}
// 判断articleId是否已经存在,即此普通文章是否已经上传
public boolean existOrdinaryArticleId(String articleId) {
return ordinaryArticleRichTextMapper.existOrdinaryArticleId(articleId) != null;
}
//修改普通文章
public void changeOrdinaryArticle(OrdinaryArticle oa) {
ordinaryArticleRichTextMapper.changeOrdinaryArticle(oa);
}
}
| [
"[email protected]"
] | |
22e99b9c3e6966255aeac38d7c52af6edc2c432a | de5c496b0ae24e5c61075b1ba0ea6248909c8980 | /src/main/java/com/luoyifan/voyage/constants/PlatformEnum.java | 92e3278eecf75afd0548d1fff1284a78301f5332 | [
"MIT"
] | permissive | woluoyifan/voyage-clone | 578a127b8260e256799e3050a6ae631b4804f619 | b5a43c9f1811a225d43220b23e75e68b30f0d579 | refs/heads/master | 2022-06-22T07:15:27.140069 | 2020-01-04T05:55:59 | 2020-01-04T05:55:59 | 230,713,655 | 0 | 0 | MIT | 2022-06-21T02:32:18 | 2019-12-29T06:43:46 | Java | UTF-8 | Java | false | false | 397 | java | package com.luoyifan.voyage.constants;
/**
* @author EvanLuo
*/
public enum PlatformEnum {
WINDOWS("Windows"),
MAC("MacOS"),
ANDROID("Android"),
LINUX("Linux"),
UNKNOWN("未知");
private String description;
PlatformEnum(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
| [
"[email protected]"
] | |
230f23b5f2490c456722856fb5af126a204fef5b | 4569dc304e5c362e4df855fb6ed2841792bb70d1 | /app/src/main/java/gerenciador/engefourjunior/com/gerenciadorengefour/SplashScreen.java | b6d4e569903e64181e920b287dbe8438343e0761 | [
"MIT"
] | permissive | LeoFuchs/SalesManager | ee08c3d94e2653dfe9c1204b8dcc423734ba9de1 | 7515dd071ace8fbf616688ad49981174aca8d3cd | refs/heads/master | 2022-12-11T07:09:29.162849 | 2020-09-14T19:20:57 | 2020-09-14T19:20:57 | 88,899,556 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 712 | java | package gerenciador.engefourjunior.com.gerenciadorengefour;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import java.util.Timer;
import java.util.TimerTask;
public class SplashScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
new Timer().schedule(new TimerTask()
{
@Override
public void run() {
finish();
Intent it = new Intent(SplashScreen.this, MainActivity.class);
startActivity(it);
}
}, 3000);
}
}
| [
"[email protected]"
] | |
7051626ade731d5cdf23022461d58ed8b3a1d339 | 4902adfb7a5b6347121b0ea8e46a87e32b453981 | /app/src/main/java/com/weizhan/superlook/widget/banners/Transformer.java | 249fe17d5f4f43bb9807c526cf74a8ce28ef0ec8 | [] | no_license | cherry-cheng/PlayDemo | 5098cd8f8062fc267e26858114bdf1440b9c62de | d3d1b55f8c96f7d2f4b9393fb261cd088b04920e | refs/heads/master | 2020-04-06T09:58:49.223906 | 2018-11-19T10:51:25 | 2018-11-19T10:51:25 | 157,364,178 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,064 | java | package com.weizhan.superlook.widget.banners;
import android.support.v4.view.ViewPager.PageTransformer;
import com.weizhan.superlook.widget.banners.transformer.AccordionTransformer;
import com.weizhan.superlook.widget.banners.transformer.BackgroundToForegroundTransformer;
import com.weizhan.superlook.widget.banners.transformer.CubeInTransformer;
import com.weizhan.superlook.widget.banners.transformer.CubeOutTransformer;
import com.weizhan.superlook.widget.banners.transformer.DefaultTransformer;
import com.weizhan.superlook.widget.banners.transformer.DepthPageTransformer;
import com.weizhan.superlook.widget.banners.transformer.FlipHorizontalTransformer;
import com.weizhan.superlook.widget.banners.transformer.FlipVerticalTransformer;
import com.weizhan.superlook.widget.banners.transformer.ForegroundToBackgroundTransformer;
import com.weizhan.superlook.widget.banners.transformer.RotateDownTransformer;
import com.weizhan.superlook.widget.banners.transformer.RotateUpTransformer;
import com.weizhan.superlook.widget.banners.transformer.ScaleInOutTransformer;
import com.weizhan.superlook.widget.banners.transformer.StackTransformer;
import com.weizhan.superlook.widget.banners.transformer.TabletTransformer;
import com.weizhan.superlook.widget.banners.transformer.ZoomInTransformer;
import com.weizhan.superlook.widget.banners.transformer.ZoomOutSlideTransformer;
import com.weizhan.superlook.widget.banners.transformer.ZoomOutTranformer;
public class Transformer {
public static Class<? extends PageTransformer> Default = DefaultTransformer.class;
public static Class<? extends PageTransformer> Accordion = AccordionTransformer.class;
public static Class<? extends PageTransformer> BackgroundToForeground = BackgroundToForegroundTransformer.class;
public static Class<? extends PageTransformer> ForegroundToBackground = ForegroundToBackgroundTransformer.class;
public static Class<? extends PageTransformer> CubeIn = CubeInTransformer.class;
public static Class<? extends PageTransformer> CubeOut = CubeOutTransformer.class;
public static Class<? extends PageTransformer> DepthPage = DepthPageTransformer.class;
public static Class<? extends PageTransformer> FlipHorizontal = FlipHorizontalTransformer.class;
public static Class<? extends PageTransformer> FlipVertical = FlipVerticalTransformer.class;
public static Class<? extends PageTransformer> RotateDown = RotateDownTransformer.class;
public static Class<? extends PageTransformer> RotateUp = RotateUpTransformer.class;
public static Class<? extends PageTransformer> ScaleInOut = ScaleInOutTransformer.class;
public static Class<? extends PageTransformer> Stack = StackTransformer.class;
public static Class<? extends PageTransformer> Tablet = TabletTransformer.class;
public static Class<? extends PageTransformer> ZoomIn = ZoomInTransformer.class;
public static Class<? extends PageTransformer> ZoomOut = ZoomOutTranformer.class;
public static Class<? extends PageTransformer> ZoomOutSlide = ZoomOutSlideTransformer.class;
}
| [
"[email protected]"
] | |
eda3b842a7972f7348da6d88e470a26ee163387a | eb5af3e0f13a059749b179c988c4c2f5815feb0f | /eclipsecode/java_se/src/com/woniu/chapter12_Extends_workT_vhicle/Car.java | dc5feb980010d21c2337a0871efaeaaecc14cf55 | [] | no_license | xiakai007/wokniuxcode | ae686753da5ec3dd607b0246ec45fb11cf6b8968 | d9918fb349bc982f0ee9d3ea3bf7537e11d062a2 | refs/heads/master | 2023-04-13T02:54:15.675440 | 2021-05-02T05:09:47 | 2021-05-02T05:09:47 | 363,570,147 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 488 | java | package com.woniu.chapter12_Extends_workT_vhicle;
public class Car extends MotoVehicle {
private String type;
public Car(String no,String brand,String type) {
super(no,brand);
this.type = type;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public int calRent(int days) {
if("1".equals(type)) {
return days*500;
}else if("2".equals(type)) {
return days*600;
}else {
return days*300;
}
}
}
| [
"[email protected]"
] | |
03dfd9ac3966d78a7ec21c96d70f0ec1f92691b8 | 555e03a1387f5ae659e20c0f28093d93c276ec56 | /CreditCustomer_houduan/credit-server/src/test/java/com/yuminsoft/testClass.java | 057e9960ccb5065441fc5c5a87f08a8123004833 | [] | no_license | JacksonHSY/credit | 3a4aa63b8744742effcb696f79bb27a5aabae5f7 | 53bc34c389d4330798cc2dc046f7d2881078e54b | refs/heads/master | 2020-04-08T14:55:29.372751 | 2018-12-04T08:47:52 | 2018-12-04T08:47:52 | 159,457,670 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,811 | java | package com.yuminsoft;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.ymkj.base.core.biz.api.message.Response;
import com.ymkj.bms.biz.api.service.zdqq.apply.ILoanInfoInputExecuter;
import com.ymkj.cms.biz.api.service.app.IZDQQExecuter;
import com.ymkj.cms.biz.api.vo.request.app.Req_VO_700001;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.ymkj.credit.common.constants.Constants;
import com.ymkj.credit.common.entity.ApplyLoanInfo;
import com.ymkj.credit.common.entity.ApplyPicInfo;
import com.ymkj.credit.mapper.ApplyPicInfoMapper;
import com.ymkj.credit.service.ApplyInfoService;
import com.ymkj.credit.service.ApplyLoanInfoService;
import com.ymkj.credit.service.LoanOrderService;
import com.ymkj.credit.service.SignLcbService;
import com.ymkj.credit.service.SignService;
import com.ymkj.credit.web.api.model.Result;
import com.ymkj.credit.web.api.model.base.Model_002025;
import com.ymkj.credit.web.api.model.base.Model_004009;
import com.ymkj.credit.web.api.model.base.Model_004011;
import com.ymkj.credit.web.api.model.base.Model_005001;
import com.ymkj.credit.web.api.model.base.Model_005002;
import com.ymkj.credit.web.api.model.base.Model_005003;
import com.ymkj.credit.web.api.model.base.Model_005005;
import com.ymkj.credit.web.api.model.base.Model_005013;
import com.ymkj.credit.web.api.model.base.Model_005014;
import com.ymkj.credit.web.api.model.base.Model_005015;
import com.ymkj.credit.web.api.model.base.Model_006001;
import com.ymkj.credit.web.api.model.base.Model_006002;
import com.ymkj.dms.api.enums.EnumConstants.applyMaintainFlag;
import com.ymkj.rule.biz.api.message.MapResponse;
import com.ymkj.rule.biz.api.message.RuleEngineRequest;
import com.ymkj.rule.biz.api.service.IRuleEngineExecuter;
import com.ymkj.rule.biz.api.vo.zdqq.ZDQQApplyRuleExecVo;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath*:spring/spring-context.xml"})
@ActiveProfiles("dev")
public class testClass {
@Autowired
public SignService signService;
@Autowired
public ApplyInfoService apply;
@Autowired
ApplyPicInfoMapper applypicinfomapper;
@Autowired
public IZDQQExecuter iZdqqExecuter;
private Gson gson = new Gson();
@Autowired
ILoanInfoInputExecuter iloanInfoInputExecuter;
@Autowired
IRuleEngineExecuter iRuleEngineExecuter;
@Autowired
LoanOrderService loanOrderService;
@Autowired
SignLcbService signLcbService;
@Test
public void clientSinature(){
Model_002025 model = new Model_002025();
model.setLoanNo("20161115170000166690");
signService.clientSinature(model);
}
/**
* 查询是否可以借款
*/
@Test
public void checkLoan(){
Model_005001 model = new Model_005001();
model.setIdCard("12315412315");
apply.checkLoan(model);
}
/**
* 查询借款申请
*/
@Test
public void checkCreditInfo(){
Model_005003 info = new Model_005003();
info.setIdCard("110101198208048158");
info.setFieldKey("applyInfo");
apply.checkCreditInfo(info);
}
@Test
public void queryNodeInfo(){
Model_005005 model = new Model_005005();
model.setIdCard("110101198208048158");
model.setFieldKey(Constants.PERSIONINFO);
model.setLoanNo("201807262B8565");
Result r = apply.queryNodeInfo(model);
System.out.println(gson.toJson(r));
}
/**
*运营平台
* */
@Test
public void testinit(){
Req_VO_700001 req = new Req_VO_700001();
req.setSysCode("zdqq");
req.setNodeCode(Constants.APPLYINFO);
Response response = iZdqqExecuter.initField(req);
System.out.println("数据"+gson.toJson(response.getData()));
}
/**
* 录单
*
* */
@Test
public void testLUdan(){
//录单获取借款编号接口
/*Model_005002 model = new Model_005002();
com.alibaba.fastjson.JSONObject ApplyInfoVo = new com.alibaba.fastjson.JSONObject();
ApplyInfoVo.put("applyLmt", "10000");
ApplyInfoVo.put("applyTerm", "00003");
ApplyInfoVo.put("branchManagerCode", "110");
ApplyInfoVo.put("creditApplication", "00006");
ApplyInfoVo.put("monthMaxRepay", "2000");
model.setIdCard("320321199008186511");
model.setFieldValue(ApplyInfoVo.toJSONString());
apply.CreditInfo(model);*/
/*Model_005003 model = new Model_005003();//查询基本信息接口调试
model.setIdCard("310110198005245419");
model.setLoanNo("20180731185CF3");
com.alibaba.fastjson.JSONObject ApplyInfoVo = new com.alibaba.fastjson.JSONObject();
ApplyInfoVo.put("idNo", model.getIdCard());
ApplyInfoVo.put("loanNo", model.getLoanNo());
Response<com.alibaba.fastjson.JSONObject> response = iloanInfoInputExecuter.queryApplyInfo(ApplyInfoVo);
String loanNoObj =response.getData()==null?"":String.valueOf(response.getData());*/
/*Model_005014 model = new Model_005014();//推送录单接口调试
model.setLoanNo("2018073149A7ED");
apply.pushToBms(model);*/
/*Model_005013 model = new Model_005013();//图片删除
model.setFileId("19110982");
apply.deletePicture(model);*/
/*String loanNo = "20180810F8EC15";//分布查询接口
String idNo = "110101198208048361";
com.alibaba.fastjson.JSONObject ApplyInfoVo = new com.alibaba.fastjson.JSONObject();
ApplyInfoVo.put("loanNo", loanNo);
ApplyInfoVo.put("idNo", idNo);
Response<com.alibaba.fastjson.JSONObject> response = iloanInfoInputExecuter.queyBaseInformation(ApplyInfoVo);
String loanNoObj =response.getData()==null?"":String.valueOf(response.getData());*/
String loanNo = "20180810F8EC15";//进度查询
String idNo = "110101198208048361";
Model_004009 model = new Model_004009();
model.setCustomerId("87");
apply.selectByProcess(model);
}
@Test
public void rrr(){
for (int i = 0; i < 20; i++) {
IdCardGenerator id = new IdCardGenerator();
com.alibaba.fastjson.JSONObject ApplyInfoVo = new com.alibaba.fastjson.JSONObject();
String idCard = id.getRandomID();
ApplyInfoVo.put("idNo", idCard);
ApplyInfoVo.put("applyInfoValue","{\"applyLmt\":\"800000\",\"applyTerm\":\"24\",\"branchManagerCode\":\"hwt\",\"creditApplication\":\"00001\",\"loanNo\":\"\",\"monthMaxRepay\":\"5000\"}");
ApplyInfoVo.put("loanNo", "");
Response<com.alibaba.fastjson.JSONObject> response = iloanInfoInputExecuter.saveApplyInfo(ApplyInfoVo);
//借款编号由录单给到
if(response.isSuccess()){
String loanNo =net.sf.json.JSONObject.fromObject(response.getData()).getString("loanNo");
String str = "{\"baseInfo\":{\"applyInfo\":{\"applyLmt\":\"800000\",\"applyTerm\":\"24\",\"branchManagerCode\":\"hwt\",\"creditApplication\":\"00001\",\"loanNo\":\""+loanNo+"\",\"monthMaxRepay\":\"5000\"},\"loanNo\":\""+loanNo+"\",\"persionInfo\":{\"age\":\"12\",\"cellphone\":\"13142563789\",\"cellphoneSec\":\"13412534678\",\"email\":\"[email protected]\",\"gender\":\"M\",\"home\":\"530000,530500,530524\",\"homeAddress\":\"多次发出\",\"homePhone1\":\"010-1234567\",\"homeSameRegistered\":\"1\",\"homeText\":\"云南省,保山市,昌宁县\",\"idIssuerAddress\":\"对方尴尬\",\"idNo\":\""+idCard+"\",\"issuer\":\"530000,530500,530524\",\"issuerText\":\"云南省,保山市,昌宁县\",\"maritalStatus\":\"00002\",\"name\":\"刘祥一"+i+"\",\"qqNum\":\"12555\",\"qualification\":\"00002\",\"wechatNum\":\"12355\"},\"empItemInfo\":{\"corp\":\"220000,220800,220882\",\"corpAddress\":\"和 vv 成分丰富\",\"corpDepapment\":\"的方法\",\"corpName\":\"今年年内\",\"corpPayWay\":\"00002\",\"corpPayday\":\"12\",\"corpPhone\":\"010-1234567\",\"corpPhoneSec\":\"010-3214567\",\"corpPost\":\"00006\",\"corpStandFrom\":\"2015-08\",\"corpStructure\":\"00001\",\"corpText\":\"吉林省,白城市,大安市\",\"corpType\":\"00005\",\"monthAmt\":\"123\",\"occupation\":\"00006\",\"payBank\":\"中国银行\",\"priEnterpriseType\":\"00003\",\"registerFunds\":\"1234\",\"setupDate\":\"1995-08\",\"sharesScale\":\"12\",\"takeHomePay\":\"1234\",\"totalMonthSalary\":\"123\"},\"mateInfo\":{\"contactCellphone\":\"15314286780\",\"contactCorpPhone\":\"010-33565432\",\"contactEmpName\":\"哥哥哥哥\",\"contactIdNo\":\"320324199012543201\",\"contactName\":\"法国环境\",\"ifForeignPenple\":\"1\",\"ifKnowLoan\":\"1\",\"sequenceNum\":\"0\",\"unabridged\":\"Y\"},\"creditAccountInfo\":{\"creditName\":\"12346\",\"creditPassword\":\"12345\",\"verificationCode\":\"12546\",\"unabridged\":\"Y\"},\"educationInfo\":{\"area\":\"520000,520400\",\"areaText\":\"贵州省,安顺市\",\"educationExperience\":\"00001\",\"graduationDate\":\"2018-08-10\",\"qualification\":\"00002\",\"schoolName\":\"错过后悔\",\"chsiAccount\":\"1234\",\"chsiPassword\":\"123\",\"certificateNumber\":\"1524\",\"unabridged\":\"Y\"},\"merchantLoanInfo\":{\"IsOpenLoan\":\"0\",\"borrowLimit\":\"20000\",\"buyerCreditLevel\":\"A\",\"buyerCreditType\":\"A\",\"consumptionSum\":\"451\",\"costLimit\":\"450\",\"isOpenCost\":\"1\",\"memberName\":\"今天\",\"naughtyValue\":\"450\",\"sesameCreditValue\":\"450\",\"unabridged\":\"Y\"},\"assetsInfo\":{\"eatateSameRegistered\":\"1\",\"estate\":\"640000,640400,640423\",\"estateAddress\":\"今天\",\"estateBuyDate\":\"2018-08-10\",\"estateLoan\":\"ING\",\"estateLoanAmt\":\"1334\",\"estateLoanIssueDate\":\"2018-08\",\"estateText\":\"宁夏回族自治区,固原市,隆德县\",\"estateType\":\"00001\",\"isCommon\":\"1\",\"monthPaymentAmt\":\"1313\",\"unabridged\":\"Y\"},\"carInfo\":{\"carBuyDate\":\"2018-08\",\"carBuyPrice\":\"2508\",\"carLoanIssueDate\":\"2018-08\",\"carLoanOrg\":\"今天早上\",\"carLoanStatus\":\"ING\",\"monthPaymentAmt\":\"3161\",\"plateNum\":\"宁A12345\",\"tciCompany\":\"玩\",\"unabridged\":\"Y\"},\"providentInfo\":{\"accumulationFundAccount\":\"1234\",\"accumulationFundPassword\":\"11222\",\"unabridged\":\"Y\"},\"insuranceInfo\":{\"socialInsuranceAccount\":\"124884\",\"socialInsurancePassword\":\"1344\",\"unabridged\":\"Y\"},\"cardLoanInfo\":{\"unabridged\":\"N\"},\"residenceInfo\":{\"unabridged\":\"N\"},\"policyInfo\":[{\"insuranceCompany\":\"00019\",\"insuranceDate\":\"2018-08\",\"paymentMethod\":\"Y\",\"sequenceNum\":\"0\",\"tab\":\"0\",\"paymentMoney\":\"123\",\"policyAccount\":\"123\",\"policyPassword\":\"23\",\"unabridged\":\"Y\"},{\"insuranceCompany\":\"00018\",\"insuranceDate\":\"2018-08\",\"paymentMethod\":\"Y\",\"sequenceNum\":\"0\",\"tab\":\"0\",\"paymentMoney\":\"123\",\"policyAccount\":\"123\",\"policyPassword\":\"23\",\"unabridged\":\"Y\"},{\"insuranceCompany\":\"00017\",\"insuranceDate\":\"2018-08\",\"paymentMethod\":\"Y\",\"sequenceNum\":\"0\",\"tab\":\"0\",\"paymentMoney\":\"123\",\"policyAccount\":\"123\",\"policyPassword\":\"23\",\"unabridged\":\"Y\"}],\"contactPersonInfo\":[{\"contactCellphone\":\"13122321091\",\"contactCorpPhone\":\"010-3214567\",\"contactEmpName\":\"韩版包包\",\"contactName\":\"江河湖海\",\"contactRelation\":\"00001\",\"ifKnowLoan\":\"1\",\"sequenceNum\":\"0\",\"unabridged\":\"Y\"},{\"contactCellphone\":\"12345678911\",\"contactCorpPhone\":\"010-2314567\",\"contactEmpName\":\"沟沟壑壑\",\"contactName\":\"风风光光\",\"contactRelation\":\"00002\",\"ifKnowLoan\":\"1\",\"sequenceNum\":\"1\",\"unabridged\":\"Y\"},{\"contactCellphone\":\"12546789013\",\"contactCorpPhone\":\"010-1325617\",\"contactEmpName\":\"你爸爸\",\"contactName\":\"其实方法\",\"contactRelation\":\"00002\",\"ifKnowLoan\":\"1\",\"sequenceNum\":\"2\",\"unabridged\":\"Y\"},{\"contactCellphone\":\"13485796314\",\"contactCorpPhone\":\"010-65678432\",\"contactEmpName\":\"反反复复\",\"contactName\":\"黑板报\",\"contactRelation\":\"00003\",\"ifKnowLoan\":\"1\",\"sequenceNum\":\"3\",\"unabridged\":\"Y\"}]}}";
//开始推送录单
Response<com.alibaba.fastjson.JSONObject> response1 = iloanInfoInputExecuter.saveBaseInformation(JSONObject.parseObject(str));
System.out.println(String.valueOf(response1.getData()));
}
}
}
@Test
public void insert(){
ApplyPicInfo pic = new ApplyPicInfo();
pic.setFieldKey("444");
pic.setPicId("111");
pic.setStatus("1");
pic.setPicUrl("wertwert");
pic.setImgName("sdfsdf");
applypicinfomapper.insert(pic);
}
@Test
public void gz(){
//ruleAppSevice.validate(name, idCardNo);
ZDQQApplyRuleExecVo vo = new ZDQQApplyRuleExecVo();
vo.setIdNo("110101198208048158");
vo.setExecuteType(Constants.RULE_NODE_SQ);
RuleEngineRequest rr = new RuleEngineRequest();
rr.setData(vo);
rr.setBizType(Constants.ZDQQAPPLY);
rr.setSysCode(Constants.ZDQQ_SYS_CODE);
com.ymkj.rule.biz.api.message.Response ruleResponse = iRuleEngineExecuter.executeRuleEngine(rr);
//MapResponse map = (MapResponse) ruleResponse;
Map<String, Object> map = ((MapResponse) ruleResponse).getMap();
System.out.println(map.get("action"));
}
@Test
public void code(){
Model_004011 model = new Model_004011();
model.setOperatorCode("hwt");
loanOrderService.queryOperator(model);
}
@Test
public void ruleCheck(){
//apply.ruleCheck("2018080899B7FF");
}
//-Dglobal.config.path="D:\yumin_object\tomcat7.0\CreditCustomer_houduan\credit-server\src\main\resources\resource"
/**
* 验证码校验
*/
@Test
public void verification(){
Model_006001 model = new Model_006001();
model.setCellPhone("13122301151");
signLcbService.VerificationCode(model);
}
/**
* 注册登录
*/
@Test
public void RegisterLogin(){
Model_006002 model = new Model_006002();
model.setCellPhone("13122301091");
model.setValidateCode("1234");
signLcbService.RegisterLogin(model);
}
@Test
public void isCheckLoan(){
//apply.isCheckLoan("320321199105163210");
}
//-Dglobal.config.path="D:\yumin_object\tomcat7.0\CreditCustomer_houduan\credit-server\src\main\resources\resource"
}
| [
"[email protected]"
] | |
6e7de8a12a4c7d37d050f6031ebaa639823392d2 | 003c5c763306eb26d7f01dd6530a0cff54cfc6f5 | /src/main/java/consumer/ConsumerStringSASL.java | 779d8824083d733ab4cfbb5e3a808b0b5ab5a088 | [] | no_license | HerveRiviere/kafka-examples | 16f8e2c03a037b26306875ca7b764b7fb3564bad | f82187f89d305a9d47d4814f622fac22e15984ed | refs/heads/master | 2021-06-13T08:19:26.100951 | 2017-02-25T22:57:28 | 2017-02-25T22:57:28 | 79,327,758 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,933 | java | package consumer;
import org.apache.kafka.clients.consumer.*;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.serialization.StringDeserializer;
import java.util.*;
public class ConsumerStringSASL {
public static void main(String[] args) {
Properties props = new Properties();
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9093");//SASL-PLAINTEXT
props.put(ConsumerConfig.GROUP_ID_CONFIG, "my_group");
props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "true");
props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "1000");
props.put("security.protocol", "SASL_PLAINTEXT");
props.put("sasl.mechanism", "PLAIN");
props.put("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username=alice password=alice-secret;");
props = ConsumerConfig.addDeserializerToConfig(props, new StringDeserializer(), new StringDeserializer());
List<String> topics_to_consume = Arrays.asList("my-topic");
KafkaConsumer<String, String> consumer = null;
try {
consumer = new KafkaConsumer<>(props);
consumer.subscribe(topics_to_consume);
consumer.poll(0);
HashMap<TopicPartition, Long> timePartition = new HashMap<TopicPartition, Long>();
//Look at all assignated partitions
Iterator<TopicPartition> partitions = consumer.assignment().iterator();
while (partitions.hasNext()) {
TopicPartition partition = partitions.next();
System.out.println(String.format("Got partition %d assignated from topic : %s", partition.partition(), partition.topic()));
timePartition.put(partition, 0L);//seek earliest offet
}
//Go to earliest offset for each partition
Iterator<Map.Entry<TopicPartition, OffsetAndTimestamp>> offsets = consumer.offsetsForTimes(timePartition).entrySet().iterator();
while (offsets.hasNext()) {
Map.Entry<TopicPartition, OffsetAndTimestamp> offset = offsets.next();
System.out.println(String.format("Consumer will go to : Topic %s partition %d : offset : %d", offset.getKey().topic(), offset.getKey().partition(), offset.getValue().offset()));
consumer.seek(offset.getKey(), offset.getValue().offset());
}
//Consume message
while (true) {
ConsumerRecords<String, String> records = consumer.poll(100);
for (ConsumerRecord<String, String> record : records)
System.out.printf("offset = %d, key = %s, partition = %s, value = %s timestamp = %s \n", record.offset(), record.key(), record.partition(), record.value(), new Date(record.timestamp()).toString());
}
} finally {
consumer.close();
}
}
}
| [
"[email protected]"
] | |
75cf69de9866b0db3ad41eaa914917cbb219de3e | 760508a4d9eb914f84ad747428651ae44b7f81e0 | /FinalProject_fourMyung/src/main/java/fourMyung/Command/KaKaoPayReadyCommand.java | 3c35c561a9a0940691e77a67c2c1fc929c727adc | [] | no_license | Choiyunsuk92/FourMyung_Project | 81e1e3d2fa26b3815ab29b1bf9be9f9dd1d58efc | 61d50995782928901f76888070e317e7724e87ee | refs/heads/master | 2023-01-08T17:18:55.609247 | 2020-11-12T07:07:51 | 2020-11-12T07:07:51 | 297,205,592 | 0 | 0 | null | 2020-10-12T06:58:57 | 2020-09-21T02:15:23 | HTML | UTF-8 | Java | false | false | 197 | java | package fourMyung.Command;
import java.util.Date;
import lombok.Data;
@Data
public class KaKaoPayReadyCommand {
private String tid, next_redirect_pc_url;
private Date created_at;
}
| [
"사용자@LAPTOP-9IFJ2FT0"
] | 사용자@LAPTOP-9IFJ2FT0 |
3acd8b2982ab497bc42722a7f61cc6571533f741 | 3e0672e5210aa493a1d4ac04a33d2575253d3712 | /java_odev3/src/java_odev3/UserManager.java | d4c71c262bb2ed44cc9101839e9cfdfc063f3f17 | [] | no_license | DenizOthan/java_homework | 85e54cc6530d8f54e1bdc3ac9f33dfd15a51a380 | aa9dcdfb07796dc611a85ce11fe58e5d90cfa956 | refs/heads/main | 2023-04-20T00:31:13.353122 | 2021-05-07T14:56:21 | 2021-05-07T14:56:21 | 364,638,084 | 3 | 1 | null | null | null | null | ISO-8859-9 | Java | false | false | 194 | java | package java_odev3;
public class UserManager {
public void addUser(User user) {
System.out.printf("DENİZ OTHAN SİSTEME KAYIT OLDU.\n", user.getFullName());
}
} | [
"[email protected]"
] | |
fea96420554e494cbb5907c0ee0f7168caa764be | 1bfc2e248ad676544061618628d1f554a616002c | /Week2lab_programs/ReversePyramid.java | 493a73862a62d2c5521f88dcb50f250668611bab | [] | no_license | irfanjava21/fullstacktraining | 26731a09fd07ed562e2569cb381f91ff8e6bff8a | 905000bdead7f8b3e954bf643b7e8897744651be | refs/heads/main | 2023-06-14T12:27:03.709523 | 2021-07-11T06:47:43 | 2021-07-11T06:47:43 | 384,879,081 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 388 | java | package lab_programs;
import java.util.Scanner;
public class ReversePyramid {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Please enter the height of pyramid");
int n = scan.nextInt();
for(int i=0;i<=n;i++) {
for(int j=n-i;j>0;j--) {
System.out.print('*');
}
System.out.println("");
}
}
}
| [
"[email protected]"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.