exceptionfactory commented on code in PR #6504:
URL: https://github.com/apache/nifi/pull/6504#discussion_r1012362913


##########
nifi-nar-bundles/nifi-asana-bundle/nifi-asana-services/src/main/java/org/apache/nifi/controller/asana/StandardAsanaClientProviderService.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.controller.asana;
+
+import com.asana.Client;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnEnabled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.resource.ResourceCardinality;
+import org.apache.nifi.components.resource.ResourceType;
+import org.apache.nifi.controller.AbstractControllerService;
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.processor.util.StandardValidators;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import static 
org.apache.nifi.controller.asana.StandardAsanaClient.ASANA_CLIENT_OPTION_BASE_URL;
+
+@CapabilityDescription("Common service to authenticate with Asana, and to work 
on a specified workspace.")
+@Tags({"asana", "service", "authentication"})
+public class StandardAsanaClientProviderService extends 
AbstractControllerService implements AsanaClientProviderService {
+
+    protected static final String ASANA_API_URL = "asana-api-url";
+    protected static final String ASANA_PERSONAL_ACCESS_TOKEN = 
"asana-personal-access-token";
+    protected static final String ASANA_WORKSPACE_NAME = 
"asana-workspace-name";
+
+    protected static final PropertyDescriptor PROP_ASANA_API_BASE_URL = new 
PropertyDescriptor.Builder()
+            .name(ASANA_API_URL)
+            .displayName("API URL")
+            .description("Base URL of Asana API. Leave it as default, unless 
you have your own Asana instance "
+                    + "serving on a different URL. (typical for on-premise 
installations)")
+            .required(true)
+            
.defaultValue(Client.DEFAULTS.get(ASANA_CLIENT_OPTION_BASE_URL).toString())
+            .identifiesExternalResource(ResourceCardinality.SINGLE, 
ResourceType.URL)

Review Comment:
   This attribute should be removed, as the External Resource feature is used 
for retrieving content, not for referencing a URL.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to