com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class License

  • java.lang.Object
    • com.aspose.slides.License
  • All Implemented Interfaces:
    ILicense


    public class License
    extends java.lang.Object
    implements ILicense

    Provides methods to license the component.

     In this example, an attempt will be made to find a license file named MyLicense.lic
     in the folder that contains the component, in the folder that contains the calling assembly,
     in the folder of the entry assembly and then in the embedded resources of the calling assembly.
     


     
     License license = new License();
     license.setLicense("MyLicense.lic");
     

    • Constructor Summary

      Constructors 
      Constructor and Description
      License()
      Initializes a new instance of this class.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getVersion()
      Returns version of Aspose.Slides for Java.
      boolean isLicensed()
      Check if licence is applied to component
      void resetLicense()
      Reset the license Use this method to reset license in component
      void setLicense(java.io.InputStream stream)
      Licenses the component.
      void setLicense(java.lang.String namePath)
      Licenses the component.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • License

        public License()

        Initializes a new instance of this class.

         In this example, an attempt will be made to find a license file named MyLicense.lic
         in the folder that contains the component, in the folder that contains the calling assembly,
         in the folder of the entry assembly and then in the embedded resources of the calling assembly.


         
         License license = new License();
         license.setLicense("MyLicense.lic");

    • Method Detail

      • setLicense

        public void setLicense(java.io.InputStream stream)
                        throws AsposeLicenseException

        Licenses the component.

         In this example, an attempt will be made to find a license file named MyLicense.lic
         in the folder that contains the component, in the folder that contains the calling assembly,
         in the folder of the entry assembly and then in the embedded resources of the calling assembly.


         
         License license = new License();
         license.setLicense("MyLicense.lic");

        Specified by:
        setLicense in interface ILicense
        Parameters:
        stream - Can be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.
        Throws:
        AsposeLicenseException
      • setLicense

        public void setLicense(java.lang.String namePath)
                        throws AsposeLicenseException

        Licenses the component.

         In this example, an attempt will be made to find a license file named MyLicense.lic
         in the folder that contains the component, in the folder that contains the calling assembly,
         in the folder of the entry assembly and then in the embedded resources of the calling assembly.


         
         License license = new License();
         license.setLicense("MyLicense.lic");

        Specified by:
        setLicense in interface ILicense
        Parameters:
        namePath - Can be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.
        Throws:
        AsposeLicenseException
      • getVersion

        public static java.lang.String getVersion()
        Returns version of Aspose.Slides for Java.
      • resetLicense

        public void resetLicense()
        Reset the license Use this method to reset license in component
          
         License license = new License();
         license.resetLicense();
         
        Specified by:
        resetLicense in interface ILicense
      • isLicensed

        public boolean isLicensed()
        Description copied from interface: ILicense

        Check if licence is applied to component

        Specified by:
        isLicensed in interface ILicense
        Returns:
        True if component is licensed, otherwise false