Package jetbrains.buildServer.license
Class LicensingPolicyImpl
- java.lang.Object
-
- jetbrains.buildServer.license.LicensingPolicyImpl
-
- All Implemented Interfaces:
LicensingPolicy
,LicensingPolicyEx
public class LicensingPolicyImpl extends Object implements LicensingPolicyEx
- Author:
- Pavel.Sher Date: 27.11.2007
-
-
Constructor Summary
Constructors Constructor Description LicensingPolicyImpl(ServerLicenseManager licenseManager, ProjectManagerEx projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCreateMoreBuildTypes(int buildTypesCount)
int
getActiveLicensesNum()
int
getAgentsLicensesLeft()
int
getBuildTypesLicensesLeft()
int
getMaxNumberOfAuthorizedAgents()
Returns maximum number of authorized agents or -1 if there is no limitint
getMaxNumberOfBuildTypes()
Returns maximum number of build configurations supported by the current licensing policy.boolean
isEAPTrialMode()
boolean
isEnterpriseMode()
Returns true if server is working in the enterprise mode.boolean
isMaxNumberOfAuthorizedAgentsExceeded()
Returns true if number of authorized agents exceeds number of agents written in license keys.boolean
isMaxNumberOfBuildTypesExceeded()
Returns true if maximum number of build configurations exceeded.boolean
isOpenSourceMode()
boolean
isPerUsageLicenseActive()
boolean
isTrialMode()
-
-
-
Constructor Detail
-
LicensingPolicyImpl
public LicensingPolicyImpl(@NotNull ServerLicenseManager licenseManager, @NotNull ProjectManagerEx projectManager)
-
-
Method Detail
-
isEnterpriseMode
public boolean isEnterpriseMode()
Description copied from interface:LicensingPolicy
Returns true if server is working in the enterprise mode.- Specified by:
isEnterpriseMode
in interfaceLicensingPolicy
- Returns:
- true for enterprise mode and false otherwise
-
isTrialMode
public boolean isTrialMode()
- Specified by:
isTrialMode
in interfaceLicensingPolicy
- Returns:
- true if server is in trial mode
-
isEAPTrialMode
public boolean isEAPTrialMode()
- Specified by:
isEAPTrialMode
in interfaceLicensingPolicy
- Returns:
- true if server is in EAP trial mode.
-
isOpenSourceMode
public boolean isOpenSourceMode()
- Specified by:
isOpenSourceMode
in interfaceLicensingPolicy
- Returns:
- Returns true if server is in open source evaluation mode.
-
isPerUsageLicenseActive
public boolean isPerUsageLicenseActive()
- Specified by:
isPerUsageLicenseActive
in interfaceLicensingPolicyEx
- Returns:
- true if the server works in PerUsage enterprise mode and it is active - usage data was sent to the JetProfile recently.
-
getMaxNumberOfBuildTypes
public int getMaxNumberOfBuildTypes()
Description copied from interface:LicensingPolicy
Returns maximum number of build configurations supported by the current licensing policy.- Specified by:
getMaxNumberOfBuildTypes
in interfaceLicensingPolicy
- Returns:
- maximum number of build configurations supported or -1 if there is no build configurations limit
-
getMaxNumberOfAuthorizedAgents
public int getMaxNumberOfAuthorizedAgents()
Description copied from interface:LicensingPolicy
Returns maximum number of authorized agents or -1 if there is no limit- Specified by:
getMaxNumberOfAuthorizedAgents
in interfaceLicensingPolicy
- Returns:
- max number of authorized agents
-
isMaxNumberOfAuthorizedAgentsExceeded
public boolean isMaxNumberOfAuthorizedAgentsExceeded()
Description copied from interface:LicensingPolicyEx
Returns true if number of authorized agents exceeds number of agents written in license keys.- Specified by:
isMaxNumberOfAuthorizedAgentsExceeded
in interfaceLicensingPolicyEx
- Returns:
- see above
-
getAgentsLicensesLeft
public int getAgentsLicensesLeft()
- Specified by:
getAgentsLicensesLeft
in interfaceLicensingPolicyEx
- Returns:
- number of agent licenses left or -1 if there is no limit for number of agents
-
isMaxNumberOfBuildTypesExceeded
public boolean isMaxNumberOfBuildTypesExceeded()
Description copied from interface:LicensingPolicyEx
Returns true if maximum number of build configurations exceeded.- Specified by:
isMaxNumberOfBuildTypesExceeded
in interfaceLicensingPolicyEx
- Returns:
- see above
-
canCreateMoreBuildTypes
public boolean canCreateMoreBuildTypes(int buildTypesCount)
- Specified by:
canCreateMoreBuildTypes
in interfaceLicensingPolicyEx
- Parameters:
buildTypesCount
- number of build configurations to create- Returns:
- true if the specified number of build configurations can be created
-
getBuildTypesLicensesLeft
public int getBuildTypesLicensesLeft()
- Specified by:
getBuildTypesLicensesLeft
in interfaceLicensingPolicyEx
- Returns:
- number of build configuration licenses left or -1 if there is no limit
-
getActiveLicensesNum
public int getActiveLicensesNum()
- Specified by:
getActiveLicensesNum
in interfaceLicensingPolicyEx
- Returns:
- number of currently active license keys
-
-