VirtualDeploymentRepository resolveVirtualDeploymentRepository(MutableProfile profile) { if(profile instanceof VirtualDeploymentRepositoryExt) { return VirtualDeploymentRepositoryExt.class.cast(profile).getDeploymentRepository(); } return null; }
/** * Cast to VirtualDeploymentRepositoryExt * * @param profile the mutable profile * @return the virtual deployment repository */ static VirtualDeploymentRepository resolveDeploymentRepository(MutableProfile profile) { if(profile instanceof VirtualDeploymentRepositoryExt == false) { throw new IllegalStateException("Failed to get the deployment repository for profile " + profile.getKey()); } return VirtualDeploymentRepositoryExt.class.cast(profile).getDeploymentRepository(); }