Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ subprojects { project ->
targetCompatibility = JavaVersion.toVersion('1.11')
}
}
if(project.name != 'morpheus-plugin-docs' && project.name != 'morpheus-plugin-site' && project.name != 'samples' && !project.name.endsWith('plugin') && project.name != 'vendor') {
if(project.name != 'morpheus-plugin-docs' && project.name != 'morpheus-plugin-site' && project.name != 'samples' && project.name != 'morpheus-system-example' && !project.name.endsWith('plugin') && project.name != 'vendor') {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2024 Morpheus Data, LLC.
*
* Licensed under the PLUGIN CORE SOURCE LICENSE (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://raw.githubusercontent.com/gomorpheus/morpheus-plugin-core/v1.0.x/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.morpheusdata.core.network;

import com.morpheusdata.core.MorpheusDataService;
import com.morpheusdata.core.MorpheusIdentityService;
import com.morpheusdata.model.AccountIntegration;
import com.morpheusdata.model.Cloud;
import com.morpheusdata.model.NetworkLocation;
import com.morpheusdata.model.projection.NetworkLocationIdentityProjection;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Single;

import java.util.Collection;
import java.util.List;

/**
* This Context deals with interactions related to {@link com.morpheusdata.model.NetworkLocation} objects. It can normally
* be accessed via the primary {@link com.morpheusdata.core.MorpheusContext} via the {@link MorpheusNetworkService}
* Network Locations represent geographic or logical locations associated with networks and cloud resources.
*
* <p><strong>Examples:</strong></p>
* <pre>{@code
* morpheusContext.getNetwork().getNetworkLocation()
* }</pre>
*
* @see MorpheusNetworkService
* @author Jordon Saardchit
*/
public interface MorpheusNetworkLocationService extends MorpheusDataService<NetworkLocation, NetworkLocationIdentityProjection>, MorpheusIdentityService<NetworkLocationIdentityProjection> {

}

Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ public interface MorpheusNetworkService extends MorpheusDataService<Network, Net
*/
MorpheusNetworkGroupService getNetworkGroup();

/**
* Returns the {@link MorpheusNetworkLocationService} used for performing updates/queries on {@link NetworkLocation} related assets
* within Morpheus
* @return An Instance of the {@link MorpheusNetworkLocationService}
*/
MorpheusNetworkLocationService getLocation();

/**
* Used for updating the status of a {@link NetworkPoolServer} integration.
* @param poolServer the pool integration with which we want to update the status.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright 2024 Morpheus Data, LLC.
*
* Licensed under the PLUGIN CORE SOURCE LICENSE (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://raw.githubusercontent.com/gomorpheus/morpheus-plugin-core/v1.0.x/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.morpheusdata.core.providers;

import java.util.Map;

/**
* Abstract implementation of {@link InputTypeLibraryProvider} that provides
* common functionality for loading JavaScript library files.
*
* <p>
* This class handles the automatic resolution of script paths to the plugin's
* asset directory structure.
* </p>
*
* <p>
* <strong>Example Implementation:</strong>
* </p>
*
* <pre>{@code
* public class CustomInputTypeLibraryProvider extends AbstractInputTypeLibraryProvider {
*
* @Override
* public String getCode() {
* return "custom-input-types";
* }
*
* @Override
* public String getName() {
* return "Custom Input Types Library";
* }
*
* @Override
* public String getLibraryScriptPath(Map<String, Object> opts) {
* return "/js/custom-input-types.js";
* }
* }
* }</pre>
*
* @author Andy Warner
* @since 1.2.6
*/
public abstract class AbstractInputTypeLibraryProvider implements InputTypeLibraryProvider {

/**
* Returns the full URL path to the library script, including the plugin asset
* prefix.
* This method automatically prepends the plugin asset path to the relative
* script path.
*
* <p>
* For example, if the plugin name is "My Plugin" and the library script path is
* {@code "/js/custom-input-types.js"}, this method returns:
* </p>
* <p>
* {@code "/assets/plugin/my-plugin/js/custom-input-types.js"}
* </p>
*
* @param opts optional parameters
* @return the full URL path to the library script
*/
public String getResolvedLibraryScriptPath(Map<String, Object> opts) {
String scriptPath = getLibraryScriptPath(opts);
if (scriptPath != null) {
if (!scriptPath.startsWith("/")) {
scriptPath = "/" + scriptPath;
}
String pluginName = getPlugin().getName().toLowerCase().replace(" ", "-");
return "/assets/plugin/" + pluginName + scriptPath;
}
return null;
}

}
Loading
Loading