Tabnine Logo
KieServerTypePermission
Code IndexAdd Tabnine to your IDE (free)

How to use
KieServerTypePermission
in
org.kie.server.api.marshalling.xstream

Best Java code snippets using org.kie.server.api.marshalling.xstream.KieServerTypePermission (Showing top 6 results out of 315)

origin: kiegroup/droolsjbpm-integration

public KieServerTypePermission(Set<Class<?>> classes) {
  super(patterns());
  this.classes = classes == null ? new HashSet<>() : classes;
}
origin: kiegroup/droolsjbpm-integration

@Test
public void testExplicitlyGivenClasses() {
  Set<Class<?>> classes = new HashSet<>();
  classes.add(Top.class);
  KieServerTypePermission permission = new KieServerTypePermission(classes);
  
  assertTrue(permission.allows(Top.class));
  
}

origin: kiegroup/droolsjbpm-integration

this.xstream.denyTypes(voidDeny);
this.xstream.addPermission(new KieServerTypePermission(classes));
origin: kiegroup/droolsjbpm-integration

  @Test
  public void testSystemPropertyGivenClasses() {
    System.setProperty(SYSTEM_XSTREAM_ENABLED_PACKAGES, "org.kie.server.api.marshalling.objects.Top,org.kie.server.api.marshalling.objects.Message");
    
    Set<Class<?>> classes = new HashSet<>();    
    KieServerTypePermission permission = new KieServerTypePermission(classes);
    
    assertTrue(permission.allows(Top.class));
    assertTrue(permission.allows(Message.class));
    assertFalse(permission.allows(AnotherMessage.class));
  }
}
origin: kiegroup/droolsjbpm-integration

@Test
public void testDefaultAcceptableClasses() {
  
  KieServerTypePermission permission = new KieServerTypePermission(new HashSet<>());
  
  assertTrue(permission.allows(KieContainerResource.class));
  assertTrue(permission.allows(ProcessDefinition.class));
  assertTrue(permission.allows(EmailNotification.class));
  assertTrue(permission.allows(CaseDefinition.class));
  assertTrue(permission.allows(DMNModelInfo.class));
}

origin: kiegroup/droolsjbpm-integration

@Test
public void testDefaultForbiddenClasses() {
  
  KieServerTypePermission permission = new KieServerTypePermission(new HashSet<>());
  
  assertFalse(permission.allows(Top.class));
  
}

org.kie.server.api.marshalling.xstreamKieServerTypePermission

Javadoc

Kie Server specific type permission implementation that allows:
  • org.kie.server.api.model classes (including subpackages)
  • classes that come from kjar or its dependencies (were loaded by kjar class loader)
  • set of classes explicitly given when constructing this instance
  • optionally defined by wildcard that is given via system property: org.kie.server.xstream.enabled.packages (comma separated list of wildcard expressions)

Most used methods

  • <init>
  • allows
  • patterns

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now