팩토리 클래스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
삼성 및 Google 팩토리 클래스를 사용하여 ResellerService
객체를 만듭니다.
ResellerService
객체를 사용하면 일반적인 메서드 세트를 사용하여 Samsung 및 기타 Android 기기를 소유권 주장하고 등록할 수 있습니다.
SamsungResellerServiceFactory
SamsungResellerServiceFactory
클래스를 사용하여 ResellerService
객체를 생성하려면 먼저 KDP에 온보딩해야 합니다.
다음은 SamsungResellerServiceFactory
클래스를 사용하여 ResellerService
객체를 만드는 메서드 서명입니다.
public static ResellerService createResellerService(String resellerId, String serviceAccountKeyFilePath, String clientIdentifier) throws CommonException;
속성 이름 |
값 |
필수 |
설명 |
resellerId |
string |
예 |
KDP 시스템에서 제공하는 리셀러의 고유 식별자입니다. |
serviceAccountKeyFilePath |
string |
예 |
서비스 계정 키의 파일 경로입니다. |
clientIdentifier |
string |
예 |
KDP 시스템에서 제공하는 클라이언트 식별자입니다. |
오류 동작
오류가 발생하면 라이브러리는 다음 오류 코드 중 하나가 포함된 CommonException
를 발생시킵니다.
오류 코드 |
INVALID_RESELLER_ID |
AUTHORIZATION_FAIL |
GoogleResellerServiceFactory
GoogleResellerServiceFactory
클래스를 사용하여 ResellerService
객체를 생성하려면 먼저 리셀러로 제로터치 등록을 온보딩해야 합니다.
다음은 GoogleResellerServiceFactory
클래스를 사용하여 ResellerService
객체를 만드는 메서드 서명입니다.
public static ResellerService createResellerService(long resellerId, String serviceAccountKeyFilePath) throws CommonException, InterruptedException;
속성 이름 |
값 |
필수 |
설명 |
resellerId |
long |
예 |
리셀러의 고유 식별자(제로터치 시스템에서 제공한 값) |
serviceAccountKeyFilePath |
string |
예 |
서비스 계정 키의 파일 경로입니다. |
오류 동작
오류가 발생하면 라이브러리는 다음 오류 코드 중 하나가 포함된 CommonException
를 발생시킵니다.
오류 코드 |
INVALID_PARAM_DEFAULT |
INVALID_RESELLER_ID |
INTERNAL_SERVER_ERROR |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003e\u003ccode\u003eResellerService\u003c/code\u003e objects, created using Samsung and Google factory classes, enable claiming and enrolling Samsung and other Android devices.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSamsungResellerServiceFactory\u003c/code\u003e requires onboarding with KDP and uses \u003ccode\u003eresellerId\u003c/code\u003e, \u003ccode\u003eserviceAccountKeyFilePath\u003c/code\u003e, and \u003ccode\u003eclientIdentifier\u003c/code\u003e to create a \u003ccode\u003eResellerService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGoogleResellerServiceFactory\u003c/code\u003e requires onboarding with zero-touch enrollment and uses \u003ccode\u003eresellerId\u003c/code\u003e and \u003ccode\u003eserviceAccountKeyFilePath\u003c/code\u003e to create a \u003ccode\u003eResellerService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBoth factories throw a \u003ccode\u003eCommonException\u003c/code\u003e when errors occur, with specific error codes like \u003ccode\u003eINVALID_RESELLER_ID\u003c/code\u003e and \u003ccode\u003eAUTHORIZATION_FAIL\u003c/code\u003e for Samsung and \u003ccode\u003eINVALID_PARAM_DEFAULT\u003c/code\u003e and \u003ccode\u003eINTERNAL_SERVER_ERROR\u003c/code\u003e for Google.\u003c/p\u003e\n"]]],["`ResellerService` objects are created using `SamsungResellerServiceFactory` or `GoogleResellerServiceFactory` classes. Each factory requires onboarding as a reseller and uses a unique `resellerId` and `serviceAccountKeyFilePath`. Samsung's factory also needs a `clientIdentifier`. `ResellerService` objects offer methods for device management. Errors trigger a `CommonException` with specific codes, like `INVALID_RESELLER_ID` or `AUTHORIZATION_FAIL` for Samsung and `INVALID_PARAM_DEFAULT` or `INTERNAL_SERVER_ERROR` for Google.\n"],null,["# Factory classes\n\nUse the Samsung and Google factory classes to create `ResellerService` objects.\nWith `ResellerService` objects, a common set of [methods](/zero-touch/reseller-library/reference/methods)\nis available to claim and enroll Samsung and other Android devices.\n\nSamsungResellerServiceFactory\n-----------------------------\n\nBefore you can use the `SamsungResellerServiceFactory` class to generate a\n`ResellerService` object, you need to [onboard with KDP](/zero-touch/guides/reseller-library/get-started#knox_deployment_program).\nBelow is the method signature for creating a `ResellerService` object using the\n`SamsungResellerServiceFactory` class: \n\n public static ResellerService createResellerService(String resellerId, String serviceAccountKeyFilePath, String clientIdentifier) throws CommonException;\n\n### Input parameters\n\n| Property name | Value | Required | Description |\n|-----------------------------|----------|----------|-----------------------------------------------------------|\n| `resellerId` | `string` | Yes | Reseller's unique identifier, provided by the KDP system. |\n| `serviceAccountKeyFilePath` | `string` | Yes | File path to the service account key. |\n| `clientIdentifier` | `string` | Yes | Client identifier provided by the KDP system. |\n\n### Error behavior\n\nWhen an error occurs, the library throws a\n[`CommonException`](/zero-touch/reseller-library/reference/objects#commonexception)\ncontaining one of the following error codes:\n\n| Error code |\n|-----------------------|\n| `INVALID_RESELLER_ID` |\n| `AUTHORIZATION_FAIL` |\n\nGoogleResellerServiceFactory\n----------------------------\n\nBefore you can use the `GoogleResellerServiceFactory` class to generate a\n`ResellerService` object, you must [onboard to zero-touch enrollment](/zero-touch/guides/reseller-library/get-started#zero-touch_enrollment)\nas a reseller.\n\nHere's the method signature for creating a `ResellerService` object using the\n`GoogleResellerServiceFactory` class: \n\n public static ResellerService createResellerService(long resellerId, String serviceAccountKeyFilePath) throws CommonException, InterruptedException;\n\n### Input parameters\n\n| Property name | Value | Required | Description |\n|-----------------------------|----------|----------|------------------------------------------------------------------|\n| `resellerId` | `long` | Yes | Reseller's unique identifier, provided by the zero-touch system. |\n| `serviceAccountKeyFilePath` | `string` | Yes | File path to the service account key. |\n\n### Error behavior\n\nWhen an error occurs, the library throws a\n[`CommonException`](/zero-touch/reseller-library/reference/objects#commonexception)\ncontaining one of the following error codes:\n\n| Error code |\n|-------------------------|\n| `INVALID_PARAM_DEFAULT` |\n| `INVALID_RESELLER_ID` |\n| `INTERNAL_SERVER_ERROR` |"]]